Search for a tool
Maze Generator

Tool to automatically generate rectangular (perfect) mazes in 2D. Maze generator based on given height and width, ready to be printed.

Results

Maze Generator -

Tag(s) : Fun/Miscellaneous

Share
Share
dCode and you

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our community Discord for help requests!


Thanks to your feedback and relevant comments, dCode has developped the best Maze Generator tool, so feel free to write! Thank you !

Maze Generator

Maze Generation











Tool to automatically generate rectangular (perfect) mazes in 2D. Maze generator based on given height and width, ready to be printed.

Answers to Questions

What is a perfect maze?

A perfect labyrinth is a geometric figure in two parts. Thus, it does not include an inner loop, that is to say that each wall is connected to all the others in its part. This kind of labyrinth is represented by a graph.

Example: Perfect maze with the + part and the * part: // 5x5
+++++++++++++
+ + +
**** + * + +
* * * +
* ******* ++++
* + +
**** **** + +
* * +
* * **** * +
* * * *
*************

Example: Imperfect maze, with a central island o: // 5x5
+++++++++++++
+ + +
**** + o + +
* * o +
* * oooo ++++
* o o + +
**** o o + +
* o o +
* * oooo * +
* * *
*************

In imperfect labyrinths, some cells are inaccessible.

How to get out of a maze?

To get out of a perfect giant labyrinth, select a wall and follow it until finding the exit. Indeed, in this way, keeping the same wall always left or right, the player will walk a whole side of the labyrinth until finding the exit.

This method works only in perfect labyrinths games, in an imperfect maze, along an island leads the player to turn in circles.

How to calculate a maze size?

The size of a labyrinth can be expressed in number of lines and columns (generally called corridors). In practice, the existence of the walls makes the labyrinth slightly larger.

dCode generates ASCII labyrinths whose total size is $ 2n+1 $ with $ n $ the number of corridors (vertical or horizontal).

What are the most known mazes?

Among the mazes of plant type, are in France the Labyrinthe de Beaugency or in Belgium the Labyrinthe de Barvaux.

In the cathedrals of Reims and Amiens are drawn on the ground labyrinths.

Maze/Labyrinth is also the name given to a series of films, novels or a board game.

Source code

dCode retains ownership of the online 'Maze Generator' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) no data, script or API access will be for free, same for Maze Generator download for offline use on PC, tablet, iPhone or Android !

Need Help ?

Please, check our community Discord for help requests!

Questions / Comments

Thanks to your feedback and relevant comments, dCode has developped the best Maze Generator tool, so feel free to write! Thank you !


Source : https://www.dcode.fr/maze-generator
© 2020 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.
Feedback