Satya's blog - Dijkstra's algorithm
In a game I play, there are maps. Movement costs differently per type of tile. Moving uses up action points. Players make maps of the sectors. I write an auto-mapper Firefox Extension. I now have a lot of map data in a database. I make pretty maps in HTML and as images using Imagemagick (in perl). Much goodness ensues.
"Hmm," I think, "why don't I write something that will calculate the path across the sectors for a of minimum action points, i.e. shortest path. Ah, Dijkstra's algorithm gives me shortest paths. After all, the relevant map data can be expressed as a graph." I used the data in the Dijkstra's algorithm Wikipedia article.