Play Yajilin Online

Shade cells and draw a single closed loop through the grid. Arrow clues tell you how many shaded cells lie in that direction. No two shaded cells may touch!

Created by Brian Hamilton

Shaded
0
Time
0:00
Mode
Shade
Shaded
Loop

Tap cells to shade them — switch mode to draw the loop

How to play Yajilin

Shade some squares black, then draw one closed loop through every square that is left.

  • Each arrow clue counts the black squares along the line it points down, all the way to the edge of the grid.
  • No two black squares may touch edge to edge.
  • Clue squares are neither black nor part of the loop.
  • The loop visits every other square exactly once, and every puzzle has exactly one solution.

Controls: click between two squares to draw a loop segment, and click a square to mark it black.

An arrow only speaks about its own line

Yajilin asks for two things at once, which is what makes it feel harder than it is: place black squares, and draw a single closed loop through everything the black squares and clues leave behind. The arrows are the bridge between the two.

Each arrow counts the black squares along the line it points down — all the way to the edge of the grid, not just the nearest few. It says nothing whatever about any other row or column, and the clue square itself is neither black nor part of the loop.

An arrow counts black squares along its own line The clue points right and reads two, so exactly two black squares lie somewhere in the shaded row to its right. It says nothing about any other row or column, and the clue square itself is neither black nor part of the loop.
The clue points right and reads 2, so exactly two black squares lie somewhere in the shaded stretch. Where in that stretch is what the rest of the board decides.

The most useful arrow is a 0: it clears its whole line at a stroke, and every square along it is either a clue or part of the loop. About 12% of clues read zero, so a couple appear on most boards — find them first.

Black squares are rare, and that is the point

Only about 10% of the grid ends up black. Combined with the rule that black squares may never touch each other, this makes them far more constrained than they look: each one you place turns its four neighbours into loop squares for free.

Arrow values over 36 generated boards.
Arrow reads 01 23
Share of clues12%70%16%1%

Most arrows read 1. That is the workhorse case: somewhere along that line sits exactly one black square, and the moment another clue overlaps the same line, the two together usually pin it down.

Use the loop, not just the numbers

The mistake that costs the most time is treating Yajilin as a black-square puzzle with a loop drawn in afterwards. The loop constrains the black squares just as hard as the arrows do.

Two loop facts do most of the work. First, a loop square in a corner has only one possible pair of connections — it must join both its neighbours, so those edges are forced. Second, a square with only two available neighbours is fully determined: the loop must enter by one and leave by the other. Since clue squares are holes the loop cannot use, every clue creates more of these forced squares around it.

Working the two constraints together is the whole skill: an arrow tells you where a black square is, a black square creates loop squares, and forced loop connections in turn rule out places a black square could have gone.

A worked board

A Yajilin puzzle as it starts A grid with arrow clues. Each arrow counts the black squares along its line. Everything that is neither a clue nor black must end up on one closed loop.
A 7×7 board with 12 arrow clues.
The solved Yajilin grid The finished puzzle. The loop passes exactly once through every square that is neither a clue nor black, no two black squares touch, and every arrow counts correctly.
The solution: three black squares, none touching, and a single closed loop through every remaining square.

Where solvers get stuck

Forgetting the loop must be one piece. Several separate loops satisfy every arrow and still lose. If a connection would close a small loop early while squares remain outside it, that connection is wrong — and spotting it early saves a lot of erasing.

Treating clue squares as ordinary. A clue square is a hole: the loop cannot pass through it and it can never be black. Each one carves the available space and forces the loop around it.

Reading an arrow as "the next square". The count runs to the edge of the grid. An arrow reading 1 with eight squares ahead of it is a much weaker statement than one with two squares ahead — and the short lines near an edge are where certainty lives.

Two things you can check about these puzzles

Every puzzle has exactly one solution. This was not previously true, and the failure was worse than usual: nothing checked uniqueness, and when generation failed the page installed a blank grid. Measured against an exhaustive counter, most 7×7 boards had three or more solutions and Hard had none that were unique. Boards are now counted before release and retried until the count is exactly one, and the failure path falls back to an easier board rather than an empty one. 47 boards across every size and difficulty were then re-checked against a separate counter written from the rules alone; all 47 were unique.

More clues is what made that possible. Arrow clues used to cover 14–22% of the grid, and at that density a board is not just ambiguous but effectively impossible to check — a 10×10 could not be counted at all. At around 40% the same board becomes both unique and quick to verify: measured, 48% clues gave 6 of 6 unique in 82 ms against 0 of 3 uncountable at 18%.

Yajilin and the loop family

Yajilin is Nikoli's, its name meaning roughly "arrow ring". It belongs to the loop family with Slitherlink and Masyu, but differs from both in a way that defines it: the loop does not have to visit every square, because you decide which squares to remove.

That is what makes it two puzzles interlocked. Slitherlink gives you counts and asks for a loop; Masyu gives you constraints on how the loop turns. Yajilin asks you to work out the board's shape and the loop through it at the same time, each half feeding the other.

More loop puzzles

If you like drawing a single closed loop, try these:

Puzzle Solved!