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:

    “When producers want to know what the public wants, they graph it as curves. When they want to tell the public what to get, they say it in curves.”
    —Marshall McLuhan (1911–1980)

    “There could be no fairer destiny for any physical theory than that it should point the way to a more comprehensive theory in which it lives on as a limiting case.”
    —Albert Einstein (1879–1955)

    “You know, there’s a cowboy movie where one joker says, “Mighty quiet out there. Too quiet,” he says. Same thing every time; it’s too quiet.”
    —James Poe, U.S. screenwriter, and Based On Play. Robert Aldrich. Sergeant Costa (Jack Palance)

    “The comparison between Coleridge and Johnson is obvious in so far as each held sway chiefly by the power of his tongue. The difference between their methods is so marked that it is tempting, but also unnecessary, to judge one to be inferior to the other. Johnson was robust, combative, and concrete; Coleridge was the opposite. The contrast was perhaps in his mind when he said of Johnson: “his bow-wow manner must have had a good deal to do with the effect produced.””
    —Virginia Woolf (1882–1941)