Python implementation of Pathfinding algorithm using Pygame.
This project is part of AIT's AT70.02 Data Strucure and Algorithm to demonstrate two pathfinding algorithm including
- A-star Algorithm
- Dijkstra Algorithm
- Windows 10, Linux, Mac OS
- Python >= 3.8
git clone https://github.com/wanburana/AT70.02-project.git
cd AT70.02-project
pip install -r requirements.txt
python main.py
Left-click
to createstart
,end
, andbarrier
(start
,end
, andbarrier
will be created respectively)Right-click
to remove/reset that spotSPACEBAR
to run the algorithm (start
andend
need to be already created.)c
to reset the whole programs
to save the current map
LOAD_MAP_NAME
(String or None): path of the generated map, set toNone
to start with empty mapGENERATE_BARRIER
(Boolean): Whether the barrier will be generated randomly when the program start or notGENERATE_START_STOP
(Boolean): Whether the start and stop will be generated randomly when the program start or notMODEL_NAME
(String): Algorithm used in the program (AStar, Dijkstra)RANDOM_BARRIER_THRESHOLD
(Float): the probability that a spot will be generated as a barrier (in caseGENERATE_BARRIER
is set toTrue
)
- A* Pathfinding Visualization Tutorial - Python A* Path Finding Tutorial (A-star algorithm tuturial & Implementation guideline)
- DomPizzie/README-Template.md (Awesome simple README template)