Best-first with f = g + h (Manhattan heuristic), start → goal.
Grid (dark = obstacle)
S
G
Open list (1 nodes):
(0,0) g=0 h=8 f=8
1/19
Path cost so far
goal not reached yet
With an admissible heuristic (never overestimating), A* is optimal and complete. It expands the frontier in order of total estimated cost, so the goal, once popped, is guaranteed shortest.