Create Mazes of different types or generate Datasets to train your Maze GANs or Reinforcement Learning agents. Rectangular Maze Dataset on Kaggle.
hexagonal-maze.mp4
To understand how these Mazes are constructed, watch the accompanying ⏵︎video tutorials.
No installations required. Just clone this repository and run code
$ git clone https://github.com/emadehsan/maze
$ cd maze/src
# draw a rectangular maze
$ python rectangular.py
# or a circular maze
$ python circular.py
# or a triangular maze
$ python triangular.py
# or a hexagonal maze
$ python hexagonal.py
You can also generate a dataset of Mazes. Right now, only Rectangular (actually Squared) Mazes are supported.
Use the scripts in src/datasets
.
Example:
$ cd src/datasets/
$ python generate_rect_dataset.py -rows 10 -width 10 -items 1000
This will create a folder inside src/datasets
with name
rectangular_mazes_TIME
. The folder will contain
- Mazes as
png
images logs.txt
containing information about process (can be discarded)spanning_tree.txt
containing the Spanning Tree edges used to create the corresponding maze
Link to Rectangular Maze Dataset on Kaggle.
-
Rectangular Maze using Randomized Prim's Algorithm [ tutorial ]
-
Circular Maze using Depth First Search [ tutorial ]
-
Triangular Maze using Depth First Search
-
Triangular Maze using Kruskal's Algorithm
-
Hexagonal Maze using Depth First Search
- Please share your feedback by creating an issue or on Twitter