A Python programme to visualise pathfinding and maze generation on a grid, using Pygame. Made it to practice implementing algorithms in python and to practice with pygame.
Clone the repo and run the Runner.py file. It has dependencies on Pygame.
Run:
Pip install pygame
Or if using a virtual environment, see the requirements.txt
Once the Pygame Window appears, the grid will initialise and you will see a GUI. Place a start and an end node to run a search algortihm.
There are a number of buttons and toggles:
- A toggle to disable the animation of the searching, instead just showing the result. This is faster than running with animation.
- A toggle to animate the shortest path
Currently there are two different maze generation algorithms implemented:
- Randomised Prim's algorithm
- Iterative Backtracking
There are currently two algorithms implemented:
- Djikstra
- A*
All examples were on a 200x200 grid.