Skip to content

jmagali/maze-generator-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maze-generator-solver

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.

Maze Solver Animation Maze Generation Animation Application UI


Features

  • 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

Installation

Requirements

  • Python 3.10 — 3.12 recommended
  • pip installed

1. Clone the repo

git clone https://github.com/jmagali/maze-generator-solver.git
cd maze-generator-solver

2. Install the required Python libraries

pip install -r requirements.txt # This installs the required libraries

3. Run the program

python main.py

Releases

No releases published

Packages

 
 
 

Contributors

Languages