Describe the purpose of both the A* algorithm and Dijkstra's algorithm.
Points that gain marks
- Both find the best (shortest or cheapest) route between two nodes in a graph.
- The best route is measured by distance, cost or time on the edges.
In this lab: Dijkstra always takes the nearest unvisited node; A* adds a guess h of the distance still to go, so it looks at fewer nodes on the way to the end.