core Estimated learning time: 5 h

4.9 Admissible and consistent heuristics

You can prove A* optimal under admissibility, test a heuristic for consistency, and work numerical heuristic problems on small graphs.

Before:01. Mathematics for Machine Learning02. Python — Basics to Advanced

Admissibility — never overestimate the remaining cost — buys A-star optimality for tree search; consistency, the stronger triangle-style condition, buys it for graph search. Most people can state both conditions and prove neither, and the proofs are short and examinable. This topic does the proofs and then drills numerical heuristic problems on small graphs. It follows the A-star trace because the guarantees are what turn a plausible algorithm into a trustworthy one.

Work through these

  • State admissibility: h(n) is never greater than the true remaining cost h*(n)

    A heuristic is admissible when it never overestimates what remains. That single condition is what makes the optimality guarantee possible.

  • Prove that A* with tree search is optimal when h is admissible

    The proof is short and worth following: an optimal solution cannot be overlooked in favour of a worse one when estimates never overshoot. Following it once makes the condition memorable rather than arbitrary.

  • State consistency: h(n) at most c(n,a,n') + h(n'), and show f is non-decreasing along a path

    Consistency is a stronger local condition saying the estimate never drops faster than the step cost, and it makes the total score never decrease along a path. This is what makes graph search safe.

  • Apply both results: admissible gives tree-search optimality, consistent gives graph-search optimality

    Admissibility gives you optimality when revisits are allowed; consistency gives it when they are not. Knowing which guarantee you have depends on which condition your heuristic satisfies.

  • Work numerical heuristic problems on small graphs

    Small numeric problems on graphs, checking heuristics against both conditions. These are exactly the examination questions, and they are quick once the definitions are firm.

Sign in to keep your progress.

Free resources

Links last checked 29 Aug 2026.

Stuck here?

Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.

Checking your session…

Topics shown in module order.