John Ratcliff's Code Suppository

A place where I insert my code into the anus of the Internet.

 

Wednesday, August 01, 2007

Fast A*Star implemenation by Justin Heyes-Jones



Justin Heyes-Jones has a great implemenation of the AStar path finding algorithm on the Internet. He is an AI enthusiast and has contributed a lot of resources to the development community. You can find his website here.

When I decided to evaluate Justin's Astar implementation I found nothing wrong with it and went ahead and did a full integration. The only thing I did change was to make a wrapper interface around his heavily templated class. This is purely a matter of programming style. I like to use pure-virtual interfaces wherever possible and hide the implementation details behind a set of simple C calls using the PIMPLE paradigm (pointer to implementation).

My wrapper is prototyped in the following simple header file: FastAstar.h

The implementation which includes two template classes by Justin embedded as well as my own wrapper code can be found here: FastAstar.cpp

Justin uses a fast allocator template when implementing the Astar algorithm and the performance is extraordinarily fast.

0 Comments:

Post a Comment

<< Home