Path planning with different graph algorithms in 2dgrid using pygame.
- Repository Structure
├── media/
│ ├── astar.gif
│ ├── bfs.gif
│ ├── dfs.gif
│ ├── dijkstra.gif
│ ├── gridMap.png
│ └── path_plan_demo.mp4 # demonstration of using the plan_path.py file
├── path_plan_algorithms/
│ ├── astar.py # A* algo
│ ├── bfs.py # BFS algo
│ ├── dfs.py # DFS algo
│ ├── dijkstra.py # Dijkstra algo
│ └── pygame_visualize.py # visualizing grid & colors on pygamw window
├── path_plan.py # main file to run the project
└── README.md- python 3.10.12
- pygame 2.6.1
Install pygame in your system
pip3 install pygame==2.6.1- Clone this repo in your system
cd ~
git clone https://github.com/ab31mohit/path_finding.git- Run the path_plan.py file to execute the program
cd ~/path_finding
python3 path_plan.pyORANGE color --> START node
TURQUOISE color --> END node
PURPLE color --> Path
| A* Algorithm | Dijkstra Algorithm |
|---|---|
![]() |
![]() |
| BFS Algorithm | DFS Algorithm |
|---|---|
![]() |
![]() |
Here is a video that demonstrates how to use the instructions in plan_path.py file for
- defining (start, end) points
- creating obstacles
- running different algorithms
- clearing pygame window



