Tilepaint in the browser with four rule sets inside. An n×n
grid is cut into tiles. Paint whole tiles — never single cells — so
that every row and column printed with a number holds exactly that many
painted cells. Rows and columns without a number are free. Puzzle #41
in the solver series.
Demo: https://sen.ltd/portfolio/tilepaint/
Repo: https://github.com/sen-ltd/tilepaint
I picked this puzzle for two reasons.
The variable is the tile, not the cell
There is no such decision as "a cell" in this solver. It keeps one
black-or-white boolean per tile; a cell is only a projection of its
tile. Every numbered line then becomes a subset-sum constraint over
the tile slices that cross it (a slice is the number of cells a tile
has in that line), and a tile crossing several lines couples those
constraints. Tilepaint is a nonogram whose lines share variables.
That reading comes with a built-in sanity check at the degenerate limit.
Cut every tile down to a single cell and Tilepaint is binary
tomography — reconstructing a 0/1 matrix from its row and column sums,
a classical problem famous for its ambiguity. The measurement agrees
exactly. Granularity sweep at 8×8, every line numbered, 150 raw boards
per point:
| maxSize | tiles (mean) | unique | probe solves | count-only solves |
|---|---|---|---|---|
| 1 | 64.0 | 0.0% | 0.0% | 0.0% |
| 2 | 45.5 | 1.3% | 1.3% | 0.0% |
| 3 | 35.9 | 48.7% | 48.7% | 1.3% |
| 5 | 25.5 | 93.3% | 93.3% | 19.3% |
| 8 | 18.6 | 98.7% | 98.7% | 48.0% |
| 12 | 13.8 | 100.0% | 100.0% | 78.7% |
Row one is tomography. The information ledger closes too: the 2n = 16
clues carry at most 16·log₂9 ≈ 51 bits; 64 free booleans cannot fit, 14
fit with room to spare. Bigger tiles are exactly the information added
to the tomography problem — they are what makes the puzzle a puzzle.
One law, three strengths, then a probe
The four rungs are all the same subset-sum law, read more and more
carefully:
- count — the line as an interval, both directions: number reached, the rest of the line is white; number equals everything still open, paint it all.
- edge — greedy bounds per tile: a slice bigger than the line's remaining debt is white; a slice that the total of the others cannot cover for is painted.
- fit — exact reachability: which subsets of the open slices actually compose the debt? A slice in every such subset is painted; in none, white.
- probe — assume a color on one tile, run the rules below to a fixpoint, drop the assumption if that alone is a contradiction.
The gap between edge and fit is the gap between totals and
composability. Slices {2, 2, 2} owing 3 sail through every greedy
bound — each slice is ≤ 3, the others always total ≥ 4 — but the subset
sums are {0, 2, 4, 6} and 3 is not among them. Only fit sees the
corpse. The implementation keeps prefix and suffix subset-sum bitmasks
per line, so each tile's "reachable without me" set costs one combine.
As forcing rules the rungs are nested by construction:
count ⊂ edge ⊂ fit. That nesting predicts the ablation table as a
theorem. Both tables, 300 raw full-disclosure boards per size:
Incremental — add one rung at a time:
| board | count | +edge | +fit | +probe | unique in the raw stream |
|---|---|---|---|---|---|
| 6×6 | 61.7% | 98.7% | 98.7% | 98.7% | 98.7% |
| 8×8 | 22.3% | 87.7% | 90.0% | 91.7% | 91.7% |
| 10×10 | 1.3% | 54.0% | 60.3% | 82.3% | 82.7% |
Ablation — full ladder minus one rung:
| board | full | −count | −edge | −fit |
|---|---|---|---|---|
| 6×6 | 98.7% | 98.7% | 98.7% | 98.7% |
| 8×8 | 91.7% | 91.7% | 91.7% | 91.7% |
| 10×10 | 82.3% | 82.3% | 82.3% | 82.3% |
Perfectly flat. For −count and −edge that is the nesting theorem
doing its job; even −fit costs nothing, because the probe recovers fit's
share by branching. Read only the ablation and every rule looks
redundant; read only the incremental ladder and every rule looks
essential. This series keeps re-learning the same lesson — run both —
and Tilepaint states it in its cleanest form: one side is a theorem, the
other a measurement.
The ambiguity a single-tile probe cannot see
This series carries a folk law — the probe fixpoint finishes ⇔ the
board is unique — and it broke for the first time on Kurotto, an
arithmetic-only puzzle. That was not a coincidence. When every law is
arithmetic, ambiguity lives in multi-tile swaps, and a one-tile
assumption cannot contradict a two-tile trade. Tilepaint is pure
arithmetic, and the gap reproduced on schedule: at 10×10, one unique
board in 248 resists the probe (82.3% probe-solved vs 82.7% unique).
"Probe finishes ⇒ unique" holds everywhere; only the converse fails.
The gap has a face you can read off a finished answer, with no search:
- a single silent flip is a tile touching no numbered line — possible only after thinning, and provably impossible at full disclosure (every tile touches its own row);
- a pair silent flip is a painted/unpainted pair whose slice vectors agree on every numbered line — swapping them moves no number.
Measured on 300 boards per size: at half clue density, 249 of 290
non-unique 8×8 boards are explained by a single pair certificate. At
full disclosure: 0 of 81. Full-disclosure ambiguity is the
tomography kind — the classical 2×2 switch is a four-tile trade
(flip two diagonal pairs; every row and column count survives),
invisible to the probe and to the pair test alike. One density dial
moves the ambiguity's home address from pairs to chains.
Generation is a coin flip
Tilepaint is the first puzzle in this series whose configuration space
is everything: with no connectivity, shape, or adjacency law, all 2^R
colorings of R tiles are legal answers. The generator draws a partition,
flips a coin per tile, and reads the row and column numbers off the
answer. No search, no retries, no restart caps — the heavy-tailed DFS
pathology that once hung this series' Aqre generator for eight hours has
nowhere to live.
The shipped bank (60 boards: 6×6/8×8/10×10 × four grades × 5) is made by
thinning full-disclosure clues while the target rule set still finishes
the board, grading each survivor by the weakest level that finishes it,
and re-proving uniqueness with the searching engine. Median clues kept:
7 of 12, 10 of 16, 13 of 20. Median guesses in the uniqueness proof:
0 at every size — the fixpoint alone carries it.
Engine trust is a two-way check: a propagating search at each of the
four rule levels against a brute force over raw tile assignments that
shares no code with the ladder — no slice table, no subset sums, just
line tallies and the printed-rules validator. 800/800 (board, level)
pairs agree on solution counts. Certificates are verified in both
directions too: every detected silent pair really is a second solution,
and the brute force confirms the counts.
Play it
The demo ships all 60 boards with four hint levels — each hint names the
rung that proves it and the tile it proves. Broken lines turn their
number red; satisfied, fully decided lines go quiet. 34 tests.
Built at SEN LLC — small, measured, shipped.

Top comments (0)