A Qt/C++ application for dynamically generating mazes and visualizing pathfinding algorithms.
Maze Solver is a Qt/C++ application designed to enhance understanding of pathfinding algorithms through dynamic visualisation. As a bonus, maze generation using Randomised Prim’s algorithm is also visualised.
The application animates each solution step-by-step, colouring cells based on their role in the search process. It displays cells already visited by the algorithm and cells currently stored in the frontier, to better explain the working of the selected algorithm. It also shows the total number of visited cells and the final path length, allowing users to compare the efficiency of different algorithms.
- 🧩 Dynamic Maze Sizes: From 3×3 to 60×60.
- 🏗️ Generate Perfect Mazes: Generate perfect mazes (no loops or inaccessible areas) using Randomised Prim’s algorithm.
- 🔍 Algorithm Suite: Switch between Breadth-First Search, Depth-First Search, and A* Search algorithms for path finding.
- ⚡ Animation Control: Tweak generation/solving animation from 1 step/sec to 700 steps/sec, or stop/resume it.
- 💾 Save & Load: Export mazes as .maze files and revisit them later.
- 🔎 Zoom & Pan: Inspect every twist and turn in large mazes.
- Language: C++17
- GUI Framework: Qt 6
- Build System: CMake
- Platforms: macOS, Windows
- Qt 6.x
- CMake 3.5 or higher
- A C++17-compatible compiler
Please see the following instructions for different operating systems:
- Clone the repository.
git clone https://github.com/patrykkuta/Maze-Solver.git
- Build the application.
cd Maze-Solver mkdir build cd build cmake -DCMAKE_PREFIX_PATH="path/to/qt/msvc/compiler" .. # e.g. C:/Qt/6.8.3/msvc2022_64 cmake --build .
- Run the application.
./Debug/MazeSolver.exe
- Clone the repository.
git clone https://github.com/patrykkuta/Maze-Solver.git
- Build the application.
cd Maze-Solver mkdir build && cd build cmake .. cmake --build .
- Run the application.
open MazeSolver.app # Or run the binary directly: ./MazeSolver.app/Contents/MacOS/MazeSolver
- Select maze dimensions (3×3–60×60).
- Click Generate to build the maze.
- Pick an algorithm: BFS, DFS, or A*.
- Click Solve to watch the solving process in real-time.
Tip: Use the speed slider to control the animation speed and zoom slider for closer inspection.
- Save: After generating, press File -> Save to export a .maze file.
- Load: Press File -> Open, select your file, then solve with any algorithm.
- Fork 👉 gh repo fork patrykkuta/Maze-Solver --clone=true --remote=true
- Create feature branch 👉 git checkout -b feature/awesome-stuff
- Commit changes 👉 git commit -m "Add awesome feature"
- Push & open PR 👉 git push origin feature/awesome-stuff
Please follow the existing style and include meaningful comments.
This project is licensed under the MIT License. See LICENSE for details.
Found a bug or want to chat? Email: patryk9837@gmail.com

