Sashigane (さしがね, "carpenter's square") in the browser with a
four-rung solver. This one has a property most Nikoli puzzles do not:
every circle is given. A circle always sits on a piece's bend, so the
circles printed on the board are the set of corners — you know how many
pieces there are and where every corner is before you place a single square.
The only unknown is how far the arms reach. So what are the clues doing? I
measured it, and the load-bearing part is which cell the arrow sits on;
which way it points is worth about a tenth of that. And the one freedom a
setter has left — which of two ends the arrow goes on — swings the odds of the
board being a puzzle at all between 11.3% and 29.8% on a 12×12. Puzzle #55 in
the solver series.
Demo: https://sen.ltd/portfolio/sashigane/
Repo: https://github.com/sen-ltd/sashigane
Rules
- Cut the board into L-shaped pieces of width one — two straight arms of at least one cell each, meeting at a right angle. The smallest piece is three cells.
- Every piece holds exactly one circle, on the bend.
- Every piece holds exactly one arrow, on one of its two far ends, pointing back along its arm at the bend.
- A number inside a circle is that piece's cell count. Circles may be bare.
Rule 2 does a lot of work. Every piece has a circle and it is always on the bend,
so the printed circles are exactly the corners of the answer. Piece count and
corner positions come free.
And the arrow has a property that most puzzle arrows do not. It is on an end
and it points home, which means it fixes one whole arm outright: the arm runs
in the reverse of the arrow's direction, and its length is the distance from the
arrow to the bend. The arrow is not one bit of directional information — it is a
complete specification of one arm.
Put those together and the shape of the problem is clear. Every corner is known;
one arm of every piece is known. All that is left is which of two perpendicular
sides the other arm falls on, and how far it goes.
1. The blank board is not always solvable
Before any clue, count how many ways an empty grid falls into L-shapes at all.
On a one-cell-wide strip, none — an L needs two dimensions. On 2×2, none. And on
3×3, none: nine cells would have to split as 3+3+3 or 4+5 (the largest L that
fits in a 3×3 is five cells), and neither can be done. It is the only square
that fails, and it sits between 2×3, which works two ways, and 3×4, which works
twenty.
| 2×n | 0 | 0 | 2 | 2 | 2 | 6 | 10 | 14 | 26 | 46 | 74 | 126 | 218 | 366 |
| 3×n | 0 | 2 | 0 | 20 | 64 | 234 | 664 | 2220 | 7476 | 25882 | ||||
| 4×n | 0 | 2 | 20 | 110 | 752 | 4522 | 27380 | 167078 | ||||||
| 5×n | 0 | 2 | 64 | 752 | 7720 | 84846 | 908020 | |||||||
| 6×n | 0 | 6 | 234 | 4522 | 84846 | 1557970 |
The strip has a linear recurrence. Every term past the third satisfies
a(n) = a(n−1) + 2·a(n−3)
which is OEIS A052537, generating function
(1−x)/(1−x−2x³). I have no bijective proof, so it lives in the repository as an
identity re-checked against every computed term on every test run. None of the
other rows, and not the square diagonal 0, 0, 0, 110, 7720, 1557970, returns
anything from OEIS (searched 2026-09-05). Every value past 4×6 is cross-checked
by computing the transpose, which the scanner walks in a completely different
order.
Pieces are at least three cells, so a board carries at most ⌊h·w/3⌋ circles —
and that ceiling is reached: 4×6 admits partitions into all eight pieces.
2. Print every number and the puzzle stops being one
The arrow already fixes one arm. Add the number and the other arm's length is
fixed too. The only thing left is which side it falls on.
So a fully clued circle has at most two shapes. Over 136,576 fully clued
circles drawn from every partition of 3×5, 4×4 and 4×5, 80.3% had exactly one
shape and 19.7% had two. Never three.
And the tiling always picks between them. Cross every partition of a board with
every one of the 2^k ways to place the arrows, with all numbers printed:
| board | (partition, arrow-mask) pairs | with exactly one answer |
|---|---|---|
| 2×6 | 72 | 100.0% |
| 3×4 | 192 | 100.0% |
| 3×5 | 896 | 100.0% |
| 3×6 | 6,432 | 100.0% |
| 4×4 | 1,888 | 100.0% |
| 4×5 | 24,416 | 100.0% |
33,896 boards, not one ambiguous, plus a random search from 5×5 up to 10×10
that also found none. I have no proof, so this is a measurement and not a
theorem — but what it says is that the interesting Sashigane board is the one
with the numbers taken off, which is why this generator erases as many as it
can.
3. Take the numbers away and the arrow end starts to matter
The same exhaustion with the circles left bare:
| board | pairs | unique | answers no arrow placement can pin |
|---|---|---|---|
| 2×6 | 72 | 100.0% | 0 of 6 |
| 3×4 | 192 | 87.5% | 0 of 20 |
| 3×5 | 896 | 81.3% | 0 of 64 |
| 3×6 | 6,432 | 73.5% | 0 of 234 |
| 4×4 | 1,888 | 87.3% | 0 of 110 |
| 4×5 | 24,416 | 74.8% | 0 of 752 |
| 4×6 | 284,000 | 70.9% | 0 of 4,522 |
The last column is the reassuring one: no answer is unprintable. Every
partition counted here has at least one arrow placement that pins it. But more
than a quarter of the choices are wrong, and the setter has to find a right one.
4. The arrow end is the only choice the setter has, and it is worth 2.6×
Circles are forced onto the bends and the numbers get erased, so the only thing a
Sashigane setter really decides is which of a piece's two ends carries the
arrow — a choice that is completely invisible in the answer. Take the same
random answers and draw each of them three ways: every arrow on its piece's
longer arm, every arrow on the shorter arm, and one coin flip per piece.
| board | pieces | all on the long arm | all on the short arm | coin flip |
|---|---|---|---|---|
| 6×6 | median 6 | 57.9% | 49.8% | 49.9% |
| 8×8 | median 9 | 41.8% | 44.8% | 30.4% |
| 12×12 | median 14 | 20.8% | 29.8% | 11.3% |
The first two columns are 1200, 1200 and 400 answers; the coin-flip column is
eight independent masks per answer, so 9,600, 9,600 and 3,200 boards.
Two things come out, and only one of them is what I expected.
A consistent convention beats an inconsistent one, every time. At 12×12 the
short-arm convention pins the answer 29.8% of the time and a coin flip 11.3% —
same answers, same circles, same number of arrows, differing only in which end
each arrow went on. I do not have a mechanism for it. Ambiguity is a property of
the printed board alone and the solver never learns the convention, so all a
convention can do is change which boards you land on. Apparently it lands on
better ones.
And which convention is better flips with the board size. Long arm wins at
6×6 by eight points; short arm wins at 12×12 by nine. At 8×8 they are within a
couple of points, which is inside the sampling error here. So there is no rule of
thumb to hand a setter — only the fact that guessing is the one thing that is
reliably wrong.
5. The numbers really are nearly free
The generator prints every number, confirms uniqueness, then erases numbers one
at a time and keeps every erasure that survives. Very little survives:
| bank | pieces | numbers left | unique with no numbers |
|---|---|---|---|
| 8×8, 40 boards | median 9 | 0–2, median 0 | 22 of 40 |
| 12×12, 32 boards | median 17 | 0–4, median 1 | 10 of 32 |
More than half the 8×8 boards shipped here carry no number anywhere. The circles
and the arrows are the puzzle.
6. Which clause is load-bearing — position beats direction ten to one
Each clause switched off in turn, over all 72 shipped boards:
| rule removed | boards that stop being unique | median answers when they do | branch points |
|---|---|---|---|
| nothing | 0 / 72 | — | 0 |
| the arrow points home | 5 / 72 | 2 | 12 |
| the arrow sits at an end | 52 / 72 | 6 | 1,006 |
| the circle sits on the bend | 22 / 72 | 2.5 | 146 |
| a number equals the piece size | 40 / 72 | 5 | 386 |
The arrow's position is worth ten times the arrow's direction. That is the
opposite of where the rule puts its weight. "An arrow at an end pointing at the
circle" reads like one clue whose content is the direction, with the position as
the peg it hangs on. It is the other way round: knowing which cell is an end is
nearly all of it, and knowing which way it points adds a little on top.
The last row is a self-check rather than a finding — the numbers were minimised,
so every surviving number is load-bearing by construction, and exactly the 40
boards that still carry one lose uniqueness when the size rule goes.
7. The ladder, and how much of it never fires
| rung | what it does |
|---|---|
fit |
build each circle's candidate list: an L is admissible if it holds this circle at its bend, no other circle, exactly one arrow, at an end, pointing home, and the right cell count |
cover |
every cell has exactly one owner. If only one circle can reach a cell, its piece takes it. If every survivor of a circle covers a cell, nobody else may |
area |
sizes add to h·w, so a candidate whose size leaves the rest an impossible remainder dies |
probe |
force each survivor in turn and run the rungs below |
Branch points needed to prove the answer unique, summed over the shipped boards:
fit |
cover |
area |
probe |
|
|---|---|---|---|---|
| 8×8, 40 boards | 4,053,280* | 0 | 0 | 0 |
| 12×12, 32 boards | 9,600,032* | 0 | 0 | 0 |
* five 8×8 boards and every 12×12 board hit a 300,000-branch cap, so those two
cells are lower bounds.
cover finishes every board on this bank without a guess, so area and probe
never fire in anger. They stay because area is what rejects a board whose
numbers cannot add up, and probe is what the generator leans on while deciding
whether a draft is unique.
fit alone — pure exact cover with no propagation — settles 94.4% of an 8×8 by
construction and then needs millions of branch points for the rest. One rung
buys the last 5.6% and all of the search.
8. A size budget that needs no search at all
The pieces cover the board, so their sizes add to h·w. Every printed number
takes its share off the top. Every piece without a number needs at least 3 cells
and can hold at most h+w−1. So the leftover has to land inside
[3 · anon, (h+w−1) · anon]
and if it does not, the board has no answer — no partial solution, nothing to
unwind. budgetOf in src/sashigane.ts is the whole implementation, and it runs
live in the panel beside the demo board.
9. The bug the second engine caught
There are two solvers and they share no code. One turns each circle into a
variable whose domain is the L-shapes it could still be, and propagates coverage
and area to a fixpoint. The other never mentions a circle: it walks the grid in
row-major order and, at every unclaimed cell, tries each L-shape that would cover
it.
They disagreed on a board the generator had just produced — the propagator said
one answer, the scanner said two. The cause was a stale index. The cover
rung builds a table of how many of each circle's survivors reach each cell, then
sweeps the cells killing candidates, and the first version kept sweeping on the
table it had built before the kills. A stale count compared against a fresh
survivor count reads as "every survivor of this circle covers this cell" when it
no longer does, which evicts other circles from a cell they were entitled to and
silently deletes real answers. The rung now returns the moment it kills anything,
so the caller rebuilds the table.
The test suite keeps a soundness property for it: for random boards, every cell
the propagator pins to an owner must really have that owner in every answer the
scanner finds.
Takeaways
- Every circle is given and every circle is a bend, so the unknown in Sashigane is only how far the arms reach.
- The arrow sits at an end and points home, so it specifies one whole arm. Add the number and the candidate set collapses to at most two shapes.
- A board with every number printed was unique in all 33,896 exhaustive cases and in every random case up to 10×10. Erasing the numbers is what makes it a puzzle.
- In the ablation, the arrow's position outweighs its direction ten to one — the opposite of where the rule statement puts its emphasis.
- The setter's only remaining freedom, which end each arrow goes on, moves the uniqueness rate from 11.3% to 29.8% on a 12×12. A consistent convention always beats a coin flip; which convention is best flips with the board size.
- The blank 3×3 cannot be cut into L-shapes at all. The 2×n counts are OEIS A052537.
TypeScript, no runtime dependencies, 68 tests. Every number here is reproducible
with npm run stats.
Demo: https://sen.ltd/portfolio/sashigane/
Repo: https://github.com/sen-ltd/sashigane

Top comments (0)