@derez
I did search for and find A* as part of the excellent
@Informatix "Steering" library. But it is not free (and shouldn't be) and it is not open sourced.
I did find your submission, but it seemed unfinished and as far as I could tell you ended up with the algorithm from
@Informatix.
While I am familiar with A*, it requires a heuristic. If there is a heuristic, A* is faster than Dijkstra. An example of a heuristic would be the distance as the crow flies - (like google maps). The situation I was thinking of had no such heuristic. You can can put a dummy heuristic in A*, but then it becomes like Dijkstra's but more complicated
Dijkstra's method is compact and easy to understand and fast enough for moderate sized graphs, and it is a classic.
As I mentioned, there are newer algorithms, for example Ant Colony Optimization.
You can stop reading now!
We have an ant problem in our patio, and I am fascinated by how they work. So I am experimenting to see how fast the algorithm is.
I suspect it will be faster for a large graph and possible slower for a small graph.
I first came across Dijkstra's solution in 1969 when I was specializing in combinatorics and optimization at the U of Waterloo.
It seemed perfect for a recursive formulation but that turned to be very difficult (anyone out there want to give it a try?)
Since then I moved on to other things, so it was only in the past week when I came across it again - see link in #7.
As a completely irrelevant fact, I was born in Eindhoven (Netherlands) and when Dijkstra was devising this algorithm in Amsterdam,
I was bicycling with my older cousin from Eindhoven (South) to Drente (North), a route of hundreds of sections of bicycle paths.
Did we choose the shortest route? It was a two-day trip with a sleep-over in Swolle (about halfway).
The first day was probably the shortest path (at least by visual inspection of the map).
The second day was very complicated with rivers and other obstacles, so we'll never know.
And when you're having fun, maybe shortest and fastest isn't optimal.
