-
Color coding :
- Unexplored cells ->White
- Blocked cells -> Black
- Start cell -> Blue
- End cell -> Red
- Explored cells -> Pink
- Shortest Path by Dijkstra -> Green
- Shortest Path by A-star -> Yellow
- Green button(PathD-1)-> Dijkstra
- Red button(PathA-2)-> A*
- Distance-1 : Dijkstra path length
- Distance-2 : A* path length
- The horizontal and vertical movement cost -> 1
- Diagonal cost -> √2.
-
Major components :
- Main loop
- Dijkstra program
- A*
-
Implementation :
- Map as 2D array of cells
- Binary representation of cells as 0 and 1 for blocked and open cells
- Each cell has information of its parent and its state of exploration
-
## Build For Linux user ##
- Download the zip file then unzip at the location 'Home':
cd Shortest-path-2D-main
- Install sfml:
sudo apt-get install libsfml-dev - Complile path.cpp :
g++ main.cpp -std=c++11 -lsfml-window -lsfml-system -lsfml-graphics
- Run the exectuable :
./a.out
- Download the zip file then unzip at the location 'Home':
-
Supported operations:
- You can left click on blocks to draw black walls on the grid.
- Search using either Dijkstra or A* pathdinging algorithm by clicking the respective buttons.
-
Notifications
You must be signed in to change notification settings - Fork 0
jainanmol84/Shortest-path-2D
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published

