What is an admissible heuristic?
by Stephen M. Walker II, CoFounder / CEO
What is an admissible heuristic?
An admissible heuristic is a concept in computer science, specifically in algorithms related to pathfinding and artificial intelligence. It refers to a heuristic function that never overestimates the cost of reaching the goal. The cost it estimates to reach the goal is not higher than the lowest possible cost from the current state.
Admissible heuristics are used to estimate the cost of reaching the goal state in an informed search. For a heuristic to be admissible, the estimated cost must always be lower than or equal to the actual cost of reaching the goal state.
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.
What are some examples of admissible heuristics?
Admissible heuristics are often used in pathfinding algorithms such as A*. In A* search, the evaluation function is given by f(n)=g(n)+h(n)
, where n
is the current node, g(n)
is the actual cost from the initial node to the current node, and h(n)
is the estimated cost from the current node to the goal state.
While all consistent heuristics are admissible, not all admissible heuristics are consistent. A heuristic is considered to be consistent if the estimated cost from one node to the successor node added to the estimated cost from the successor node to the goal is less than or equal to the actual cost.
When a nonadmissible heuristic is used in an algorithm, it may or may not result in an optimal solution. But, sometimes nonadmissible heuristics expand a smaller amount of nodes. As a result, it is possible that the total cost (search cost + path cost) could end up being lower than an optimal solution found by an admissible heuristic.
How do admissible heuristics work?
Admissible heuristics work by providing an estimate of the cost to reach the goal state from a given state in a search algorithm, without ever overestimating the true cost. This characteristic ensures that the search algorithm, such as A*, can find the shortest or least costly path to the goal.
Here's how they function in the context of A* search:

Estimation — The heuristic function, denoted as
h(n)
, provides an estimated cost from the current noden
to the goal state. 
Admissibility — For
h(n)
to be admissible, it must always be less than or equal to the true cost to reach the goal fromn
, denoted ash*(n)
. This meansh(n) <= h*(n)
for all nodesn
. 
Evaluation Function — In A*, the evaluation function
f(n)
is used to determine the order in which nodes are expanded. It is defined asf(n) = g(n) + h(n)
, whereg(n)
is the actual cost from the start node ton
, andh(n)
is the heuristic estimate fromn
to the goal. 
Optimality — Because admissible heuristics do not overestimate the cost to the goal, A* search is guaranteed to find an optimal solution if one exists, assuming
h(n)
is also consistent. 
Derivation — Admissible heuristics can be derived from a relaxed version of the problem, from pattern databases, or through inductive learning methods.

Consistency — While all consistent heuristics (where the estimated cost from a node to a successor plus the estimated cost from the successor to the goal is less than or equal to the actual cost from the node to the goal) are admissible, not all admissible heuristics are consistent.
In practice, admissible heuristics guide the search algorithm by favoring paths that appear to be leading closer to the goal, thereby reducing the number of paths that need to be considered. This makes the search process more efficient while still ensuring that the solution found is optimal in terms of cost.
What are the benefits of using admissible heuristics?
Admissible heuristics offer several advantages in search algorithms:
 Guaranteed Optimal Path — They ensure that the shortest path to the goal state is found, provided that a path exists.
 Efficiency — Admissible heuristics can be more efficient than other search strategies like breadthfirst search because they only need to explore a part of the search space.
 Problem Simplification — They simplify complex problems by providing a feasible path to the solution, which is particularly useful in AI, computer games, logistics, and navigation systems.
 Reduced Search Space — They can prune large portions of the search space, reducing the number of nodes expanded during the search.
 Resource Management — They help to minimize the system's load by facilitating realtime monitoring of events using fewer resources.
Are there any drawbacks to using admissible heuristics?
While admissible heuristics offer numerous advantages, they also come with certain limitations. For instance, they may sometimes identify suboptimal paths due to their focus on the distance to the goal state during node expansion. The process of finding the right admissible heuristic can be a trialanderror exercise, potentially leading to errors.
There's also a risk of oversimplifying complex problems when designing a heuristic, which could result in underutilization of available information and suboptimal solutions. Despite being admissible, these heuristics do not always guarantee computational efficiency, as some may still lead to excessive computation or memory usage.
Lastly, designing admissible heuristics can be challenging, but the effort is often justified by their crucial role in ensuring the correctness of search algorithms.