Maze Generation Algorithm - Graph Theory Based Methods

Graph Theory Based Methods

A maze can be generated by starting with a predetermined arrangement of cells (most commonly a rectangular grid but other arrangements are possible) with wall sites between them. This predetermined arrangement can be considered as a connected graph with the edges representing possible wall sites and the nodes representing cells. The purpose of the maze generation algorithm can then be considered to be making a subgraph where it is challenging to find a route between two particular nodes.

If the subgraph is not connected, then there are regions of the graph that are wasted because they do not contribute to the search space. If the graph contains loops, then there may be multiple paths between the chosen nodes. Because of this, maze generation is often approached as generating a random spanning tree. Loops which can confound naive maze solvers may be introduced by adding random edges to the result during the course of the algorithm.

Read more about this topic:  Maze Generation Algorithm

Famous quotes containing the words graph, theory, based and/or methods:

    “In this Journal, my pen is a delicate needle point, tracing out a graph of temperament so as to show its daily fluctuations: grave and gay, up and down, lamentation and revelry, self-love and self-disgust. You get here all my thoughts and opinions, always irresponsible and often contradictory or mutually exclusive, all my moods and vapours, all the varying reactions to environment of this jelly which is I.”
    —W.N.P. Barbellion (1889–1919)

    “It is not enough for theory to describe and analyse, it must itself be an event in the universe it describes. In order to do this theory must partake of and become the acceleration of this logic. It must tear itself from all referents and take pride only in the future. Theory must operate on time at the cost of a deliberate distortion of present reality.”
    —Jean Baudrillard (b. 1929)

    “Because it is not always easy for an adult to predict what inaccurate ideas a child may have, it can help to answer questions first with one of your own: “What do you think?” Once you find out what a child is really asking, you’ll be in a better position to give a helpful answer based on the facts.”
    —Joanna Cole (20th century)

    “It would be some advantage to live a primitive and frontier life, though in the midst of an outward civilization, if only to learn what are the gross necessaries of life and what methods have been taken to obtain them.”
    —Henry David Thoreau (1817–1862)