Maze cartoon

Maze Classification

Mazes in general (and hence algorithms to create Mazes) can be organized along seven different classifications. These are: Dimension, Hyperdimension, Topology, Tessellation, Routing, Texture, and Focus. A Maze can take one item from each of the classes in any combination.

Dimension: The dimension class is basically how many dimensions in space the Maze covers. Types are:

Hyperdimension: The hyperdimension class refers to the dimension of the object you move through the Maze, as opposed to the dimension of the Maze environment itself. Types are:

Topology: The topology class describes the geometry of the space the Maze exists in. Types are:

Tessellation: The tessellation class is the geometry of the individual cells that compose the Maze. Types are:

Routing: The routing class is probably the most interesting with respect to Maze generation itself. It refers to the types of passages within whatever geometry defined in the categories above.

Texture: The texture class is subtle, and describes the style of the passages in whatever routing in whatever geometry. They're not really on/off flags as much as general themes. Here are several example variables one can look at:

Focus: The focus class is obscure, but shows that Maze creation can be divided into two general types: Wall adders, and passage carvers. This is more of an algorithmic difference when generating, as opposed to a visual difference when observing, but is still useful to consider. The same Maze can be often generated in both ways:

Other: The above is by no means a comprehensive list of all possible classes or items within each class. (They're just the types of Mazes I've actually created. :-) Another class to explore is direction, where certain passages can only be traveled in one way. (In Computer Science terms, such a Maze would be described by a directed graph, as opposed to an undirected graph like all the others.) Also a Maze can have different sections of its area falling in different classes, where such a Maze is considered segmented. Note most every type of Maze, including Mazes with special rules, can be expressed as a directed graph, where you have a finite number of states and a finite number of choices at each state, which is called Maze equivalence.

Maze Creation Algorithms

The algorithm list:

Perfect Maze Creation Algorithms

There are a number of ways of creating perfect Mazes, each with its own characteristics. Here's a list of specific algorithms. All of these describe creating the Maze by carving passages, however unless otherwise specified each can also be done by adding walls:

Algorithm Dead End % Type Focus Memory Free? Time
Unicursal 0 Tree Wall Yes 261
Recursive Backtracker 10 Tree Passage no 26
Hunt and Kill 11 (21) Tree Passage Yes 55 (105)
Eller's Algorithm 28 Set Either Yes 10
Wilson's Algorithm 29 Tree Either no 51 (26)
Aldous-Broder Algorithm 29 Tree Either Yes 222 (160)
Kruskal's Algorithm 30 Set Either no 32
Prim's Algorithm 36 (31) Tree Either no 21
Growing Tree 49 (39) Tree Either no 43

This table summarizes the characteristics of the perfect Maze creation algorithms above. The Unicursal Maze algorithm (unicursal Mazes are technically perfect) is included for comparison. Descriptions of the columns follow:

Maze Solving Algorithms

There are a number of ways of solving Mazes, each with its own characteristics. Here's a list of specific algorithms:

Algorithm Solutions Guarantee? Focus Human Doable? Passage Free? Memory Free? Fast?
Random Mouse 1 no You Inside / Above no Yes no
Wall Follower 1 no You Inside / Above Yes Yes Yes
Recursive Backtracker 1 Yes You no Yes no Yes
Tremaux's Algorithm 1 Yes You Inside / Above no no Yes
Dead End Filler All + no Maze Above no Yes Yes
Cul-de-sac Filler All + no Maze Above no Yes Yes
Blind Alley Sealer All + Yes Maze no no no Yes
Blind Alley Filler All Yes Maze Above no Yes no
Collision Solver All Shortest Yes You + no no no Yes
Shortest Paths Finder All Shortest Yes You + no Yes no Yes
Shortest Path Finder 1 Shortest Yes You + no Yes no Yes

This table summarizes the characteristics of the Maze solving algorithms above. Maze solving algorithms can be classified and judged by these criteria. Descriptions of the columns follow:

Other Maze Operations

Algorithm Implementations

Back to Think Labyrinth!


This site produced by Walter D. Pullen (see Astrolog homepage), hosted on Magitech and astrolog.org, created using Microsoft FrontPage, page last updated December 1, 2003.