Skip to content

Commit 490cee6

Browse files
authored
Create README.md
1 parent 85c24ba commit 490cee6

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# D* Path Planning Algorithm
2+
3+
### D* Lite Pathfinding Visualization
4+
This project implements a visualization of the D* Lite pathfinding algorithm on a 2D grid map using Python. D* Lite is designed for efficient path planning in dynamic environments where obstacles may appear or disappear over time. Unlike traditional A*, which recomputes paths from scratch, D* Lite incrementally updates its existing path, making it ideal for real-time robotic navigation.
5+
6+
The project features:
7+
- Interactive 2D grid map with dynamic obstacle updates
8+
- Visual explanation of node expansion and path repair
9+
- Clean Python implementation with clear data structures
10+
11+
This tool is useful for students and researchers learning about adaptive pathfinding, autonomous agents, and search-based planning.
12+
13+
## DEMO
14+
![螢幕錄影 Jun 17 2025 (1)](https://github.com/user-attachments/assets/a5c7630c-4e00-4258-b2c9-05d140d0ed41)
15+
16+
### Installation
17+
clone the repository
18+
```bash
19+
20+
git clone https://github.com/EricChen0104/D_star_lite_Algorithm_PYTHON.git
21+
cd D_star_lite_Algorithm_PYTHON
22+
23+
```
24+
install the requirements
25+
```bash
26+
27+
pip install -r "requirements.txt"
28+
29+
```
30+
31+
## D* Lite Algorithm Introduction
32+
33+
D* Lite is an incremental heuristic search algorithm designed for path planning in dynamic environments. It can be seen as an optimized extension of A*, capable of efficiently updating paths when the map changes (e.g., newly discovered obstacles), rather than recomputing from scratch like standard A*.
34+
35+
### Basic Concepts
36+
Each node maintains two key values:
37+
38+
- `g(n)`: the current known cost from the start node to node `n`
39+
- `rhs(n)`: one-step lookahead value, representing the best cost to reach `n` through any predecessor
40+
41+
The node priority is determined by a key function (similar to A*):
42+
43+
`key(n) = [min(g(n), rhs(n)) + h(start, n), min(g(n), rhs(n))]`
44+
45+
The algorithm always expands the node with the **smallest key**, and incrementally repairs the path when changes occur in the map.
46+
47+
### Heuristic Function h(n)
48+
As with A*, a popular heuristic is the **Manhattan Distance**:
49+
50+
`h(n) = |Xstart - Xn| + |Ystart - Yn|`
51+
52+
This allows D* Lite to maintain efficiency while guaranteeing optimality, even as obstacles change.
53+
54+
## References
55+
- Stentz, A. (1994). The D* algorithm for real-time planning of optimal traverses (p. 34). Carnegie Mellon University, the Robotics Institute.
56+
- https://www.cs.cmu.edu/~motionplanning/lecture/AppH-astar-dstar_howie.pdf
57+

0 commit comments

Comments
 (0)