A* Algorithm with Python-Pygame

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
30,931
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 7, 2008

My second video about the A* algorithm. I used python to code this little application combined with pygame.

All critics and suggestions are welcome.

Edit: Source code can be found here
http://www.pygame.org/project/767/

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (Keebus87)

  • @timonix2 speed is intended to be this slow for algorithm showing purposes.

  • nice man !!!! will you please tell me wat kind of software is this ? you have develoed it or what ? coding much be a hillarios one !

  • @parthakakoti Yes I developed it some time ago using Python/Pygame and my own library for GUI.

  • Read video infos to know where to find the source code.

Top Comments

  • wow this is epic, i can't imagine how advanced this is o.o

see all

All Comments (46)

Sign In or Sign Up now to post a comment!
  • the two press dislike actually dont know makeing a game is difficult -.-

  • Better than minecraft pathfinding

  • Nice done :)

  • @zamliman special for you : become lvl 80 is much harder.

  • This is very interesting - I'm going to poke around the code and see what I can learn.

  • The download link is broken on pygame.org.  Could you please repost an updated link? I'm planning to use A* for my senior project :D

  • VV more specifically A* calculates the distance a square is from the start vs how far away it is from the finish. so as it searches toward the finish square, the squares to the left of the start also get searched because although they are farther away from the finish, they are also closer to the start. This ensures that the solution it finds is the shortest possible.

  • @pVVENx the way A* pathfinding works is that it keeps spreading from the start point in all possible directions. The black line is just showing the route it thinks is the "best" at that moment in time (notice how in the large maze it can't seem to make up its mind). A* works so well for mazes because a maze provides "pipes" for the algorithm to work through, as opposed to an open map, in which case it acts more like spilling water on the floor.

  • wouldn't for the maze case it even go faster if you'd do a reverse search too? from the red dot to the green, and then make the 2 endings (current paths) find each other, should be another 40 % off :) in effort

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more