Through various projects, I've had to do some shortest-path finding in a connected graph. An efficient and straight-forward way to do this is using
Dijkstra's Algorithm. Notice that it'll only work for graphs with non negative path weights, like 2D maps for instance. While I've used the algorithm on several occasions, it's only now that I've rewritten it in generic form.
Read the complete 4468 bytes...
Digg it |
Kick it |
Dzone it |
Reddit