A* Search Explainer
A* search finds a path by ranking frontier nodes with two quantities: the cost already incurred from the start and a heuristic estimate of the remaining cost to the goal. Their sum guides which node is expanded next.
A heuristic that never overestimates the true remaining cost is called admissible. With suitable assumptions, admissibility allows A* tree search to return an optimal solution. For graph search, consistency is a common stronger condition that simplifies repeated-state handling.
A* is widely used for route finding, games, robotics, and planning. A more informative heuristic usually reduces the number of expanded nodes, but calculating that heuristic may require additional time.
The algorithm can consume substantial memory because it retains a frontier and records explored states. Large problems may require bounded-memory variants, hierarchical planning, approximation, or domain-specific pruning rather than a straightforward implementation.
A* search ranks candidate paths using the cost already paid plus a heuristic estimate of the cost remaining.
Key terms include A star, path cost, heuristic, evaluation function, frontier, admissible heuristic, consistent heuristic, optimality and graph search.
A* balances the known expense of reaching a node with an estimate of what remains, instead of relying on only one signal.
This balance lets it favor promising routes without ignoring the actual cost already accumulated.
An admissible or consistent heuristic can preserve useful guarantees, while a more accurate estimate often reduces expansions.
Memory may still dominate on large state spaces, even when the heuristic is strong.
Explore more "Explainers"
Discover additional explainers across politics, science, business, technology, and other fields. Each explainer breaks down a complex idea into clear, everyday language—helping you better understand how major concepts, systems, and debates shape the world around us.
