Detour
Draw one closed loop through the centres of the cells that visits every cell exactly once. A number in a region says how many times the loop turns inside that region. Because the loop has to use every cell, there is never a question of where it goes in the usual sense — every cell has two loop edges before you read a thing. The only freedom left is whether those two edges are opposite or perpendicular: one bit per cell, and the numbers talk about nothing else. Drag between neighbouring cells to lay the loop; shift-drag or right-drag to cross a link out.
the board
The loop is already decided. Only its corners are not.
Every loop genre I had shipped before this one spends its clues telling you where the loop goes: which cells it uses, which it skips, how it threads between them. Detour does not have that question. "One loop through every cell" is not a hint about the loop — it is the loop. An answer is a Hamiltonian cycle of the grid graph, and there is nothing else it could be.
So before a single number is read, every cell already has two of its four links. The freedom left is, cell by cell, whether those two are opposite (a straight) or perpendicular (a turn): one bit per cell, and every number on the board is a statement about nothing but those bits.
That also means the cheap rungs have almost nothing to chew on before the numbers arrive. Rub every number off a board and run the solver as hard as it will go without them, and what comes back is the four grid corners — cells with only two links, so both are forced — and not one link more:
| board | links on the board | settled with every number rubbed out | what they are |
|---|---|---|---|
| 6×6 | 60 | 8 (13.3%) | the four corners, both links each |
| 8×8 | 112 | 8 (7.1%) | the four corners, both links each |
| 10×10 | 180 | 8 (4.4%) | the four corners, both links each |
How much room the genre has, to the last digit
Because an answer is exactly a Hamiltonian cycle, "how many answers could this grid have" is a question somebody else has already published the answer to, and the counting machine in src/count.ts has to reproduce it. It is a connectivity-profile sweep: carry a frontier of w + 1 plugs across the grid in reading order, remember which plug is paired with which, canonicalise by first appearance, and the number of live states stays tiny even when the number of cycles does not.
| grid | Hamiltonian cycles | published | frontier states | time |
|---|---|---|---|---|
| 2×2 | 1 | agrees | 4 | 1 ms |
| 4×4 | 6 | agrees | 77 | 1 ms |
| 6×6 | 1,072 | agrees | 1,119 | 2 ms |
| 8×8 | 4,638,576 | agrees | 12,852 | 14 ms |
| 10×10 | 467,260,456,608 | agrees | 134,010 | 205 ms |
| 12×12 | 1,076,226,888,605,605,706 | agrees | 1,333,112 | 2,693 ms |
| 14×14 | 56,126,499,620,491,437,281,263,608 | agrees | 12,910,377 | 35,091 ms |
That column is A003763, and the last row is a count of 56,126,499,620,491,437,281,263,608 objects arrived at in 35,091 ms across 12,910,377 states. A depth-first search that shares no code with the sweep reproduces the small corner of the table it can reach, which is how I know the sweep is not merely fast.
And one line that costs nothing and kills a whole family of boards: the grid graph is bipartite, so a Hamiltonian cycle alternates colours and needs the two colour classes to be the same size. An odd-by-odd board has no answer at all, whatever numbers you print on it — 3×3, 5×5, 7×7, 9×9, 11×11 all count zero, and the solver returns before it looks at the board.
Two clauses, priced exactly
The rule has two structural clauses that are never printed anywhere — every cell and one loop — and the same sweep counts what the board would allow without them. Both are things a player misreads on a first pass, and the numbers say which mistake matters.
| how the rule is read | 4×4 | 6×6 | 8×8 | cost at 8×8 |
|---|---|---|---|---|
| both clauses | 6 | 1,072 | 4,638,576 | — |
| several loops allowed | 18 | 13,903 | 360,783,593 | 77× |
| cells may be skipped | 213 | 1,222,363 | 603,841,648,931 | 130,000× |
| neither clause | 321 | 5,735,477 | 11,282,914,491,065 | 2,432,000× |
Drop every cell and the 8×8 answer space multiplies by 130,000×; that row is A140517, the number of cycles in an n×n grid, and reproducing it is a second independent check on the sweep. Drop one loop instead and you get A222202, the disjoint cycle covers, and the space multiplies by only 77×. Drop both and you get 1, 13, 321, 23857, 5735477, 4468252413, which searching the OEIS in September 2026 returns nothing for.
So the two clauses are not remotely the same size, and the small one is the one you have to enforce anyway — see the branch-point table further down, where the one-loop clause prunes harder than every printed number put together.
Every answer turns an even number of times, and far more than four
A closed rectilinear curve turns through 360 degrees exactly once on the way round, so its right turns exceed its left turns by exactly four: R − L = 4, and the total T = R + L = 2L + 4. That is a free global test — the numbers on a fully numbered board must add up to something even — and it holds on 108 of the 108 boards here, which is all of them.
It also gives a bound, T ≥ 4, and that bound is worthless. Filling the grid is what actually costs turns, and the sweep splits every cycle by its turn total and says exactly how much:
| grid | cells | fewest turns | most turns | mean | distinct totals | all even |
|---|---|---|---|---|---|---|
| 4×4 | 16 | 8 | 12 | 9.3 | 2 | yes |
| 4×6 | 24 | 8 | 20 | 13.3 | 6 | yes |
| 6×6 | 36 | 12 | 28 | 20.0 | 9 | yes |
| 6×8 | 48 | 12 | 40 | 26.5 | 15 | yes |
| 8×8 | 64 | 16 | 56 | 35.5 | 21 | yes |
| 8×10 | 80 | 16 | 72 | 44.5 | 29 | yes |
| 10×10 | 100 | 20 | 88 | 55.9 | 35 | yes |
The polygon bound says four; the true floor is 2 × the short side of the grid, on every grid in the table, and it is reached by exactly the answer you would draw by hand — the boustrophedon comb that runs down one column and snakes back across the rest. The ceiling has no such tidy shape, and no answer of any size gets every cell to be a corner.
The mean is the number a setter should keep in mind. A 10×10 answer turns 55.9 times in 100 cells, so 55.9% of the cells of a typical answer are corners, and the numbers on the board have to add up to roughly that whether the setter thought about it or not. The shipped answers agree: they average 57.3% at 10×10, which is what uniform draws from the whole space ought to do, and is the cheapest check I have that the sampler is uniform.
What one number is worth
At 6×6 there are only 1,072 answers, so "what does this clue rule out" can be answered by walking all of them. Take every region of every shipped 6×6 board, print the number its answer implies, and count the survivors.
| answers left | share of all 6×6 answers | |
|---|---|---|
| all 6×6 answers | 1,072 | 100.0% |
| one region's number (median of 332) | 327 | 30.5% |
| the sharpest single number in the bank | 10 | 0.9% |
| the bluntest single number in the bank | 760 | 70.9% |
| the numbers a shipped board actually prints | 1 | 0.1% |
A median single number keeps 30.5% of the answer space, and the bluntest one in the bank keeps 70.9% — it barely says anything. Nothing here is decided by one number; it is decided by how few answers survive all of them at once.
Numbering every region is not enough
The generator draws an answer uniformly, cuts the grid into regions at random, and writes the true turn count into every region. That is the most informative board that partition can carry, and it is usually still not a puzzle.
| board | draws | unique with every region numbered | rate |
|---|---|---|---|
| 6×6 | 200 | 149 | 74.5% |
| 8×8 | 200 | 86 | 43.0% |
| 10×10 | 60 | 7 | 11.7% |
At 10×10, 88.3% of fully numbered boards still have a second answer, and most of the generator's time goes on throwing those away. The shipped boards then go the other way: numbers are erased for as long as the board stays unique, which leaves a median of 5, 10 and 16 numbers on the three sizes.
| board | boards | regions (median) | region size (median) | numbers printed | turns in the answer |
|---|---|---|---|---|---|
| 6×6 | 36 | 9 | 4 | 5 (3–7) | 20 of 36 (55.4%) |
| 8×8 | 36 | 16 | 4 | 10 (8–12) | 38 of 64 (57.5%) |
| 10×10 | 36 | 21 | 5 | 16 (13–19) | 58 of 100 (57.3%) |
The dial is real. It is just not the dial the generator turns.
Take a shipped board's full clue set and keep a random subset of it. Uniqueness does climb with the number of numbers, so this genre has a clue dial — but it is steep and it starts flat. Below a threshold no subset of any size works at all, and the last row is 100% by construction, because these boards were chosen for being unique when fully numbered.
| numbers kept | 6×6 unique | 8×8 unique |
|---|---|---|
| 1 | 0 / 108 (0.0%) | 0 / 108 (0.0%) |
| 2 | 0 / 108 (0.0%) | 0 / 108 (0.0%) |
| 3 | 0 / 108 (0.0%) | 0 / 108 (0.0%) |
| 4 | 6 / 108 (5.6%) | 0 / 108 (0.0%) |
| 5 | 21 / 108 (19.4%) | 0 / 108 (0.0%) |
| 6 | 38 / 108 (35.2%) | 0 / 108 (0.0%) |
| 7 | 70 / 108 (64.8%) | 0 / 108 (0.0%) |
| 8 | 99 / 108 (91.7%) | 0 / 108 (0.0%) |
| 9 | 79 / 84 (94.0%) | 0 / 108 (0.0%) |
| 10 | 36 / 36 (100.0%) | 1 / 108 (0.9%) |
| 11 | — | 5 / 108 (4.6%) |
| 12 | — | 17 / 108 (15.7%) |
| 13 | — | 40 / 108 (37.0%) |
| 14 | — | 67 / 108 (62.0%) |
| 15 | — | 92 / 108 (85.2%) |
| 16 | — | 66 / 72 (91.7%) |
| 17 | — | 40 / 42 (95.2%) |
| 18 | — | 18 / 18 (100.0%) |
The dial the generator turns is the partition. Take one shipped answer, leave it completely alone, and redraw the regions over the top 40 times, numbering every region each time. Over 12 answers and 480 redraws, 257 produce a unique board — 53.5% — with the friendliest answer landing 27 of 40 and the most hostile 16. Same answer, same rule, every region numbered: whether it is a puzzle depends on where the walls fell.
And region size is a real knob, pulling in the direction you would expect once you notice what a small region can say. A one- or two-cell region can only print 0, 1 or 2, but there are many of them and they overlap the loop's corners tightly; a big region prints a bigger number that is spread over so many cells it pins down almost nothing.
| target region size | regions on an 8×8 | draws | unique with every region numbered |
|---|---|---|---|
| 2 | 24.8 | 120 | 82 (68.3%) |
| 3 | 20.6 | 120 | 78 (65.0%) |
| 4 | 16.1 | 120 | 51 (42.5%) |
| 5 | 13.4 | 120 | 36 (30.0%) |
| 6 | 11.5 | 120 | 32 (26.7%) |
| 8 | 9.2 | 120 | 10 (8.3%) |
The shipped boards use a target of 4 at 6×6 and 8×8 and 5 at 10×10 — not the setting that yields the most puzzles, but the one that yields boards with enough cells per region for the number to be worth reading.
The ladder, and the rung that is not on the board
degree— every cell has exactly two loop links. Arithmetic on four bits, and it is what fixes the corners.turn— the region numbers, read through the straight/turn bit. A cell known to be a turn has exactly one link from each axis, so deciding one bit decides up to four links.cut— for any set of cells the loop crosses the boundary an even number of times, and at least twice, because it has to reach the cells inside. Applied to every region and every straight cut across the board.loop— no cycle may close before it has swallowed the whole board.probe— assume a link, run the cheaper rungs, drop it if the board dies.
| rung | 6×6 links settled | 6×6 finished | 8×8 links settled | 8×8 finished | 10×10 links settled | 10×10 finished |
|---|---|---|---|---|---|---|
degree | 13.3% | 0/36 | 7.1% | 0/36 | 4.4% | 0/8 |
turn | 29.0% | 0/36 | 21.0% | 0/36 | 14.7% | 0/8 |
cut | 30.9% | 0/36 | 21.2% | 0/36 | 14.7% | 0/8 |
loop | 36.9% | 1/36 | 24.0% | 0/36 | 15.6% | 0/8 |
probe | 94.7% | 33/36 | 71.3% | 18/36 | 42.6% | 0/8 |
Propagation alone finishes 33 of 36 boards at 6×6 and 18 of 36 at 8×8, and none of the 10×10s: those need the search. That is the honest version of "how hard is this genre" — the numbers are weak enough locally that most boards need a case split somewhere.
Now price the rungs as pruning instead. Run the complete search but only let it propagate up to a given rung between branches, and count the branch points:
| propagation allowed | 6×6 branch points (median) | 6×6 worst | 8×8 branch points (median) | 8×8 worst |
|---|---|---|---|---|
up to degree | 13,902 | 13,902 | past the 200,000 cap | past the 200,000 cap on 36 of 36 |
up to turn | 46 | 649 | 1,412 | 26,135 |
up to cut | 35 | 402 | 1,155 | 21,843 |
up to loop | 10 | 68 | 46 | 1,232 |
This is the table I would keep if I could keep only one. Reading the numbers takes a median 8×8 board from past the 200,000 cap down to 1,412 branch points. Then adding the single clause that is not written anywhere on the board — that the links form one loop and not several — takes it from 1,155 to 46, a further 25×. The printed numbers are worth a lot. The unprinted clause is worth more.
No number on these boards is decoration
Every board here is locally minimal by construction, and the test re-derives it: erase any one printed number and count what comes back, up to a cap of 12.
| board | numbers erased one at a time | answers afterwards (median) | at least | still unique |
|---|---|---|---|---|
| 6×6 | 175 | 4 | 12 | 0 |
| 8×8 | 349 | 7 | 12 | 0 |
Three ways to misread the board
Each clause can be got wrong on its own, and they do not fail alike. Answer counts are capped at 12.
| misreading | board | intended answer still legal | answers (median) | still unique |
|---|---|---|---|---|
| several loops allowed | 6×6 | 36/36 | 8 | 0/36 |
| the number counts straights | 6×6 | 0/36 | 0 | 3/36 |
| no numbers at all | 6×6 | 36/36 | 1,072 | 0/36 |
| several loops allowed | 8×8 | 36/36 | 12 | 0/36 |
| the number counts straights | 8×8 | 0/36 | 0 | 0/36 |
| no numbers at all | 8×8 | 36/36 | 4,638,576 | 0/36 |
Reading the number as the count of straights instead of turns is the loud failure: the intended answer stops being legal on every board at both sizes, so the board simply does not work and you find out on the first deduction. Allowing several loops is the quiet one — the intended answer stays legal, because one loop is a special case of several — and it costs uniqueness on 72 of 72 boards. That is the mistake worth guarding, and guarding it is exactly what the loop rung does.