A procedural maze generator and solver with animated visualization using graph traversal algorithms.
This project generates perfect mazes using Depth-First Search (DFS), Prim’s algorithm, and a Binary Tree algorithm, and solves them using Breadth-First Search (BFS), Depth-First Search (DFS), and A* search. Both processes are visualized step-by-step and can be exported as GIF animations.
- Procedural generation of perfect mazes (no cycles, fully connected graph)
- Maze generation algorithms:
- Depth-First Search (recursive backtracking)
- Randomized Prim’s algorithm
- Binary Tree algorithm (fast, biased structure)
- Pathfinding algorithms:
- Breadth-First Search (optimal shortest path)
- Depth-First Search (non-optimal exploration)
- A* search (heuristic-guided shortest path)
- Real-time visualization of:
- Maze generation process
- Pathfinding exploration and solution path
- Animated rendering with exploration and solution overlays
- Export of generation and solving animations as GIFs
- Adjustable animation speed based on maze size
- Python 3.10 — 3.12 recommended
- pip installed
git clone https://github.com/jmagali/maze-generator-solver.git
cd maze-generator-solverpip install -r requirements.txt # This installs the required librariespython main.py

