Recursive Division Method
original chamber | division by two walls | holes in walls | continue subdividing... | completed |
---|---|---|---|---|
Mazes can be created with recursive division, an algorithm which works as follows: Begin with the maze's space with no walls. Call this a chamber. Divide the chamber with a randomly positioned wall (or multiple walls) where each wall contains a randomly positioned passage opening within it. Then recursively repeat the process on the subchambers until all chambers are minimum sized. This method results in mazes with long straight walls crossing their space, making it easier to see which areas to avoid.
For example, in a rectangular maze, build at random points two walls that are perpendicular to each other. These two walls divide the large chamber into four smaller chambers separated by four walls. Choose three of the four walls at random, and open a one cell-wide hole at a random point in each of the three. Continue in this manner recursively, until every chamber has a width of one cell in either of the two directions.
Read more about this topic: Maze Generation Algorithm
Famous quotes containing the words division and/or method:
“For a small child there is no division between playing and learning; between the things he or she does just for fun and things that are educational. The child learns while living and any part of living that is enjoyable is also play.”
—Penelope Leach (20th century)
“Letters are above all useful as a means of expressing the ideal self; and no other method of communication is quite so good for this purpose.... In letters we can reform without practice, beg without humiliation, snip and shape embarrassing experiences to the measure of our own desires....”
—Elizabeth Hardwick (b. 1916)