When A* Performs Worse Than Uninformed Search: A Poor Heuristic Case Study

When A* Performs Worse Than Uninformed Search: A Poor Heuristic Case Study

Verified Sources
Nov 3, 2026

In graph search, A* search relies on a heuristic heuristic function h(n)h(n) to focus exploration. In principle, a “good” heuristic reduces the number of expanded nodes. However, if the heuristic is poorly chosen—especially if it is inconsistent heuristic or effectively misguides the priority ordering—A* can behave much closer to (or even worse than) an uninformed baseline such as uniform-cost search (UCS) or BFS in practice.

A canonical situation where A* can perform worse is when h(n)h(n) severely overestimates or is highly inconsistent, causing A* to repeatedly commit to wrong regions of the state space. With inconsistency, nodes may be reopened/re-expanded (the “thrashing” effect), inflating work beyond what UCS would do because UCS expands purely by increasing g(n)g(n) without being misled by h(n)h(n). This is especially clear in problems where there exist many low-gg nodes that lead to dead ends, while a misleading heuristic makes a large set of longer-gg paths look promising early.

Key learning point: A* is only guaranteed to be optimally efficient (in terms of expansions relative to alternatives) under assumptions about the heuristic. If those assumptions are violated, the heuristic can dominate the search order and produce excessive expansions compared to an uninformed strategy.

A* Search (Heuristics, Admissibility, Consistency) — Educational Overview

Concrete scenario: “Dead-end region” + misleading heuristic (inconsistent/overconfident)

Consider a directed graph (or state space) with:

  • Start SS
  • Goal GG
  • A large dead-end region of states D={d1,…,dN}D=\{d_1,\dots,d_N\} reachable via relatively cheap edges (so they have low gg values early), but from which reaching GG requires a dramatic detour that the heuristic fails to predict.
  • A solution corridor CC that leads to GG but initially involves steps that have higher gg.

Now define a heuristic h(n)h(n) that is poorly chosen:

  • It assigns very small h(n)h(n) to states in the dead-end region DD (making them look closer to the goal than they really are).
  • It assigns very large h(n)h(n) to states in the solution corridor CC (making them appear far).

Then:

  • A* prioritizes nodes in DD because their f(n)=g(n)+h(n)f(n)=g(n)+h(n) is small.
  • It spends substantial time expanding many dead-end branches.
  • If hh is also inconsistent, the search may later find that previously expanded nodes had underestimated/overestimated relationships, causing re-expansions and further increasing total work.

This can yield more expansions than UCS, which ignores hh and expands strictly by g(n)g(n). If UCS quickly discovers the correct-cost route corridor (because its gg-values are competitive), UCS may outperform A* even though A* is “informed.”

How a bad heuristic makes A* thrash and expand more than UCS

  1. 1
    Step 1

    Ensure the graph has a large dead-end region with many reachable nodes of low early path cost gg, and a true solution corridor that requires temporarily higher gg.

  2. 2
    Step 2

    Define h(n)h(n) so dead-end states get artificially small estimates and solution states get artificially large estimates, skewing f(n)f(n) ordering toward DD.

  3. 3
    Step 3

    A* repeatedly pops the smallest f(n)f(n) node from OPEN; it will therefore explore DD first, expanding many nodes that ultimately do not lead to GG.

  4. 4
    Step 4

    Choose h(n)h(n) so it is inconsistent; later discoveries of cheaper paths can cause reopening/re-expanding nodes, increasing the number of expansions beyond a gg-only search.

  5. 5
    Step 5

    UCS expands in increasing g(n)g(n) order; it is not lured into DD by hh, so it may reach the corridor to the goal sooner (with fewer total expansions).

Why this can happen: heuristic dominance + loss of guidance

A* effectively trades off actual cost so far (gg) and estimated cost to go (hh) via f(n)=g(n)+h(n)f(n)=g(n)+h(n) A* search. When hh is badly calibrated:

  • hh can dominate ff, so the search order mostly reflects your heuristic’s errors rather than promising path cost.
  • If hh is inconsistent, A* may not maintain the clean “single expansion” behavior; it can revisit states, increasing total expansions. This is frequently summarized as re-expansion or reopening behavior in A* variants.
  • Even if the heuristic is admissible, a heuristic can still be “admissible but weak,” providing little additional guidance—so A* can degrade toward UCS-like behavior. With inconsistency or overconfidence, it can become worse.

Common misconception

A* being “heuristic-based” does not mean it always expands fewer nodes than uninformed search. A poor (especially inconsistent or overconfident) heuristic can increase expansions via wrong ordering and re-expansions.

Design principle to avoid this failure mode

Prefer heuristics that are at least consistent (monotone). Consistency helps prevent re-expansions and makes A*’s behavior more predictable.

From heuristic choice to performance outcome

Heuristic calibration

1. Choose $h(n)$

If hh is systematically wrong (over/underestimates by region), f-ordering misleads."

Priority ordering

2. A* selects nodes

Wrong ff values send exploration into dead ends and away from the goal corridor."

Re-expansions

3. Discover contradictions (inconsistency)

Inconsistent heuristics can force reopening/re-expanding nodes, increasing work."

Uninformed wins

4. Compare to UCS/BFS

UCS, driven only by gg, may reach the solution with fewer expansions."

Intuition check with a small numeric sketch

Suppose at some early depth you have two frontier nodes:

  • Dead-end candidate dd: g(d)=2g(d)=2, heuristic h(d)=0⇒f(d)=2h(d)=0 \Rightarrow f(d)=2
  • Corridor candidate cc: g(c)=3g(c)=3, heuristic h(c)=50⇒f(c)=53h(c)=50 \Rightarrow f(c)=53

A* will pop dd for expansion. If there are many such did_i with similarly low ff, A* will explore them first. UCS would expand by gg, so it would consider cc earlier when its gg becomes smallest among remaining candidates.

Now add inconsistency: later you might find a path that reduces gg for a previously expanded node, causing additional processing in A*—something UCS would not need to correct because it already expands in nondecreasing gg.

FAQ: Edge cases and how to recognize this failure

Knowledge Check

Question 1 of 3
Q1Single choice

Which situation can cause A* to expand more nodes than an uninformed search like UCS?