What is an admissible heuristic?

Stephen M. Walker II · Co-Founder / 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 non-admissible heuristic is used in an algorithm, it may or may not result in an optimal solution. But, sometimes non-admissible 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:

  1. Estimation — The heuristic function, denoted as h(n), provides an estimated cost from the current node n to the goal state.

  2. Admissibility — For h(n) to be admissible, it must always be less than or equal to the true cost to reach the goal from n, denoted as h*(n). This means h(n) <= h*(n) for all nodes n.

  3. Evaluation Function — In A*, the evaluation function f(n) is used to determine the order in which nodes are expanded. It is defined as f(n) = g(n) + h(n), where g(n) is the actual cost from the start node to n, and h(n) is the heuristic estimate from n to the goal.

  4. 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.

  5. Derivation — Admissible heuristics can be derived from a relaxed version of the problem, from pattern databases, or through inductive learning methods.

  6. 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:

  1. Guaranteed Optimal Path — They ensure that the shortest path to the goal state is found, provided that a path exists.
  2. Efficiency — Admissible heuristics can be more efficient than other search strategies like breadth-first search because they only need to explore a part of the search space.
  3. 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.
  4. Reduced Search Space — They can prune large portions of the search space, reducing the number of nodes expanded during the search.
  5. Resource Management — They help to minimize the system's load by facilitating real-time 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 can still expand many nodes compared to more aggressive but inadmissible heuristics, which can increase runtime or memory usage. The process of finding the right admissible heuristic can be a trial-and-error 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 sub-optimal 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.

More terms

Continue exploring the glossary.

Learn how teams define, measure, and improve LLM systems.

Glossary term

What is probabilistic programming?

Probabilistic programming is a programming paradigm designed to handle uncertainty by specifying probabilistic models and automating the process of inference within these models. It integrates traditional programming with probabilistic modeling, allowing for the creation of systems that can make decisions in uncertain environments. This paradigm is particularly useful in fields such as machine learning, where it can simplify complex statistical programming tasks that would traditionally require extensive code.
Read term

Glossary term

What is the situated approach in AI?

The situated approach in AI refers to the development of agents that are designed to operate effectively within their environment. This approach emphasizes the importance of creating AI systems "from the bottom-up," focusing on basic perceptual and motor skills necessary for an agent to function and survive in its environment. It de-emphasizes abstract reasoning and problem-solving skills that are not directly tied to interaction with the environment.
Read term

It's time to build

Collaborate with your team on reliable Generative AI features.
Want expert guidance? Book a 1:1 onboarding session from your dashboard.

Talk to sales