Welcome to the Mazes project! This is a fascinating exploration into the world of maze generation algorithms. This project allows you to generate mazes of varying sizes using different algorithms, each with their unique characteristics and patterns. The implementations in this project are based on the book "Mazes for Programmers" by Jamis Buck [1]. The code is written in C++.
To compile the project, first create build directory and change to that directory:
mkdir build && cd buildFrom within the build directory, then run cmake as follows:
cmake ..
cmake --build .The executable will be placed in the build directory. From within build, you can run the project as follows:
./MazesThis will generate a 5x5 maze using the Aldous-Broder algorithm by default.
You can also specify the number of rows, the number of columns, and the maze generation algorithm:
./Mazes [number of rows] [numer of columns] [algorithm]The following algorithms are available:
BinaryTree: Binary Tree maze generation algorithm.Sidewinder: Sidewinder maze generation algorithm.AldousBroder: Aldous-Broder maze generation algorithm.Wilsons: Wilson's maze generation algorithm.
For example, to generate a 10x10 maze using the Sidewinder algorithm, you would run:
./Mazes 10 10 SidewinderAdditionally, after running the program, a PNG image of the generated maze will be created in the build directory. The image file is named maze.png. This allows you to visually inspect the maze generated by the chosen algorithm.
- Provide more Algorithms
- Aldous-Broder
- Eller's
- Growing Tree
- Hunt-and-Kill
- Kruskal's
- Recursive Backtracker
- Prim's
- Wilson's
- Provide solving algorithm for the mazes (Dijkstra, A*, RRT, ...?)
- Provide googletests
- Provide github actions
- Provide mazes with rooms
[1] Buck, Jamis (2015). Mazes for Programmers.