Pathfinding
Robotics
D*-Lite
AI Algorithms
Graph Search

D* Lite algorithm: how incremental replanning works

Codemia Knowledge Hub ·

D*-Lite is a pathfinding algorithm for real-time replanning, developed by Sven Koenig and Maxim Likhachev. It is an incremental version of A*: instead of searching from scratch when the map changes, it keeps information from previous searches and repairs only the parts of the path that the change affects. That makes it efficient for robot motion planning in dynamic environments, where static graph searches fall short.

Core ideas

Dynamic replanning

D*-Lite stands for "Dynamic A* Light", and dynamic replanning is its main advantage. Traditional A* runs a full search every time the goal or the map changes. D*-Lite recalculates by reusing what earlier searches found and updating only the affected parts of the path.

Because only regions affected by a change are recalculated, D*-Lite handles frequently changing environments well. This matters for robots, where full recalculation on every change would be computationally expensive.

A simpler D*

D*-Lite is based on the principles of the original D* algorithm. It simplifies D* without losing optimal and complete pathfinding, and gains efficiency by doing its operations in a more streamlined way.

How it works

g-values, rhs-values and the priority queue

D*-Lite keeps a priority queue of nodes that need updating, and uses two values per node to find the shortest path:

  • g-value: the current estimate of the cost from the node to the goal. D*-Lite searches backward, from the goal toward the robot's start position.
  • rhs-value: a one-step lookahead of the g-value.

The algorithm's job is to keep g-values and rhs-values consistent across the graph. A node whose g-value differs from its rhs-value is put in the priority queue to be processed.

Algorithm steps

  1. Initialize: set up the g-values and rhs-values. The goal node's rhs-value is set to zero and every other node's to infinity.
  2. Compute the path: pop nodes from the priority queue and update them until the start node is consistent, meaning its g-value and rhs-value are equal.
  3. Detect changes: watch the environment. When something changes, update the rhs-values of the affected nodes.
  4. Update the path: recalculate the affected nodes in the priority queue to fix any inconsistencies in the shortest paths.

Where D* Lite is used

  • Autonomous vehicles: dynamic pathfinding in road networks where obstacles can appear unexpectedly.
  • Robotic exploration: moving through unknown terrain that is mapped incrementally.
  • Game AI: real-time pathfinding in changing game worlds.

Strengths and limitations

  • Efficiency: reusing earlier results makes D*-Lite much faster in dynamic environments than recalculating paths from scratch.
  • Scalability: it handles large maps and complex environments efficiently.
  • Implementation complexity: although simpler than D*, it still needs careful state management and a clear grasp of node consistency.
  • Dependence on heuristics: performance and optimality depend heavily on the heuristic function chosen.

Course
Intermediate
27 lessons
15 hours
DSA Fundamentals

Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.

View the course
Data Structures & Algorithms practice on Codemia

Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.

Practice algorithms