Logo Home | Download | Submit | Screenshots | FAQ | SF Project Page | JUDO Help | Contact

View a Program

To run this program in JUDO, select the Program Code with your mouse, click the Edit menu of your browser and Copy. Then click in the code area of JUDO, click the Edit menu of JUDO and then Paste. Then Run the program.

Author Name:Edac Leinad
Program Name:A* (A Star) Pathfinding Algorithm
Program Description:Hello, this program is a bit rough around the edges, as it is a prototype. Errors are quite common, so just restart the program if you run into one. I created this program to preface a game I am working on that requires agents to find pathways in a map. Please refer to the "Notes used in development" section for how A* works. Contact me at flyndgs[at]gmail[dot]com. I will be happy to answer any questions.


left click create black block
right click create white block
left click + 1 move starting point to mouse
left click + 2 move ending point to mouse
spacebar start pathfinder
d toggle drawing of found path
s show cost field (terrain explored)
q stop pathfinder from searching
c clear grid
f fill grid with walls
r randomize grid values
8 use Dijkstra's algorithm
9 use A* algorithm with regular (slower A*) heuristic
0 use A* algorithm with manhattan (faster A*) heuristic


* the actual A* algorithm is inside the Pathfinder class, around line 504, in the function findPath.
* [This is for an older version] There is a flag you can change in the function main, called useFastHeuristic.
Set it to true, and a faster A* will compile, however it will not always return the shortest path. Set it
to false, and A* will do its best to calculate the shortest distance, but could get held up (not find a path)
because this program wasn't designed to have floating point costs (that flag is around line 618).
* you can make the field different shades of red, representing higher costs for the more red a color is,
however you must do this in code as it is not implemented in the GUI
* This program works great on my computer on Windows XP, but really sucks in Windows 7.

Notes used in development (Obfuscated so you can see them, but JUDO's site won't think its spam):



Edac Leinad

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see .

And one more thing, if this doesn't post correctly on JUDO's site, expect an update on my site at edacleinadjudofiles[dot]yolasite[dot]com containing the source.
Program Type:Graphics
Program Code:

Last Modified Sun Dec 22 07:25:00 UTC 2013
Thomas Dunn

Home | Download | Submit | Screenshots | FAQ | SF Project Page | JUDO Help | Contact