A* Path Finding Visualizer
📖 About
An A* Path Finding interactive visualizer made with Pygame.
Project made with the purpose of studying A* search algorithm, Python classes and functions and visual interaction with Pygame.
Project under MIT License.
📽️ Demos
💻 Usage
-
Run
main.py
:python main.py
if Windowspython3 main.py
if Linux/macOS
-
Interact with the display:
- First
left click
sets thestart
node; - Second
left click
setsend
node; - The other clicks sets the
barriers
nodes, i.e. blocked nodes that won't be able to be passed through; - Any node can be reseted with a
right click
on it; - Press
space
to start the algorithm; - Pressing
c
resets it all.
- First
-
The quantity of nodes can be changed applying other values to the
ROWS
constant inmain.py
file. The standard is set to40
.
⚙️ Setup
First, clone this repo with:
git clone https://github.com/cauabernardino/astar_pathfinding
Then install the requirements:
- For Windows:
pip install -r requirements.txt
- For Linux/macOS:
pip3 install -r requirements.txt