GenerateRandomSearch

Tapa Puzzle Generator

Tapa asks a harder question than most shading puzzles: not how many squares are shaded around a clue, but in how many separate stretches. A clue of 3 says the eight squares around it hold one unbroken run of three. A clue of 1 2 says they hold a single square and a pair, standing apart, in either order — and working out which way round is where the puzzle lives. On top of that the shading has to end up as one connected wall with no two-by-two block filled solid.

What this generator does

Grows a connected wall at random, writes on every unshaded square the runs of shading around it, then takes clues away one at a time — keeping a removal only while the clues that remain still lead to a single wall.

How to use this tool

  1. Choose a grid size and how heavy a wall you want.
  2. Print or copy the grid — the clue squares stay unshaded as you work.
  3. Read each clue as run lengths around the ring of eight, carrying on past the corners.
  4. Keep the shaded squares joined into one piece, and never fill a two-by-two block.
  5. Show the answer when you want to check the wall you have drawn.

Understanding the controls

Grid
Six to nine squares a side. Nine is the ceiling because proving a single answer is the slow part: the worst of a hundred and twenty nine-square grids took three seconds, and ten-square grids reached six and a half.
Wall
Roughly how much of the grid the finished wall covers. A thin wall leaves more clue squares and smaller numbers; a thick one gives longer runs and fewer places to write them.
Seed (optional)
Type any word to rebuild the same grid another day, which is how you reprint a sheet you have mislaid. Deterministic, not cryptographic.

Common use cases

  • A tougher shading puzzle for solvers who find counting puzzles too direct
  • A printable page for a puzzle club, a newsletter or a long journey
  • Practice at reasoning about arrangement rather than quantity
  • A single puzzle you can set several people from the same seed
  • Something to solve on paper with nothing but a pencil

How this generator works

Every clue is turned into the full set of eight-square patterns that could print it — a clue of 2 1, for instance, has a fixed number of ways to sit round a ring — and the solve keeps only the patterns still consistent with what is decided, fixing any square all of them agree about. When nothing more is forced it guesses in the clue with fewest patterns left. Two rules prune hard alongside that: a two-by-two block that has gone solid kills the branch immediately, and so does a lump of wall that has been sealed off from another lump. Clues are then removed one at a time and a removal is kept only while a single answer survives.

Randomness and fairness

The wall is grown at random, and every clue on the page is read off it, so the puzzle comes from your browser's cryptographic random source unless you give a seed. A seed is there for reproducibility, not cryptographic strength: it makes the same grid come back, and anyone holding it can rebuild your puzzle.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Nine squares a side is the ceiling, set by the time the proof takes rather than by any shortage of puzzles — grids up to twelve build perfectly well, just slowly.
  • Each proof works to a fixed budget of guesses. A grid whose proof exceeds it is thrown away rather than published unproved, so an occasional build quietly retries.
  • Difficulty is not graded. A grid full of single-run clues can be gentler than a smaller one full of two-part clues.
  • About one square in six ends up carrying a clue, and that varies from grid to grid.
  • The grid is drawn for the screen; there is no separate print layout.

Privacy and your data

The wall, the clues and the proof all run in your browser. Nothing you type as a seed, and no puzzle or answer built from it, leaves the device.