A search* is a best-first graph traversal algorithm that finds the shortest path from a start node to a goal node. It operates by maintaining a priority queue of paths to explore, prioritizing paths with the lowest estimated total cost. This total cost, denoted f(n), is the sum of the actual cost from the start to the current node, g(n), and a heuristic function, h(n), that estimates the cost from the current node to the goal. The algorithm guarantees an optimal solution if the heuristic is admissible, meaning it never overestimates the true remaining cost.
Glossary
A* Search

What is A* Search?
A* (pronounced "A-star") is a foundational graph traversal and pathfinding algorithm that efficiently finds the lowest-cost path between nodes by combining actual travel cost with a heuristic estimate of the remaining distance to the goal.
The algorithm's efficiency stems from its heuristic guidance, which directs the search toward the goal, unlike uninformed searches like Dijkstra's algorithm that expand equally in all directions. In priority-based routing for heterogeneous fleets, A* can be extended with dynamic costs to account for agent priority, battery levels, or time windows. Variants like Lifelong Planning A (LPA)** and D Lite* enable efficient dynamic replanning when map costs change, making it a cornerstone for real-time navigation in warehouses and logistics.
Key Features and Properties of A*
A* search is defined by its unique combination of a cost function and a heuristic to guarantee optimal, efficient pathfinding. These core properties make it a foundational tool for priority-based routing in heterogeneous fleets.
The Evaluation Function: f(n) = g(n) + h(n)
The algorithm's core is the evaluation function f(n), which determines the priority of exploring a node n. It is the sum of two components:
- g(n): The exact, known cost from the start node to node
n. This accumulates the actual path cost. - h(n): The heuristic function, which estimates the cost from node
nto the goal. This guides the search toward the target. By minimizingf(n), A* balances exploring paths that are already cheap (g(n)) with the promise of being close to the goal (h(n)).
Admissibility: Guarantee of Optimality
An admissible heuristic is one that never overestimates the true cost to reach the goal. This property is critical because it guarantees that A* will find the shortest possible path. If h(n) is admissible, the first time A* expands the goal node, the path discovered is guaranteed to be optimal.
Example: In a grid, the straight-line (Euclidean) or Manhattan distance to the goal is admissible, as it's the shortest possible distance without obstacles.
Consistency (Monotonicity): Efficiency in Graph Search
A stronger property than admissibility is consistency (or monotonicity). A heuristic is consistent if for every node n and its successor n', the estimated cost from n to the goal is no greater than the cost of moving to n' plus the estimated cost from n' to the goal: h(n) ≤ c(n, n') + h(n').
A consistent heuristic ensures that f(n) is non-decreasing along any path. This means A* finds the optimal path without needing to re-expand nodes, making it more computationally efficient.
Best-First Search with a Priority Queue
A* is implemented as a best-first search using a priority queue (typically a min-heap). The queue, called the open set, stores nodes to be explored, prioritized by their f(n) score.
Process:
- Start node is added to the open set.
- The node with the lowest
f(n)is popped and expanded. - Its neighbors are evaluated (
gandfscores calculated) and added to the open set. - The algorithm terminates when the goal node is popped from the queue.
Trade-off: Heuristic Accuracy vs. Computation
The choice of heuristic creates a fundamental trade-off:
- Perfect Heuristic (
h(n)= true cost): A* would expand nodes only on the optimal path, achieving minimal search effort. This is rarely possible. - Zero Heuristic (
h(n)= 0): A* degenerates into Dijkstra's Algorithm, which is optimal but may explore many unnecessary nodes. - Strong, Admissible Heuristic: A heuristic that provides a tight, accurate estimate (like Euclidean distance) dramatically reduces the search space (nodes expanded) while maintaining optimality. The closer
h(n)is to the true cost without exceeding it, the more efficient A* becomes.
Applications in Fleet Orchestration
In heterogeneous fleet orchestration, A* is adapted for priority-based routing:
- Dynamic Cost Maps: The
g(n)cost can incorporate real-time factors like congestion zones, floor traction, or no-go areas for specific agent types. - Priority as Cost: A high-priority task can be modeled by reducing the perceived
g(n)cost along its potential path, causing the algorithm to favor it. - Multi-Objective Heuristics:
h(n)can estimate not just distance, but time-to-deadline or energy consumption, guiding agents toward routes that satisfy multiple constraints. This makes A* not just a pathfinder, but a core planner for efficient, prioritized spatial-temporal scheduling.
A* Search vs. Other Pathfinding Algorithms
A comparison of key algorithmic properties for priority-based routing in heterogeneous fleet orchestration.
| Feature / Metric | A* Search | Dijkstra's Algorithm | Greedy Best-First Search | D* Lite |
|---|---|---|---|---|
Algorithm Type | Best-first, heuristic-informed | Uniform-cost, uninformed | Best-first, heuristic-only | Incremental, heuristic-informed |
Optimality Guarantee | Yes (with admissible heuristic) | Yes | No | Yes (with admissible heuristic) |
Completeness Guarantee | Yes | Yes | No (can get stuck in loops) | Yes |
Primary Use Case | Static graph with a good heuristic | Single-source shortest paths | Fast, approximate pathfinding | Dynamic environments with cost changes |
Time Complexity (Worst-Case) | O(b^d) | O((V+E) log V) | O(b^m) | O((V+E) log V) per replan |
Space Complexity (Worst-Case) | O(b^d) | O(V) | O(b^m) | O(V) |
Heuristic Dependency | Guiding (f(n)=g(n)+h(n)) | None (f(n)=g(n)) | Sole driver (f(n)=h(n)) | Guiding (like A*) |
Suitability for Dynamic Replanning | Low (replan from scratch) | Low (replan from scratch) | Low | High (incremental updates) |
Typical Application in Fleet Orchestration | Global, optimal initial route planning | Calculating all-pairs shortest paths for a map | Rapid, sub-optimal exploration | Real-time obstacle avoidance and route updates |
Frequently Asked Questions About A* Search
A* (pronounced 'A-star') is a foundational graph traversal and pathfinding algorithm. It is a cornerstone of priority-based routing in heterogeneous fleet orchestration, enabling efficient, optimal path planning for autonomous mobile robots and logistics systems.
A search* is a best-first graph traversal and pathfinding algorithm that finds the lowest-cost path from a start node to a goal node. It works by maintaining a priority queue of nodes to explore, ordered by a total estimated cost function f(n) = g(n) + h(n), where g(n) is the exact cost from the start node to node n, and h(n) is a heuristic function estimating the cost from n to the goal. At each step, it expands the node with the lowest f(n), guaranteeing an optimal path if the heuristic is admissible (never overestimates the true cost).
In practice for fleet orchestration, nodes represent locations, edges represent traversable paths with costs (distance, time, energy), and the heuristic might be the straight-line distance to the goal, guiding autonomous mobile robots efficiently through a warehouse grid.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms in Pathfinding and Optimization
A* Search is a cornerstone of efficient routing, but it operates within a broader ecosystem of algorithms and data structures designed for optimization. These related concepts are essential for building robust priority-based routing systems.
Dijkstra's Algorithm
Dijkstra's algorithm is a foundational graph search algorithm that finds the shortest paths from a single source node to all other nodes in a graph with non-negative edge weights. It operates by iteratively exploring the nearest unvisited node, guaranteeing optimality but without the goal-directed efficiency of A*.
- Key Difference: Lacks a heuristic function, treating all unexplored paths equally.
- Use Case: Ideal for scenarios where the entire cost map is needed or no admissible heuristic is available.
- Foundation: A* can be seen as an extension of Dijkstra's that uses a heuristic to guide the search.
Heuristic Function
A heuristic function is a problem-specific estimation technique used in informed search algorithms like A* to approximate the cost from a given state to the goal state. It guides the search towards more promising paths, dramatically improving efficiency over blind search.
- Admissibility: For A* to guarantee optimality, the heuristic must never overestimate the true cost to the goal (e.g., Euclidean or Manhattan distance for grid maps).
- Consistency (Monotonicity): A stronger property ensuring the heuristic estimate from a node to the goal is not greater than the step cost to a successor plus the estimate from that successor.
- Design Trade-off: More accurate heuristics lead to fewer expanded nodes but may be computationally expensive to calculate.
Priority Queue
A priority queue is an abstract data type that manages a set of elements each with an associated priority. Elements with the highest (or lowest) priority are served first. It is the core data structure for efficiently selecting the next node to explore in A* Search.
- Implementation: Typically implemented with a binary heap or Fibonacci heap, providing O(log n) time for insert and extract-min operations.
- In A*: Used to store the open set, ordered by the sum
f(n) = g(n) + h(n), whereg(n)is the cost from the start andh(n)is the heuristic estimate to the goal. - Critical Role: The efficiency of the priority queue's operations directly impacts the overall performance of the A* algorithm.
Dynamic Replanning (LPA*, D* Lite)
Dynamic replanning refers to algorithms that efficiently update paths when the environment changes, without recomputing from scratch. Lifelong Planning A (LPA)** and D Lite* are incremental versions of A* designed for this purpose.
- LPA*: Reuses previous search results to find a new optimal path after edge cost changes, maintaining consistency between searches.
- D Lite*: Specifically designed for navigation in partially unknown environments, often used in robotics. It replans from the goal back to the start, efficiently handling new obstacle discoveries.
- Application: Essential for real-world logistics and robotics where maps are updated with new obstacles, traffic, or agent positions.
Vehicle Routing Problem (VRP)
The Vehicle Routing Problem is a combinatorial optimization problem that seeks the optimal set of routes for a fleet of vehicles to service a set of customers. It generalizes the Traveling Salesperson Problem and is a core challenge in logistics.
- VRP with Time Windows (VRPTW): A critical variant where deliveries must occur within specified time intervals, adding a temporal constraint to spatial routing.
- Relation to A*: A* is often used as a subroutine within VRP solvers to find the shortest path between two customer locations on a road network graph.
- Complexity: Solving VRP optimally is NP-hard, leading to the use of metaheuristics (genetic algorithms, local search) that incorporate pathfinding algorithms like A*.
Multi-Objective Optimization & Pareto Frontier
Multi-objective optimization deals with problems involving multiple, often conflicting, objectives (e.g., minimize travel time, minimize energy use, maximize safety). The Pareto frontier is the set of all optimal trade-off solutions.
- Pareto Optimal: A solution where no objective can be improved without worsening another.
- Beyond A*: Standard A* minimizes a single cost function. Multi-objective A* (MOA*) variants search for the set of Pareto-optimal paths.
- Use in Routing: Essential for heterogeneous fleet orchestration, where different agent types (e.g., fast AMR vs. efficient manual cart) have different cost profiles for the same route.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us