A small Python project that generates mazes and their solutions, and saves the results as images in the OUTPUT/ folder.
- Procedural maze generation with configurable width and height (odd numbers, >= 7).
- Automatic solving of the generated maze and a visual solution overlay.
- Outputs PNG images to the
OUTPUT/directory.
Generated maze:
Solved maze (solution overlaid):
If these images are missing, run the generator first (see Quick start below).
- Make sure you're in the project root (the repository top-level).
- Run the program with Python 3.10+:
python3 main.py- When prompted, enter the width and height of the maze. The program will coerce values to the nearest odd number >= 7.
- Check the
OUTPUT/folder formaze.pngandmaze_solution.png.
- Run the script from the repository root to ensure relative paths resolve correctly. Running from another directory can cause FileNotFoundError when the program tries to read/write files in
OUTPUT/. - If you see a FileNotFoundError mentioning
OUTPUT/maze.pngor similar, re-runmain.pyto generate the files. Also make sure theOUTPUT/directory exists and is writable.
main.py— CLI entry point (asks for width/height and runs generator/solver).LOGIC/— maze generation and solve logic.OUTPUT/— generated PNG images (e.g.maze.png,maze_solution.png).LICENSE— project license.
Contributions are welcome. Open an issue or a pull request with a clear description of the change.
This project is licensed under the terms in LICENSE.

