From time to time I appear at a local school (IT Gymnasiet Örebro, Sweden) trying to perform some kind of half assed presentations about all things under the sun.

This week I´m doing a reading about the Heuristically weighted Dijkstra (I find it important to actually give the guy some credit for his original algorithm) otherwise named A* (A star).

This neat little algorithm is most oftenly used for Pathfinding although it´s uses are far wider (ie finding the minimum amount of moves to solve puzzles).

By doing this reading I unintentionally forced myself into writing an educational application for this. That is an application that step by step shows what exactly the A* algorithm does.

I don’t plan on raving on about the details of the algorithm here, far smarter people than me have done that before (ie here, here and here) but I´ll at least make public the application and source code:

Application goes here (Silverlight)!

And source code comes here (zip file, aboot 500kb)!

I started writing the app as a WPF windows client but realised after a while that I didn’t actually do any IO or such and might aswell make it in Silverlight so after basically just copying the code into a Silverlight project its available for you right in your browser. (unless of course you´re brave enough to use any non MS-supported browsers)

Feel free to try it out, drop me a comment if you like and reuse the code if it´s of any good to you.

May the (a) stars guide your path 🙂