Skip to content

Graph Coding search algorithm related to Dijkstra's and A* Path

Notifications You must be signed in to change notification settings

SinisterSup/A.star-Path-Finder-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A* Path Finder Algorithm

Python PyGame

A GUI based Visualizer of the A* Path Finding Graph Algorithm

Every time the program is executed, a random grid is created and the user can mark the Start and End Points on the grid for the algorithm to search from-Source to-Desination.
Once the the user has marked the Start and End Points, the user can then place obstacles on the grid by (left-click)dragging anywhere on the grid.
You can also press the r key to load random obstacles into the grid.
After the obstacles are placed, the user can then press the spacebar.

This will commence a visual that demonstrates how the A* path finding algorithm is searching for the Dest node.
Finally if the Dest node is reached from Source, The optimal path using the A* algorithm will be displayed on the grid.

You can also press the c key to clear up the board for a new Entry.

Controls

Keys Actions
Left Click 1st to mark the Source node on grid, 2nd time for Dest node
r Load Random Obstacles into the grid
Space Find the Optimal Path from source to dest using A* path
c Clear up the board for a new Entry

Run in Gitpod

You can also alternatively run Sudoku-GUI-Solver in Gitpod, a free online dev environment for GitHub:
Open in Gitpod

Alternative Instructions

If you want to run the game GUI locally on your machine then you need python installed on your machine.
python -m pip install pygame in the command prompt to install the dependency needed.
Voila that's all you need!...
Now you can just clone the repo remotely on your PC or just download the zip file of this repo wherever on your PC and then just double click on a-star.exe which is an executable file. This brings up the game window!

Enjoy visualizing the A* star algorithm

About

Graph Coding search algorithm related to Dijkstra's and A* Path

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages