Admissible Heuristics and Optimality of A*

Defines admissible heuristics, shows why the haversine distance is admissible for air routing, and proves that A* with an admissible heuristic returns an optimal-cost path.

Step 1 of 157%

Tutorial

Admissible Heuristics

In A*, nodes are popped from the open list in order of f(n)=g(n)+h(n),f(n) = g(n) + h(n), where g(n)g(n) is the cost from the start to nn and h(n)h(n) is a heuristic estimate of the remaining cost from nn to the goal. Whether A* returns an optimal path depends on the quality of h.h.

Let h(n)h^*(n) denote the true optimal cost from nn to the goal. A heuristic hh is admissible if, for every node n,n,

h(n)h(n).h(n) \leq h^*(n).

In words: an admissible heuristic never overestimates the remaining cost. It is always an optimistic lower bound on the true cost-to-go.

Since h(goal)=0,h^*(\text{goal}) = 0, an admissible heuristic must also satisfy h(goal)=0.h(\text{goal}) = 0.

For example, suppose the true remaining costs from four nodes to goal GG are

h(A)=12,h(B)=7,h(C)=4,h(G)=0.h^*(A) = 12,\quad h^*(B) = 7,\quad h^*(C) = 4,\quad h^*(G) = 0.

The heuristic h(A)=10, h(B)=7, h(C)=3, h(G)=0h(A)=10,\ h(B)=7,\ h(C)=3,\ h(G)=0 is admissible: every value satisfies h(n)h(n).h(n) \leq h^*(n). The heuristic h(A)=10, h(B)=9, h(C)=3, h(G)=0h(A)=10,\ h(B)=9,\ h(C)=3,\ h(G)=0 is not admissible because h(B)=9>7=h(B).h(B) = 9 > 7 = h^*(B).

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle