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.
Incremental search
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 theg-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
- Initialize: set up the
g-valuesandrhs-values. The goal node'srhs-valueis set to zero and every other node's to infinity. - Compute the path: pop nodes from the priority queue and update them until the start node is consistent, meaning its
g-valueandrhs-valueare equal. - Detect changes: watch the environment. When something changes, update the
rhs-valuesof the affected nodes. - 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.
Related reading
- The Dancing Links Algorithm - An explanation that is less explanatory but more on implementation?
- The fastest C algorithm for string testing against a list of predefined seeds case insensitive
- The fastest way execution time to find the longest element in an list
- The intersection of two sorted arrays
- The difference between sess.graph and tf.get_default_graph?
- The following untracked working tree files would be overwritten by merge, but I don''t care
- The loss function and evaluation metric of XGBoost
- The max product of consecutive elements in an array

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 courseData 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.