MazeMath v2.1 is a Python desktop application for creating step-by-step solvable arithmetic maze puzzles with live preview and print-ready export. This repository contains the full source code, allowing you to customize maze generation, difficulty, grid layouts, visual highlighting, and export workflows for educational, personal, or commercial projects.
- 🧩 Multi-Puzzle Generation — Create one or many puzzles at once
- 📐 Adjustable Difficulty — Easy (3×3), Medium (4×4), Hard (5×5)
- 🗺 Maze-Based Grid Layouts:
- 3×3 for Easy
- 4×4 for Medium
- 5×5 for Hard
- 🔀 Randomized Arithmetic Paths — Unique maze and math sequence every time
- 📝 Step-by-Step Solutions — Full calculation trail from start to target
- 👀 Live Preview — Instantly see puzzle grid with highlighted solution path
- 🟩 Visual Path Highlighting — Correct maze route shown in green
- 📄 Automatic Multi-Puzzle PDF Export — Combined or separate PDFs
- 🖼 High-Quality JPG Export — Separate puzzle images
- 🎨 Dark-Themed Modern UI — Built with Tkinter + ttkbootstrap
- 🔒 Fully Offline:
- No internet required
- Local file generation only
- ⚡ Fast Rendering — Lightweight maze and number drawing
- 🧰 Portable Desktop Tool — Can be compiled into a standalone executable
- Clone or download this repository:
git clone https://github.com/rogers-cyber/MazeMath.git cd MazeMath
- Install required Python packages:
pip install pillow reportlab ttkbootstrap
(Tkinter is included with standard Python installations.)
- Run the application:
python MazeMath.py
- Optional: Build a standalone executable using PyInstaller:
pyinstaller --onefile --windowed MazeMath.py
-
Configure Puzzle Options:
- Choose difficulty: Easy, Medium, Hard
- Set the number of puzzles to generate
-
Preview Puzzle:
- Click 🧩 Generate Single Puzzle to view one maze puzzle and its solution
-
Export Options:
- 📄 Multiple Puzzles (Combined PDF)
- 📂 Multiple Puzzles (Separate PDFs)
- 🖼 Multiple Puzzles (Separate JPGs)
-
Clear Puzzle:
- Click 🧹 Clear to reset the grid and solution
-
Info / About:
- Click ℹ About for instructions and feature overview
| Option | Description |
|---|---|
| Difficulty | Easy (3×3), Medium (4×4), Hard (5×5) |
| Number of Puzzles | Total puzzles to generate at once |
| Maze Grid | Random DFS-generated maze path |
| Target Number | Automatically calculated puzzle goal |
| Step-by-Step Solution | Shows arithmetic operations used along the maze |
| Visual Path Highlight | Correct maze route displayed in green |
| Export Format | PDF or JPG (separate or combined) |
| Output Folder | Destination for generated files |
| Live Preview | Real-time visual feedback on the grid and solution |
- Puzzle_1.pdf, Puzzle_2.pdf, … — Individual puzzle PDFs
- Combined PDF — Multi-puzzle worksheet
- Puzzle_1.jpg, Puzzle_2.jpg, … — Individual puzzle images
All files are saved to your selected output directory.
- Python 3.10+
- Tkinter — Standard Python GUI framework
- ttkbootstrap — Modern themed UI
- Pillow — Image rendering and JPG export
- reportlab — PDF creation and assembly
- pathlib, random, operator — Core application logic
- Each puzzle uses a randomized depth-first-search maze for unique paths.
- Arithmetic operations are generated so every puzzle is guaranteed solvable.
- Step-by-step solution is automatically created from the maze traversal.
- PDF and JPG exports include highlighted solution paths and start/end arrows.
- Fully offline workflow, no internet connection required.
- Suitable for classrooms, homework worksheets, logic clubs, and math enrichment.
- Portable when compiled as a standalone executable.
MazeMath v2.1 is maintained by Mate Technologies, delivering a fun, visual, and organized solution for arithmetic maze puzzle generation and printing.
Website: https://matetools.gumroad.com
Distributed as commercial source code. You may use it for personal or commercial projects. Redistribution, resale, or rebranding as a competing product is not allowed.
