Guide
What makes a maze hard?
A bigger maze takes longer to solve but needs no more thought. What makes a maze hard is the structure of its wrong turns: how many dead ends it has, how far they run, and whether it has loops.
A bigger maze is a longer maze
Doubling a grid from 20×20 to 40×40 quadruples the cells and roughly quadruples the time, while the reasoning at each junction stays the same. A child who can solve the small one can solve the large one; it simply takes four times as long, and somewhere around the third minute the activity stops feeling like a puzzle and becomes an endurance test.
Use that when choosing for a class. If the goal is ten minutes of quiet, size is exactly the right lever. If the goal is a puzzle that rewards thinking, the dead ends and loops described below matter more than size.
Dead ends, and the tactic every solver discovers
Dead ends are what cost a solver time: passages that tempt you in and go nowhere. A maze with few, short dead ends reads as a wide corridor with occasional stubs, and you can almost see the route. In a maze with many long dead ends, each branching several times before it stops, you cannot tell a promising passage from a doomed one without following it.
Sooner or later every solver finds the same counter-tactic: work backwards from the exit, or pencil a cross at each dead end so you never re-enter it. From then on you stop exploring and start eliminating, and the maze collapses. On a standard maze this tactic always works, because a standard maze has no loops.
Perfect mazes, and what "one route" means
A maze whose passages contain no loops is called perfect. In graph terms the passages form a spanning tree over the cells, and that has a strong consequence: between any two cells there is exactly one route that never doubles back. It is the only route, so it is also the shortest. Almost every maze printed in a puzzle book is perfect, which is why the cross-off-the-dead-ends tactic is reliable.
It is also what makes an answer key definitive. If exactly one route exists, the key shows the answer, and a solver whose path differs from it has made a mistake somewhere. The maze generator here is tested on exactly this property: its smoke test reconstructs the carved passages from the rendered walls and checks that they form a spanning tree.
Braiding: adding loops to raise difficulty
Adding loops is called braiding. You take a dead end and open a second wall in it, so the passage connects onward. Braid a few and the maze keeps its character, while the pencil-crossing tactic fails now and then. Braid most of them and the tactic stops working altogether: few dead ends are left to cross off, and the solver has to plan a route and hold it in mind.
This is the dial that raises difficulty, and it has a cost to understand before you turn it. Once loops exist the maze is no longer a spanning tree, so it has several routes, and the answer key shows a shortest one. Loops are shortcuts, so the route also gets shorter: in the 20×24 maze the generator opens with, the only route runs through 187 cells, and opening most of the dead ends cuts the shortest way through to 59. The generator says so in two places. Its dead-end menu names what each setting does to the routes: "Keep all" gives exactly one route, "Open some" adds a few loops and "Open most" puts loops throughout. And whenever braiding is on, the corner stamp on the answer key reads "shortest route" where a perfect maze says "the only route".
Printing it so it can be solved
Cell size is the constraint people get wrong. A 40×40 maze on US Letter, at the default 12.7 mm margin, leaves about 4.5 mm of clear corridor in each cell. That is tight for a felt tip or a young hand: the route gets hard to read as it is traced, and a child following it with a finger cannot tell which side of a wall they are on. Around 6 mm is the practical floor for pencil work and 8 mm is comfortable, which puts roughly 25 columns across a portrait Letter page inside the margins.
Print the answer key on its own sheet. On the back of the puzzle, ordinary copier paper lets the solution show through, which is a disappointing way to end a maze. If you are printing a set for a class, keep one size and change the seed: different mazes at the same size stay comparable to each other, which matters if anyone is racing.
Judging how hard a maze is
Maze difficulty is no more a single number than sudoku difficulty is. Dead-end density, braid share and grid size interact, and a heavily braided small maze can beat a large perfect one for a solver who has learned the elimination tactic, and lose to it badly for one who has not. The only reliable test is watching somebody solve it.
Any maze printed on paper can be solved by working backwards from the exit. That is a legitimate solving strategy, and the mazes that stay interesting under it are the braided ones, because working backwards through loops is no easier than working forwards.