Maze generator

A perfect maze - one path between any two points, no loops and no islands.

Path length
46
Junctions on the way
11

Print this one

One PDF: the sheet on the first page, the answer key on the second.

One PDF: the sheet, and the answer key on the page after it.

Your sheet

How it works

Every maze here is a spanning tree, which is the mathematical way of saying there is exactly one path between any two cells: no loops to walk in circles, no corner walled off from the rest. The entrance and the exit are put at the two ends of the longest route the maze contains.

  1. 1Choose a size and a difficulty.
  2. 2The maze is carved in your browser and checked: walls consistent on both sides, every cell reachable, no loop anywhere.
  3. 3Download the sheet, with the way through drawn on the page after it.

Maze generator

What is a perfect maze?

One with no loops and no closed-off areas. Follow any wall with one hand and you will get out, and between any two points there is one route and no other. A maze with a loop can be walked forever without noticing.

Where are the entrance and the exit?

At the two ends of the longest path in the maze, moved out to the border. It is found by measuring from one corner to the furthest cell, then from that cell to the furthest again - which on a maze without loops is exactly the longest route there is.

What makes one maze harder than another?

Size, the length of the solution against the number of cells, and how many junctions sit on the way. Each maze here is measured after it is built and generated again if it turns out easier than the level it claims.