ArticleslgStudy

science

Consistent heuristic

Consistent heuristic is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Consistent heuristic rather than just read about it. In short: In the study of path-finding problems in artificial intelligence, a heuristic function is said to be consistent, or monotone, if its estimate is always less than or equal to the estimated distance from any neighbouring vertex to the goal, plus the cost of reaching that neighbour. Formally, for every node N and each successor P of N, the estimated cost of reaching the goal from N is no greater than the step cost of g…

Consistent heuristic — main illustration
Consistent heuristic — illustration

Key takeaways

  • Consistent heuristic belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Consistent heuristic to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Consistent heuristic from memory before moving on to harder problems.

Reference excerpt

In the study of path-finding problems in artificial intelligence, a heuristic function is said to be consistent, or monotone, if its estimate is always less than or equal to the estimated distance from any neighbouring vertex to the goal, plus the cost of reaching that neighbour. Formally, for every node N and each successor P of N, the estimated cost of reaching the goal from N is no greater than the step cost of getting to P plus the estimated cost of reaching the goal from P. That is:

h(N)≤c(N,P)+h(P) and h(G)=0. where

h is the consistent heuristic function N is any node in the graph P is any descendant of N G is any goal node c(N,P) is the cost of reaching node P from N Informally, every node i will give an estimate that, accounting for the cost to reach the next node, is always lesser than or equal to the estimate at node i+1. A consistent heuristic is also admissible, i.e. it never overestimates the cost of reaching the goal (the converse, however, is not always true). Assuming non negative edges, this can be easily proved by induction. Let h(N0)=0 be the estimated cost for the goal node. This implies that the base condition is trivially true as 0 ≤ 0. Since the heuristic is consistent, h(Ni+1)≤c(Ni+1,Ni)+h(Ni)≤c(Ni+1,Ni)+c(Ni,Ni−1)+...+c(N1,N0)+h(N0) by expansion of each term. The given terms are equal to the true cost, ∑i=1nc(Ni,Ni−1), so any consistent heuristic is also admissible since it is upperbounded by the true cost. The converse is clearly not true as we can always construct a heuristic that is always below the true cost but is nevertheless inconsistent by, for instance, increasing the heuristic estimate from the farthest node as we get closer and, when the estimate h(Ni) becomes at most the true cost h∗(Ni), we make h(Ni−1)=h(Ni)−c(Ni,Ni−1).

Consequences of monotonicity

Consistent heuristics are called monotone because the estimated final cost of a partial solution, f(Nj)=g(Nj)+h(Nj) is monotonically non-decreasing along any path, where g(Nj)=∑i=2jc(Ni−1,Ni) is the cost of the best path from start node N1 to Nj. It's necessary and sufficient for a heuristic to obey the triangle inequality in order to be consistent. The justification for f(N) to be monotonically non-decreasing under a consistent heuristic is as follows: Suppose P is a successor of N, then g(P)=g(N)+c(N,a,P) for some action a from N to P. Then we have that f(P)=g(P)+h(P)=g(N)+c(N,a,P)+h(P)≥g(N)+h(N)=f(N) hence f(P)≥f(N). In the A* search algorithm, using a consistent heuristic means that once a node is expanded, the cost by which it was reached is the lowest possible, under the same conditions that Dijkstra's algorithm requires in solving the shortest path problem (no negative cost edges). In fact, if the search graph is given cost c′(N,P)=c(N,P)+h(P)−h(N) for a consistent h, then A* is equivalent to best-first search on that graph using Dijkstra's algorithm. With a non-decreasing f(N) under consistent heuristics, one can show that A* achieves optimality with cycle-checking, that is, when A* expands a node n, the optimal path to n has already been found. Suppose for the sake of contradiction that when A* expands n, the optimal path has not been found. Then, by the graph separation property, there must exist another node n′ on the optimal path to n on the frontier. Since n was selected for expansion instead of n′, this would mean that f(n)<f(n′). But since f-values are monotonically non-decreasing along any path under the consistent heuristic function f , we know that f(n)≥f(n′) since n′ is on the path to n. This is a contradiction, meaning that n′ should have been selected for expansion first instead of n. In the unusual event that an admissible heuristic is not consistent, a node will need repeated expansion every time a new best (so-far) cost is achieved for it. If the given heuristic h is admissible but not consistent, one can artificially force the heuristic values along a path to be monotonically non-decreasing by using

h′(P)←max⁡(h(P),h′(N)−c(N,P)) as the heuristic value for P instead of h(P), where N is the node immediately preceding P on the path and h′(start)=h(start). This idea is due to László Mérō and is now known as pathmax. Contrary to common belief, pathmax does not turn an admissible heuristic into a consistent heuristic. For example, if A* uses pathmax and a heuristic that is admissible but not consistent, it is not guaranteed to have an optimal path to a node when it is first expanded.

Relation to Local Admissibility Modifying the consistency condition to h(N)−h(P) ≤ c(N,P) establishes a connection to local admissibility, where the heuristic estimate to a specific node remains less than or equal to the actual step cost. This ensures optimality when selecting local nodes, akin to how admissible heuristics ensure global optimality. By maintaining this property, the search process improves efficiency by making locally optimal decisions that contribute to the globally optimal solution.

See also Admissible heuristic

References

Worked examples

Example 1 — a first encounter with Consistent heuristic

Start with the simplest possible case. Write down what Consistent heuristic claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Consistent heuristic before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Consistent heuristic ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Consistent heuristic

In research
Consistent heuristic appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Consistent heuristic in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Consistent heuristic is common in secondary-school and first-year university syllabi. It links to neighbouring topics Heuristics, so understanding it makes those chapters shorter.
In everyday life
Look for Consistent heuristic outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Consistent heuristic” →

How to study Consistent heuristic in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Consistent heuristic means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Consistent heuristic out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Consistent heuristic in simple terms?

In the study of path-finding problems in artificial intelligence, a heuristic function is said to be consistent, or monotone, if its estimate is always less than or equal to the estimated distance from any neighbouring vertex to the goal, plus the cost of reaching that neighbour. Formally, for ever…

Why does Consistent heuristic matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Consistent heuristic?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Consistent heuristic.

Tags

  • Heuristics

Keep exploring