A* Pathfinding Demonstration
By David M Howard
Tuesday, August 26, 2003
- A* - run A* algorithm to find path from start (yellow square) to goal (red square).
- clear - clear everything from the grid except the start and goal
- clear path - clear all path info but keep obstacles
- To paint obstacles, hold down the left mouse button and drag
- To erase obstacles, hold down the right mouse button (or CTRL-left button) and drag
- Try building a maze, walls, stand alone obstacles etc to see how it finds a path
The best presentation of the A* algorithm for programmers that I have seen is in a Game Developer magazine article "Smart Moves : Intelligent Pathfinding" by Bryan Stout in the October 1996 issue. I used that article to generate the applet. Since his code for the article was in Delphi I reimplemented my own version in Java.