An A* search reaches a goal and returns a route. Whether that route has minimum cost depends on more than the algorithm's name. The heuristic, goal-test timing, and treatment of improved paths to previously expanded nodes all matter.
Admissibility and consistency describe different relationships between a heuristic and the graph's costs. Their consequences become visible in very small examples, before a robot map or collision model is introduced.
The following graphs are invented and finite. Every listed edge is directed, every edge cost is strictly positive, and no unlisted edges exist. Costs are abstract additive units. Nothing here establishes physical clearance, executable robot motion, or a validated navigation result.
Define the search policy
Let g(n) be the best known cost from start S to node n. Let h(n) estimate the remaining cost to goal G. A* prioritizes the smallest f(n) = g(n) + h(n).
For the initial traces, keep the best known g value, update a node when a cheaper route is found, and ignore obsolete queue entries. Test for success when G is removed as the current minimum-priority frontier node, not merely when an edge first discovers it.
The UC Berkeley CS188 Informed Search text defines the A* priority and admissibility. Poole and Mackworth's author-hosted Artificial Intelligence text discusses consistency and the consequences of pruning repeated paths. Those references establish the terminology. All graph structures and traces below are original.
An overestimate hides the cheaper branch
Consider four edges:
S to A costs 2.
A to G costs 2.
S to B costs 1.
B to G costs 5.
The route S–A–G costs 4. The other route S–B–G costs 6.
Choose h(S) = 0, h(A) = 10, h(B) = 0, and h(G) = 0. After expanding S, node A has g = 2 and f = 12, while B has g = 1 and f = 1.
The search therefore removes B first. Its successor G receives g = 6 and f = 6. The frontier now holds G at priority 6 and A at priority 12.
Under the stated goal-pop policy, G is removed next and the search returns cost 6. The cost-4 route remains unexamined behind A's inflated priority. No collision, missing edge, or arithmetic error was needed to produce this outcome.
The heuristic at A overestimates its true remaining cost, which is 2. This example shows that an overestimate can cause a suboptimal return under this policy. It does not claim that every overestimating heuristic must fail on every graph.
Admissibility compares against the true remaining optimum
For this discussion, an admissible heuristic satisfies 0 ≤ h(n) ≤ h_star(n), where h_star is the minimum remaining cost in the graph and h(G) = 0.
On the same first graph, choose h(S) = 4, h(A) = 2, h(B) = 5, and h(G) = 0. These are the true remaining costs.
After S is expanded, A has f = 4 and B has f = 6. Expanding A discovers G with cost 4, and the search returns that cheaper route when G is removed next.
Setting every heuristic value to zero would also avoid overestimation. It turns the priority into g alone. A useful heuristic can guide expansion more specifically, but a larger estimate is not automatically more trustworthy.
Consistency also compares neighboring estimates
For an edge from n to m with cost c(n,m), the usual consistency condition is:
h(n) ≤ c(n,m) + h(m).
Together with h(G) = 0, this condition along every edge prevents the estimate from dropping faster than the cost paid to traverse an edge. Along a candidate path, it makes f nondecreasing when the path is extended.
Adding the edge inequalities along any route to G gives h(n) no greater than that route's cost. Thus consistency implies admissibility for nodes that can reach the goal. Admissibility alone does not impose every local edge inequality.
The first graph's exact remaining-cost heuristic is consistent. For example, at S to A, 4 ≤ 2 + 2 holds with equality.
An admissible heuristic can still need reopening
Use a different directed graph:
S to P costs 3.
S to Q costs 1.
Q to P costs 1.
P to G costs 3.
The cheaper route is S–Q–P–G, costing 5. The direct-through-P route costs 6.
Set h(S) = 0, h(P) = 0, h(Q) = 4, and h(G) = 0. These estimates are admissible: the true remaining costs at P and Q are 3 and 4.
But the edge Q to P violates consistency because 4 is greater than 1 + 0.
After expanding S, P has f = 3 and Q has f = 5. P is removed first and generates G with cost 6. Q is removed next and finds a cheaper route to P, with g = 2 instead of 3.
A policy that permanently closed P on its first expansion and refuses to reopen it discards that improvement's opportunity to update the goal route. It can then return G at cost 6.
If the improved P is reopened, its priority is 2. Expanding it updates G to cost 5, and the search returns the cheaper path. The distinction is the duplicate-path policy, not a change to the graph or heuristic.
A guarantee belongs to a complete algorithm description
With a consistent heuristic and the usual best-cost bookkeeping, a node's first expansion can be treated differently from the inconsistent case illustrated above. With admissibility but possible inconsistency, an appropriate reopening policy preserves information that permanent closure could discard.
These statements assume the declared finite graph and fixed costs. Changing edge costs during a search, mixing heuristic units with cost units, or testing the goal at discovery creates a different algorithmic problem.
A route's graph cost also measures only the chosen objective. It does not verify that the graph represents the robot and environment accurately or that traversing an edge is physically valid.
The useful A* record therefore preserves the graph, cost definition, heuristic properties, goal-test policy, and handling of improved paths. “A* found a goal” is an event. A minimum-cost claim requires the assumptions that make that event meaningful.
Sources checked October 23, 2026
UC Berkeley CS188, Informed Search, official course textbook web edition:
https://inst.eecs.berkeley.edu/~cs188/textbook/search/informed.html
David Poole and Alan Mackworth, Artificial Intelligence: Foundations of Computational Agents, third-edition author-hosted text, Section 3.7, Pruning the Search Space:
https://artint.info/3e/html/ArtInt3e.Ch3.S7.html
The opened pages do not display page-specific revision dates; none are inferred. No source graphs, figures, or worked examples are reproduced.
Illustration note: The site-library concept image shows a robot beside a laptop in a workflow scene. It does not show an executed A* trace, a validated map, or verified collision avoidance.