ArticleslgStudy

science

Admissible heuristic

Admissible 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 Admissible heuristic rather than just read about it. In short: In computer science, specifically in algorithms related to pathfinding, a heuristic function is said to be admissible if it never overestimates the cost of reaching the goal, i.e. the cost it estimates to reach the goal is not higher than the lowest possible cost from the current point in the path. In other words, it should act as a lower bound.

Key takeaways

  • Admissible 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 Admissible heuristic to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Admissible heuristic from memory before moving on to harder problems.

Reference excerpt

In computer science, specifically in algorithms related to pathfinding, a heuristic function is said to be admissible if it never overestimates the cost of reaching the goal, i.e. the cost it estimates to reach the goal is not higher than the lowest possible cost from the current point in the path. In other words, it should act as a lower bound. It is related to the concept of consistent heuristics. While all consistent heuristics are admissible, not all admissible heuristics are consistent.

Search algorithms An admissible heuristic is used to estimate the cost of reaching the goal state in an informed search algorithm. In order for a heuristic to be admissible to the search problem, the estimated cost must always be lower than or equal to the actual cost of reaching the goal state. The search algorithm uses the admissible heuristic to find an estimated optimal path to the goal state from the current node. For example, in A* search the evaluation function (where n is the current node) is: f(n)=g(n)+h(n) where

f(n) = the evaluation function. g(n) = the cost from the start node to the current node h(n) = estimated cost from current node to goal. h(n) is calculated using the heuristic function. With a non-admissible heuristic, the A* algorithm could overlook the optimal solution to a search problem due to an overestimation in f(n).

Formulation n is a node h is a heuristic h(n) is cost indicated by h to reach a goal from n h∗(n) is the optimal cost to reach a goal from n h(n) is admissible if, ∀n h(n)≤h∗(n)

Construction An admissible heuristic can be derived from a relaxed version of the problem, or by information from pattern databases that store exact solutions to subproblems of the problem, or by using inductive learning methods.

Examples Two different examples of admissible heuristics apply to the fifteen puzzle problem:

Hamming distance Manhattan distance The Hamming distance is the total number of misplaced tiles. It is clear that this heuristic is admissible since the total number of moves to order the tiles correctly is at least the number of misplaced tiles (each tile not in place must be moved at least once). The cost (number of moves) to the goal (an ordered puzzle) is at least the Hamming distance of the puzzle. The Manhattan distance of a puzzle is defined as:

h(n)=∑all tiles𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(tile, correct position) Consider the puzzle below in which the player wishes to move each tile such that the numbers are ordered. The Manhattan distance is an admissible heuristic in this case because every tile will have to be moved at least the number of spots in between itself and its correct position.

The subscripts show the Manhattan distance for each tile. The total Manhattan distance for the shown puzzle is:

h(n)=3+1+0+1+2+3+3+4+3+2+4+4+4+1+1=36

Optimality proof If an admissible heuristic is used in an algorithm that, per iteration, progresses only the path of lowest evaluation (current cost + heuristic) of several candidate paths, terminates the moment its exploration reaches the goal and, crucially, closes all optimal paths before terminating (something that's possible with A* search algorithm if special care isn't taken), then this algorithm can only terminate on an optimal path. To see why, consider the following proof by contradiction: Assume such an algorithm managed to terminate on a path T with a true cost Ttrue greater than the optimal path S with true cost Strue. This means that before terminating, the evaluated cost of T was less than or equal to the evaluated cost of S (or else S would have been picked). Denote these evaluated costs Teval and Seval respectively. The above can be summarized as follows,

Strue < Ttrue Teval ≤ Seval If our heuristic is admissible it follows that at this penultimate step Teval = Ttrue because any increase on the true cost by the heuristic on T would be inadmissible and the heuristic cannot be negative. On the other hand, an admissible heuristic would require that Seval ≤ Strue which combined with the above inequalities gives us Teval < Ttrue and more specifically Teval ≠ Ttrue. As Teval and Ttrue cannot be both equal and unequal our assumption must have been false and so it must be impossible to terminate on a more costly than optimal path. As an example, let us say we have costs as follows:(the cost above/below a node is the heuristic, the cost at an edge is the actual cost)

0 10 0 100 0 START ---- O ----- GOAL | | 0| |100 | | O ------- O ------ O 100 1 100 1 100

So clearly we would start off visiting the top middle node, since the expected total cost, i.e. f(n), is 10+0=10. Then the goal would be a candidate, with f(n) equal to 10+100+0=110. Then we would clearly pick the bottom nodes one after the other, followed by the updated goal, since they all have f(n) lower than the f(n) of the current goal, i.e. their f(n) is 100,101,102,102. So even though the goal was a candidate, we could not pick it because there were still better paths out there. This way, an admissible heuristic can ensure optimality. However, note that although an admissible heuristic can guarantee final optimality, it is not necessarily efficient.

See also Consistent heuristic Heuristic function Search algorithm

References

Worked examples

Example 1 — a first encounter with Admissible heuristic

Start with the simplest possible case. Write down what Admissible 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 Admissible 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 Admissible 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 Admissible heuristic

In research
Admissible 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 Admissible 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
Admissible heuristic is common in secondary-school and first-year university syllabi. It links to neighbouring topics Artificial intelligence, Heuristics, so understanding it makes those chapters shorter.
In everyday life
Look for Admissible 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 “Admissible heuristic” →

How to study Admissible heuristic in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Admissible 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 Admissible heuristic out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Admissible heuristic in simple terms?

In computer science, specifically in algorithms related to pathfinding, a heuristic function is said to be admissible if it never overestimates the cost of reaching the goal, i.e. the cost it estimates to reach the goal is not higher than the lowest possible cost from the current point in the path…

Why does Admissible 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 Admissible 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 Admissible heuristic.

Tags

  • Artificial intelligence
  • Heuristics

Keep exploring