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 more

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 dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Maze Generator' tool for free! Thank you!

Maze Generator

Maze Generation











Answers to Questions (FAQ)

What is a perfect maze? (Definition)

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.

Can a perfect maze have multiple exits?

A perfect maze has 2 exits (one of which is usually called entrance). If there are multiple exits (3, 4 or more) then it cannot be a perfect maze.

However, to generate a maze with several exits, it is possible to start from a perfect maze generator and add a few holes in the exterior walls to have additional exits.

How to calculate a maze size?

The size of a labyrinth can be defined with their number of rows 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 "Maze Generator" source code. Except explicit open source licence (indicated Creative Commons / free), the "Maze Generator" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Maze Generator" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Maze Generator" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "Maze Generator" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Maze Generator on dCode.fr [online website], retrieved on 2024-11-17, https://www.dcode.fr/maze-generator

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Maze Generator' tool for free! Thank you!


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