NetLogo User Community Models
## WHAT IS IT?
A demonstration of the BAM maze generating algorithm. This model will randomly generate a maze with 1 unique solution to get from one red patch to the other (without crossing the white walls). The maze can be saved as a .png image file.
## HOW IT WORKS
This model uses the slides to create 2 red patches (right and left). It then sets 2 distinct white lines (above and below). Finally, the model generates random white lines connected either to the "above" white line or the "below" one - but never to both of them! This algorithm guarentees that there will remain black space between the white lines, which is the uniqe solution to the maze.
## HOW TO USE IT
Press "Setup" to start.
If you like it, press "Export Maze" to save it as a .png file.
You can use the sliders to change the vertical position of the red patches (Start and Finish). You can also change the difficulty level (Easy, Medium, or Hard).
Try to solve the maze!
## DIFFICULTY LEVELS
The difficulty levels are only an estimate. The difference between them is in the amount of turtles used to create the maze. The more turtles, the more homogenous the random pattern becomes, and thus the maze is easir to solve on average.
However, it takes a significantly shorter time to create easy mazes.
## THINGS TO NOTICE
Use the sliders and change the world dimensions. When is the maze most difficult?
This is a really inefficient implementation of the algorithm as every tick many turtles die and are reborn.
## EXTENDING THE MODEL
You may change the size of the world at any time. I recommend using 65*40.
There are many things which I would like to extend:
1. improve efficiency
## CREDITS AND REFERENCES
Benjamin Menashe, Instagram @benjamaze.original
(back to the NetLogo User Community Models)