The D algorithm* (pronounced "D star") is an incremental search algorithm that efficiently replans optimal paths from a robot's current position to a goal in partially known or dynamically changing environments. Developed by Anthony Stentz, it is a core real-time replanning engine that repairs a previously computed path by locally updating a cost map when new obstacle information is discovered, avoiding the computational expense of a complete search from scratch. This makes it highly effective for autonomous navigation where sensor data reveals unforeseen barriers.
Glossary
D* Algorithm

What is the D* Algorithm?
A definitive guide to the D* algorithm, a foundational incremental search method for dynamic path planning in robotics and autonomous systems.
The algorithm operates by maintaining and incrementally repairing a backpointer map towards the goal, originally computed using a backward search from the goal. When the cost of a cell increases (e.g., an obstacle is detected), D* efficiently propagates these cost changes through relevant parts of the graph, a process known as state propagation. Its key innovation is reusing the heuristic values and path structure from prior computations, enabling fast reactive navigation. Variants like D Lite* have simplified its implementation, cementing its role in heterogeneous fleet orchestration for logistics and warehousing.
Key Features of the D* Algorithm
The D* algorithm is an incremental search algorithm that efficiently replans paths in partially known or changing environments by reusing information from previous searches to repair the cost map and path.
Incremental Replanning
The core innovation of D* is its ability to incrementally repair a previously computed optimal path when edge costs in the graph change. Instead of discarding all prior work and restarting a search from scratch (like A*), D* reuses the previous search tree and efficiently updates only the states affected by the cost changes. This makes it orders of magnitude faster for repeated replanning in dynamic environments, such as a robot navigating around newly discovered obstacles.
Lifelong Planning with Backpointers
D* maintains two key values for each state (node) in the graph:
- RHS (Right-Hand Side) Value: A one-step lookahead cost, computed as the minimum of the costs to move to a neighbor plus that neighbor's cost-to-goal.
- G (Cost-to-Goal) Value: The current estimated optimal cost from that state to the goal. A state is consistent if G = RHS. D* propagates cost changes by identifying inconsistent states (where G ≠ RHS) and efficiently updating them and their neighbors, using backpointers to track the optimal next step toward the goal. This process continues until the robot's current state is consistent, guaranteeing an optimal path given the updated map.
Reverse Search from Goal
Unlike forward search algorithms like A* that search from the start to the goal, D* performs a reverse search. It initializes the search from the goal state and propagates cost-to-goal values outward. This orientation is critical for efficiency in mobile robotics:
- The robot only needs to replan from its current position, not from the original start.
- As the robot moves, it follows the backpointers from its current state toward the consistently calculated goal.
- When an obstacle is sensed, cost changes are propagated, but the goal remains fixed, allowing the algorithm to locally repair the path ahead of the robot.
Focused Repair with a Priority Queue
D* uses a priority queue to manage the repair process efficiently. The queue is ordered by a key function (typically a 2-tuple: [min(G, RHS) + heuristic; min(G, RHS)]). This ensures the algorithm:
- Focuses expansion on states most likely to affect the path from the robot's current position to the goal.
- Processes states in an optimal order, similar to A*, but for the repair operation.
- Terminates early once the robot's current state becomes consistent, meaning a new optimal path from its location is known, without necessarily repairing the entire graph.
Handling Partially Known Environments
D* was explicitly designed for partially known or unknown environments, a common scenario in robotics. The algorithm operates in two main phases:
- Initial Planning: Uses the initially known map (which may have large unknown areas treated as traversable) to compute an initial optimal path.
- Execution and Repair: As the robot moves and its sensors reveal the true cost of states (e.g., discovering an obstacle), it updates the cost map. D* then incrementally repairs the cost-to-goal values and path. This allows a robot to navigate optimally with respect to what it has observed so far, replanning only when new information invalidates its current plan.
Comparison to D* Lite & LPA*
D Lite* is a modern, simplified reinterpretation of D* that is algorithmically equivalent but much easier to implement. Its key features:
- Formalizes D as an incremental version of A**, building directly on the Lifelong Planning A (LPA)** framework.
- Maintains identical logic using RHS values, consistency, and a priority queue.
- Reverses search direction by cleverly modifying the heuristic function, making the code structure nearly identical to A*.
- Becomes the de facto standard in robotics due to its simplicity and proven performance. Most modern implementations referenced as 'D*' are actually D* Lite.
How the D* Algorithm Works
The D* algorithm is an incremental search algorithm that efficiently replans paths in partially known or changing environments by reusing information from previous searches to repair the cost map and path.
The D* algorithm is an incremental search method for path planning in unknown or dynamic environments. Unlike A*, which plans from scratch, D* starts with an initial plan and efficiently repairs it when obstacles are discovered or costs change. It does this by propagating cost changes backward from affected states, reusing the heuristic and cost-to-go values from the prior search. This makes it highly efficient for real-time navigation where the map is updated by sensor data.
The algorithm operates by maintaining two key values for each state: a rhs-value, a one-step lookahead cost estimate, and a g-value, the current best-known cost. When an edge cost increases (e.g., a new obstacle), D* updates the rhs-values of affected states and places them on a priority queue. It then processes states in order of potential cost change, locally propagating corrections until the path to the goal is consistent and optimal again. This focused repair is far faster than global replanning.
D* Algorithm Use Cases and Applications
The D* algorithm is an incremental search method designed for efficient path replanning in partially known or dynamic environments. Its core strength lies in reusing previous search information to repair paths when obstacles appear or costs change, rather than planning from scratch.
Robotic Navigation in Unknown Terrain
D* is foundational for autonomous robots exploring unmapped environments. The robot plans an initial path based on prior knowledge. As it moves and its sensors (e.g., LIDAR) detect unforeseen obstacles—like a newly closed door or a fallen object—D* incrementally repairs the cost map and updates the optimal path from the robot's current position to the goal. This allows for continuous, real-time navigation without costly complete re-searches, making it ideal for search-and-rescue or planetary rovers.
Autonomous Vehicle Re-routing
In dynamic urban settings, D* enables vehicles to react to sudden road changes. When a primary route is blocked by an accident, construction, or a traffic jam, the vehicle's perception system updates the cost graph. D* efficiently propagates cost changes from the blocked edges, recalculating a new optimal route from the vehicle's current node. This is more efficient than A* for frequent, localized changes, providing drivers with near-instantaneous alternate directions.
Real-Time Strategy (RTS) Game AI
Game AI uses D* to manage unit pathfinding in dynamically changing battlefields. The map is a grid where costs can change instantly—a bridge is destroyed, a wall is erected, or an area becomes hazardous. For a squad of units, D* allows the AI to minimally adjust the paths of all affected units by repairing the shared graph, preventing computational spikes that would cause lag. This ensures smooth, responsive unit control even during chaotic gameplay.
Logistics & Warehouse Robotics
In automated warehouses, Autonomous Mobile Robots (AMRs) use D* for material transport. The floor plan is known, but dynamic obstacles—like human workers, dropped packages, or other robots—are constant. D* allows each robot to reactively replan its path to its picking station or drop-off point. By focusing computation only on the changed area of the graph, the system maintains high throughput and avoids deadlocks without overloading the central planner.
Comparison with A* and D* Lite
- A*: Optimal for single, static searches. Must replan from scratch for any change, which is computationally expensive in dynamic settings.
- D*: The original incremental algorithm. Maintains a complex OPEN list to propagate cost changes both forward and backward, optimal for reversing direction if needed (e.g., backing out of a dead-end).
- D Lite*: A modern simplification. Equivalent to Lifelong Planning A* in behavior but often simpler to implement. It is now more commonly used than original D* due to its efficiency and clarity, while solving the same class of dynamic replanning problems.
Key Technical Mechanism: Backpointer Repair
The efficiency of D* stems from its backpointer repair process. When an edge cost increases (e.g., an obstacle appears), the algorithm raises the cost of the affected node and places it on a priority queue. It then recursively propagates this cost increase to predecessor nodes, updating their costs and backpointers (pointers to the next optimal node) only where necessary. This local propagation avoids re-exploring the entire graph, which is the source of its incremental speed.
D* vs. Other Path Planning Algorithms
A feature-by-feature comparison of the D* algorithm against other prominent path planning and replanning methods, highlighting their suitability for dynamic, real-time environments in heterogeneous fleet orchestration.
| Feature / Metric | D* (Dynamic A*) | A* | Lifelong Planning A* (LPA*) | Rapidly-exploring Random Tree (RRT) |
|---|---|---|---|---|
Core Algorithm Type | Incremental heuristic search | Heuristic graph search | Incremental heuristic search | Sampling-based planning |
Optimality Guarantee | Yes (for updated graph) | Yes (with admissible heuristic) | Yes (for updated graph) | No (asymptotically optimal with RRT*) |
Designed for Dynamic Environments | ||||
Reuses Prior Search Information | ||||
Replanning Efficiency | High (localized cost updates) | Low (complete re-search) | High (localized cost updates) | Medium (new tree from scratch) |
Handles Unknown/Partially Known Maps | ||||
Primary Use Case | Real-time navigation with sensor updates | Static map, single query planning | Repeated planning on changing graphs | High-DOF, kinodynamic planning |
Typical Replanning Time | < 100 ms |
| < 100 ms | 100-1000 ms |
Supports Kinodynamic Constraints | ||||
Decentralized Multi-Agent Compatibility |
Frequently Asked Questions
The D* algorithm is a cornerstone of real-time replanning for autonomous systems. These FAQs address its core mechanics, applications, and how it compares to other pathfinding methods.
The D algorithm* (pronounced "D star") is an incremental search algorithm that efficiently replans optimal paths in partially known or dynamically changing environments by reusing information from previous searches.
It works by initially performing a backward search from the goal to the start using a method similar to A*, which populates each node with a cost-to-goal value (rhs and g values). When the robot executes the path and encounters an unexpected obstacle or cost change, D* does not recompute the entire graph. Instead, it locally repairs the cost map. It identifies affected nodes, updates their cost values, and propagates these changes through a priority queue, efficiently finding a new optimal path from the robot's current position to the goal. This focus on repairing only the changed parts of the graph makes it significantly faster than replanning from scratch.
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
The D* algorithm exists within a family of search and replanning methods designed for robotics and autonomous navigation. These related concepts provide context for its incremental, efficient approach to pathfinding in dynamic environments.

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