Heuristic quality: monotonicity, informedness, and the 8-puzzle
◈ 3 cardsMonotone (consistent) heuristics, what makes one heuristic more informed than another, and comparing two admissible 8-puzzle heuristics.
Two ways to grade a heuristic
Admissibility tells you a heuristic is safe (it won't break optimality). Two finer properties tell you how good it is.
### Monotonicity (consistency)
A heuristic is monotone (a.k.a. consistent) if for every state and any descendant ,
That is, the estimate never drops by more than the actual step cost between the states. Monotonicity is a stronger, local version of admissibility: every monotone heuristic is admissible (sum the inequality along any path), but not every admissible heuristic is monotone.
The practical pay-off: with a monotone heuristic, the first time best-first reaches a state it has already reached it by an optimal path. So a re-discovered state can simply be discarded — no path-length comparison needed — and the values of successively expanded states are non-decreasing.
### Informedness
For two admissible heuristics and , is more informed than if for all (while both stay ). A more informed heuristic gives a tighter lower bound, so A\* with expands a subset of the states it expands with — it reaches the optimum examining fewer states. (Caveat: a more informed heuristic can cost more to compute; the saving in states must outweigh the per-state cost.)
Worked example: two 8-puzzle heuristics
For the 8-puzzle, two classic admissible heuristics:
- Tiles out of place — count how many tiles are not in their goal cell. Each move fixes at most one tile, so this can never exceed the true number of moves ⇒ admissible.
- Manhattan distance — sum, over all tiles, the grid distance (rows + columns) each tile must travel. Tiles can't teleport, so this also never overestimates ⇒ admissible — and it is a tighter count, so it is more informed.
Take a scrambled board and a goal board. Counting gives tiles-out-of-place and Manhattan . Manhattan tiles-out-of-place on this state (and in general), confirming Manhattan dominates — it is the more informed of the two while remaining admissible.