The A* Search Algorithm - Duke University
courses.cs.duke.edu › fall11 › cps149sObservation: A* is very similar to Dijkstra’s algorithm: d(v) ← (∞ if v 6= S 0 if v = S Q := the set of nodes in V, sorted by d(v) while Q not empty do v ←Q.pop() for all neighbours u of v do if d(v)+e(v,u) ≤d(u) then d(u) ←d(v)+e(v,u) end if end for end while In fact, Dijkstra’s algorithm is a special case of A*, when we set h(v) = 0 for all v.