Skip to content

joophe/mazes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mazes

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++.

Dependencies

Compiling and Running

Compiling

To compile the project, first create build directory and change to that directory:

mkdir build && cd build

From within the build directory, then run cmake as follows:

cmake ..
cmake --build .

Running

The executable will be placed in the build directory. From within build, you can run the project as follows:

./Mazes

This 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 Sidewinder

Additionally, 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.

Roadmap & TODOs

  • 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

References

[1] Buck, Jamis (2015). Mazes for Programmers.

About

Implementations of "mazes for programmers"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published