STEP 1 — SORT CLUES AND COMPUTE ALL GAPS
List every given clue in ascending order. Consecutive clues define gaps: gap = (higher clue − lower clue − 1). A gap of 0 means the two clues must be in adjacent cells. A gap of 1 means exactly one intermediate cell sits between them.
Sort all gaps from smallest to largest. Fill them in that order.
STEP 2 — CHECK CORNERS AND EDGES BEFORE ANYTHING ELSE
Corner cells have exactly 2 neighbours; edge cells have 3. A corner cell that isn't the path's start or end must be entered and exited through those 2 neighbours — so the cells immediately before and after it in the sequence must occupy its two neighbours.
Check every corner cell first. If a clue falls on or within one cell of a corner, the path through that corner is often fully forced. This single check frequently places 3–6 cells without any gap counting.
STEP 3 — FILL GAP-0 (ADJACENT CLUES)
Two clues with a gap of 0 must occupy neighbouring cells. Confirm they are adjacent — if not, the puzzle has an error. If they are adjacent, that edge is confirmed and often locks one clue cell's exit direction, forcing the next segment.
STEP 4 — FILL SMALL GAPS VIA SHARED NEIGHBOURS
For gap-1: the missing cell must be a common neighbour of both anchor cells. List the orthogonal neighbours of each anchor and intersect the two sets — if the intersection is a single cell, place it immediately.
For gap-2: the two missing cells must form a connected path between the anchors. Enumerate the short routes. If every valid route passes through a particular cell, that cell is forced regardless of which route turns out to be correct.
STEP 5 — CASCADE DEAD-ENDS AFTER EVERY PLACEMENT
After placing any number, scan for cells that now have only one free orthogonal neighbour. Such a cell must be either the path's start or end — if it's in the middle, the path must both enter and exit through that single opening. That means the one free neighbour holds either the predecessor or successor number. Place it immediately.
Dead-end cascades are the most powerful technique in Square Maze. One forced placement creates another and another — don't stop after the first.
STEP 6 — USE CONNECTIVITY TO PRUNE CANDIDATES
The path visits every cell exactly once and cannot branch. If a candidate segment would cut off a group of empty cells from the rest of the grid — making them unreachable — that segment is illegal. Eliminate it without tracing the whole puzzle.
After each placement, check that the remaining empty cells still form one connected region. A pocket with a single entry forces the path through that entry in a specific direction.
SOLVING ORDER
- Sort clues, compute all gaps.
- Examine corner and edge cells — fill any forced segments.
- Confirm gap-0 adjacencies.
- Fill gap-1, then gap-2, via shared neighbours.
- After each placement, scan for dead-ends and cascade them.
- Use connectivity to prune bad candidates.
- Repeat from step 2 until solved.
Most beginner Square Mazes resolve completely from corner/edge forcing alone. The gap-counting steps are needed mainly for puzzles where all clues sit in the interior.
BEGINNER TRAP — FORGETTING ORTHOGONAL-ONLY ADJACENCY
Square Maze uses four-direction adjacency only — up, down, left, right. Diagonally adjacent cells are NOT neighbours, no matter how close they look. Every forced-move check and gap-counting step depends on this: a cell has at most 4 neighbours, not 8.