Maze worksheet generator
Generate a connected maze and solution from grid dimensions and a seed. Print the text in a monospace font; generation stays inside your browser.
The example value has been entered. Check it immediately or change the value.
Input is processed in the browser. Refreshing returns a sample value.
Instructions and example
Depth-first traversal builds a tree connecting every room; path search then finds the entrance-to-exit route.
A maze of 6×4 rooms occupies a 13×9 character grid including walls.
Each side allows 2–25 rooms. # denotes walls, spaces corridors and · the solution path. No difficulty score is provided.
Frequently asked questions
Does a generated maze have a unique route?
Room connections form a tree, so the simple entrance-to-exit path is unique.
How do I avoid misaligned maze walls when printing?
Use a monospace font and disable automatic line wrapping.
Calculation criteria and reference materials
The calculation formula and scope of this tool are disclosed in the above description. Examples can be checked by substituting input values into the formula or following the specified string and calendar handling rules.
Verification of calculation criteria: · Calculation·verification principles · Report errors