Skip to content

meshhi13/MazeSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maze Solver

This is a Python implementation of a maze generator and solver. Develop massive mazes, solve them using various algorithms, and compare the costs of each algorithm on each size of maze.

MazeSolver.mov

Requirements

Before running the game, ensure you have the following installed:

  • Python 3.10 or higher
  • pygame library

Features

  • Maze Generation: Randomized maze creation using recursive backtracking.
  • Pathfinding Algorithms: Solve the maze using DFS, BFS, or A* with visual animations.
  • Interactive UI: Built-in menu to start generation, select algorithms, and observe real-time progress.
  • Customizable Grid: Modify the number of rows and columns for different maze sizes.

Project Structure

MazeSolver/
├── main.py
├── game.py
├── gamestate.py
├── menu.py
├── menuitems.py
├── objects.py
├── settings.py
├── Assets/
│   ├── Tile1.png
│   └── ...
├── ...

How to Run

  1. Clone the repository.
git clone https://github.com/meshhi13/MazeSolver
  1. Navigate to the project directory.
cd MazeSolver
  1. Run the game using the following command:
python main.py

How to Play

  1. Objective: Find a path from the start to the end of a generated maze using a search algorithm.

  2. Controls:

    • Menu: Customize the generated maze and algorithm in the menu screen.
    • Generate and Solve: A random maze is autogenerated, then you can select the algorithm to run by clicking on the "ALGO" button. Once ready, click the "SOLVE MAZE" button to see the action and the cost.
    • Reset: Continue by either resetting the maze, or restarting completely and generating a new maze.

Visualize maze-solving like never before!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages