I know there are some implementations of AStar pathfinders etc. here but most of them did not seem to be meant to be extended or to implement a real system for different pathfinding algorithms. So I started creating a system and wrote a little test app to draw mazes and let them be solved by different algorithms.
Its basically the standard interface system where you have your world shells or whatever implement a PathNode interface so they can give back their neighbours, cost to given neighbours and estimated distance to the goal. Only here the PathFinders implement an Interface as well, so you can implement own versions.
This version includes the beginnings of an attempt to create a multithreaded AStar path finder, but I had to find out that the astar implementation is not really suited for multithreading… Anyway its a nice system to try out different pathfinding algorithms.
IF you want to browse the code, go to http://svn.bitwaves.de/browser/
Using svn, you can download and compile/run the application like this:
svn co --username guest --password guest http://svn.bitwaves.de/svn/opensource/pathfinding pathfinding
cd pathfinding
ant javadoc
ant jar
ant run
Using these commands you create the javadoc in the dist/doc/ folder as well, to have some more info about the implementation.
To use it in your own application use it like this:
PathNode start=myEntity.getCurrentNode();
PathNode goal=myEntity.getTargetNode();
PathFinder finder=new AStar();
List<PathNode> path=finder.findPath(start, goal);
If someone feels like advancing the system or implement a new PathFinder with the system, I can give you SVN access if you PM me.
If you need more info on how to use this PathFinder or on the subject in general, feel free to ask :)