Yajilin Puzzle
Play Yajilin, plus the measurement: the arrow clues leave thousands of shadings standing and the loop condition does almost all the solving.
Click a cell to shade it. Click between two cells to lay a piece of the loop. An arrow says how many shaded cells lie that way, to the edge of the board. Shaded cells may never touch, and every cell that is neither shaded nor a clue must sit on one single closed loop. Everything runs in your browser; nothing is uploaded.
The arrows do not solve this puzzle — the loop does
The natural way to read Yajilin is that the numbers do the solving and the loop is a check at the end. Measured, it is the other way round and not by a little. Apply the arrow counts and the no-touching rule, count every shading that survives, then add the loop condition and count again:
| Board | Clues | Shaded | Shadings the arrows allow | Arrows pin it down | With the loop | Loop pins it down |
|---|---|---|---|---|---|---|
| 5×5 | 4.6 | 4.6 | 3,918 | 0 / 30 | 12.1 | 4 / 30 |
| 5×5 | 4.6 | 4.5 | 3,262 | 0 / 30 | 10.0 | 4 / 30 |
| 5×5 | 6.3 | 2.8 | 1,034 | 0 / 30 | 5.2 | 9 / 30 |
| 6×6 | 8.0 | 7.0 | 17,494 | 0 / 30 | 18.5 | 3 / 30 |
The arrows leave thousands of possibilities standing and pinned a puzzle down to one answer zero times in 120 puzzles across four densities. The loop condition divides the survivors by 324×, 326×, 199×, 946× — and it is the only rule that ever gets a puzzle to a single answer. So the loop is not the check. The loop is the solver, and the arrows are what make its answer unique rather than what finds it.
More clues do help — the third row has the most arrows and the fewest shaded cells, and its arrow-only count is the smallest of the four. It is still 1,034 shadings, and it still pinned down none of the thirty.
The table is frozen, so 14 fresh puzzles it has never seen are counted at build time as a check: 1,622 shadings from the arrows alone falling to 3.9 with the loop, and again not one pinned down by the arrows. An early version of this measurement used a counting limit of 50 and reported the arrow-only figure as "50" — which was the limit rather than the answer, so the count is now checked for having hit its cap before any mean is reported.
Which is why these have to be built loop-first
Even with the loop condition in force, only 4, 4, 9, 3 of thirty grids have a single answer. A generator cannot keep the first candidate it builds; it has to count the answers and throw the grid away unless there is exactly one, which is what the button above does.
There is a second consequence, and it is the one that decides how the puzzle can be built at all. Every cell that is not shaded and not a clue must lie on the loop — so if you pick the shaded cells first and hope the remainder admits a loop, it essentially never does. An early version of this generator did exactly that and produced one puzzle on a 5×5 board and none at all on a 6×6.
Growing a loop first and then splitting the cells it does not cover into shaded cells and clues works every time, because the hardest condition is satisfied by construction. The loop here starts as a 2×2 square and is grown by repeatedly replacing one of its edges with a three-sided detour, which keeps it a single closed loop at every step.
How to use
- Click a cell to shade it, and click again to unshade it.
- Click between two cells to lay a piece of the loop.
- An arrow says how many shaded cells lie that way, to the edge of the board.
- Shaded cells may never touch each other side by side.
- Every cell that is neither shaded nor a clue must sit on one closed loop.
Frequently asked questions
What are the rules of Yajilin?
Some cells carry an arrow and a number, meaning exactly that many cells are shaded in that direction all the way to the edge. Shaded cells may not touch orthogonally. Every remaining cell — every cell that is neither shaded nor a clue — must lie on a single closed loop.
Should I start with the arrows or the loop?
The loop, which surprises most people. Applying the arrow counts and the no-touching rule to 120 random puzzles left between 1,034 and 17,494 possible shadings standing, and pinned a puzzle down to one answer exactly zero times. Adding the loop condition cut the survivors by a factor of 199 to 946.
So what are the arrows for?
They are what makes the answer unique rather than what finds it. The loop condition does the narrowing — it is the only rule that ever reduces a puzzle to a single answer — and the numbers are what stop the loop having several possible shapes. Reading Yajilin as an arrow puzzle with a loop check at the end gets the work the wrong way round.
Why are these puzzles built loop-first?
Because every cell that is not shaded and not a clue has to be on the loop, so picking the shaded cells first and hoping the remainder admits a loop essentially never works. An early version of this generator did exactly that and produced one puzzle on a 5 by 5 board and none at all on a 6 by 6. Growing a loop first and splitting what it does not cover works every time.
Do all these puzzles have one answer?
Yes, but only because the generator throws most candidates away. Even with the loop condition in force, only 3 to 9 of every 30 candidate grids have a single answer, so each one here is built, counted, and discarded unless exactly one solution exists.
How is the loop grown?
It starts as a 2 by 2 square and is grown by repeatedly replacing one of its edges with a three-sided detour. That keeps it a single closed loop at every step, which is what makes it reliable where scattering cells at random is not.
Does this send anything anywhere?
No. Every puzzle is generated, counted and checked in your browser, and nothing is uploaded.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.