Skip to content

jainanmol84/Shortest-path-2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shortest-path-2D

GIF WhatsApp Video 2020-12-19 at 5 32 27 PM WhatsApp Video 2020-12-19 at 5 36 30 PM

  1. Color coding :

    1. Unexplored cells ->White
    2. Blocked cells -> Black
    3. Start cell -> Blue
    4. End cell -> Red
    5. Explored cells -> Pink
    6. Shortest Path by Dijkstra -> Green
    7. Shortest Path by A-star -> Yellow
    8. Green button(PathD-1)-> Dijkstra
    9. Red button(PathA-2)-> A*
    10. Distance-1 : Dijkstra path length
    11. Distance-2 : A* path length
    12. The horizontal and vertical movement cost -> 1
    13. Diagonal cost -> √2.
  2. Major components :

    1. Main loop
    2. Dijkstra program
    3. A*
  3. Implementation :

    1. Map as 2D array of cells
    2. Binary representation of cells as 0 and 1 for blocked and open cells
    3. Each cell has information of its parent and its state of exploration
  4. ## Build For Linux user ##

    1. Download the zip file then unzip at the location 'Home':
      1. cd Shortest-path-2D-main
    2. Install sfml: sudo apt-get install libsfml-dev
    3. Complile path.cpp :
      1. g++ main.cpp -std=c++11 -lsfml-window -lsfml-system -lsfml-graphics
    4. Run the exectuable : ./a.out
  5. Supported operations:

    1. You can left click on blocks to draw black walls on the grid.
    2. Search using either Dijkstra or A* pathdinging algorithm by clicking the respective buttons.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published