This project is basically a bunch of path searching algorithms visualized. So far you can make paths (place/destroy walls), move the goal/start, generate mazes, and do the searches. The searching algorithms that I have implemented is A*, Dijkstra, Breadth First, Depth First, and Greedy First Searches. The maze algorithms so far is recursive/iterative backtracking and Hunt and Kill.
You must have a python environment with PyGame and the NumPy modules.
This install line should do the trick: pip install pygame numpy
After that you can just run the main.py file and get started
Placing walls - Left Mouse Click
Destroying walls - Right Mouse Click
Moving start - Ctrl+Left Mouse Click
Moving goal - Alt+Left Mouse Click
Changing Algorithms - Right/Left arrow Keys for different search algorithms. Up/Down arrow keys for different maze algorithms (You can look at the window name to see what algorithms you are using.)
Reset Grid - F5
Generate Maze - m
Fast Step (No sleep timer between steps) - s
Start Algorithm - Return or Enter
- When there is no path, the program auto closes
- Sometimes PyGame doesn't update so the program will "freeze." Just let it run and the algorithm will finish up and update it at the end
- Add Play/Pausing (Probably not going to happen atm b/c requires complete rewrite)
- More maze algorithms
- Fix the bugs
- Vel0ciTy - Main Author
- StackOverflow 😀
- Medium
- Stanford CS
- Julian Smolka - Huge help with maze generation. Our systems for a grid a pretty different but this resource/repository helped give me a lead to develop my maze algorithms
- Jamis Buck
- Wikipedia
- A bunch of other sites