A* Search with Heuristics — Dijkstra vs. A*
f(n) = g(n) + w · h(n)
Speed
Both searches find the same optimal path — watch how many nodes each one explores.
Dijkstra
w = 0
f(n) = g(n)
0expanded
A*
w = 1
f(n) = g(n)+h(n)
0expanded