03.07.2012, 01:47
Quote:
And here's an implementation of Dijkstra algorithm if someone's interested.
|
In Dijkstra's you calculate the smallest cost to get to each node until you hit the target node, in AStar you calculate the cost of each node from the starting node, the distance between that node and the final node, then you add them together and choose the one with the lowest score to move on until you get the final node.