Skip to content

A-star algorithm

A (pronounced "A-star") is a graph traversal and pathfinding algorithm that is used in many fields of computer science due to its completeness, optimality, and optimal efficiency.*

Core Idea

A-star algorithm is treated here as the recurring mathematicslogicstatistics identity summarized by this source-grounded definition: A (pronounced "A-star") is a graph traversal and pathfinding algorithm that is used in many fields of computer science due to its completeness, optimality, and optimal efficiency. A (pronounced "A-star") is a graph traversal and pathfinding algorithm that is used in many fields of computer science due to its completeness, optimality, and optimal efficiency. Given a weighted graph, a source node and a goal node, the algorithm finds the shortest path (with respect to the given weights) from source to.

How would you explain it like I'm…

Smart Shortest-Path Finder

Imagine finding the shortest way through a maze of roads to your friend's house. At every turn you think, 'how far have I come, and about how far is still left?' and you try the most promising road next. A-star is a way computers do this so they find the shortest route without checking every single road.

Guess-Ahead Route Finder

The A-star (A*) algorithm finds the shortest path from a start to a goal in a network of places connected by roads with different lengths — computer scientists call this a weighted graph. It keeps a list of places to explore and always picks the one that looks best, based on the distance travelled so far plus a guess of the distance still to go. This lets it head toward the goal instead of spreading out in every direction. It was published in 1968 by researchers at Stanford Research Institute and builds on an older method called Dijkstra's algorithm. Its main weakness is that it can use a lot of memory.

Heuristic-Guided Shortest-Path Search

A* is a graph traversal and pathfinding algorithm: given a weighted graph, a source node and a goal node, it finds the shortest path with respect to the weights. It extends Dijkstra's algorithm by ranking nodes to explore using the cost so far plus an estimate of the remaining cost to the goal, which focuses the search. It is valued for being complete (it finds a path if one exists), optimal (the path it finds is shortest), and optimally efficient. Its big practical drawback is memory: it can need space that grows like b^d, where b is the branching factor and d is the depth of the shortest solution. In real-world travel routing, methods that pre-process the map or limit memory often beat it, but A* is still the best choice in many cases.

 

A* is a best-first graph search and pathfinding algorithm, published in 1968 by Peter Hart, Nils Nilsson and Bertram Raphael of Stanford Research Institute. Given a weighted graph, a source and a goal, it returns a shortest path with respect to the edge weights. It can be seen as an extension of Dijkstra's algorithm: nodes are expanded in order of the path cost from the source plus a heuristic estimate of the remaining cost to the goal, which directs search toward the goal. It is widely used because of its completeness, optimality, and optimal efficiency (guarantees that depend on the heuristic satisfying the appropriate conditions). Its chief practical drawback is O(b^d) space complexity, where b is the branching factor and d the depth of the shallowest solution. In travel-routing systems it is often outperformed by algorithms that preprocess the graph and by memory-bounded approaches, but it remains the best solution in many settings.

Scope of Application

  • Admissibility. If the heuristic function used by A is admissible, then A is admissible.

  • Applications. A is often used for the common pathfinding problem in applications such as video games, but was originally designed as a general graph traversal algorithm.

  • History. Graph Traverser is guided by a heuristic function , the estimated distance from node to the goal node: it entirely ignores , the distance from the start node to .

  • History. Peter Hart invented the concepts we now call admissibility and consistency of heuristic functions.

  • History. The original 1968 A paper contained a theorem stating that no A-like algorithm could expand fewer nodes than A if the heuristic function is consistent and A's tie-breaking rule is suitably.

Clarity

A clear use of A-star algorithm names the carrier, the operative relation, and the conditions under which the source treats the identity as present. The minimal definition is A (pronounced "A-star") is a graph traversal and pathfinding algorithm that is used in many fields of computer science due to its completeness, optimality, and optimal efficiency.

Manages Complexity

A-star algorithm compresses multiple mathematicslogicstatistics details into a stable diagnostic relation. The source shows both the central mechanism—graph Traverser is guided by a heuristic function , the estimated distance from node to the goal node: it entirely ignores , the distance from the start node to .—and the practical consequence—remark: In this pseudocode, if a node is reached by one path, removed from openset , and subsequently reached by a cheaper.

Abstract Reasoning

  1. Type the carrier. Identify the mathematicslogicstatistics entities to which the claim applies.
  2. State the relation. Use the source-grounded identity: A (pronounced "A-star") is a graph traversal and pathfinding algorithm that is used in many fields of computer science due to its completeness, optimality, and optimal efficiency.
  3. Check operation and conditions. It does this by maintaining a tree of paths originating at the start node and extending those paths one edge at a time until the goal node is reached.
  4. Demand recognition evidence.

Knowledge Transfer

Within the home domain. Knowledge about A-star algorithm transfers literally when a new case preserves the same carrier type, relation, and recognition test. If the heuristic function used by A is admissible, then A is admissible. A is often used for the common pathfinding problem in applications such as video games, but was originally designed as a general graph traversal algorithm. Beyond the home domain. No canonical parent is asserted for A-star algorithm.

Relationships to Other Abstractions

Local relationship map for A-star algorithmParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.A-star algorithmDOMAINDomain-specific abstraction: Search Algorithm — is a kind ofSearch AlgorithmDOMAIN

Current abstraction A-star algorithm Domain-specific

Parents (1) — more general patterns this builds on

  • A-star algorithm is a kind of Search Algorithm Domain-specific

    A* is a search algorithm that orders graph exploration by accumulated cost plus a heuristic estimate.

Hierarchy paths (6) — routes to 5 parentless roots

Neighborhood in Abstraction Space

A-star algorithm sits in a moderately populated region (47th percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Combinatorial Optimization & Discrete Structures (31 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-08