Filling (Simon Tatham's Puzzles)

Saved games stay in this browser only.

About the puzzle

Filling starts as a grid with a few digits scattered over it. Your job is to write a digit in every empty square so that the whole grid breaks up into regions, each one made of touching squares that all hold the same digit, and each with exactly as many squares as that digit: a 1 is a single square on its own, a 4 is a group of four squares all reading 4, and so on.

The puzzle comes from the Japanese publisher Nikoli, where it is called Fillomino. Jonas Kölker wrote this version for the collection, and every grid it generates has a single solution.

Rules

  • Every square holds a digit from 1 to 9.
  • Squares that touch side by side and hold the same digit belong to the same region (diagonal contact does not count).
  • Every region has exactly as many squares as the digit written in it.
  • So two equal regions can never touch along a side, or they would merge into one bigger region. Different digits may border each other freely.

Controls

Input Action
Click on an empty square, then a digit fill the square with that digit
Drag across several squares, then a digit fill them all at once
0 / Backspace / Enter clear the selected squares
Arrow keys move the cursor; a digit fills the square under it
Enter, then arrow keys, then Enter select a block of squares with the keyboard
Space add or remove the square under the cursor from the selection
Escape drop the selection
N / U / R new game / undo / redo

How to solve it

Ones stand alone. Two 1s can never touch, and a square squeezed between finished regions with no room to grow becomes a 1 itself.

Finish the regions that are nearly full. A 3 with two squares already written needs one more; if only one empty neighbour can take it, that square is a 3. Count squares, not clues: a group of three 3s is complete, and every square around it must be some other digit.

Keep equal regions apart. If a 2 is complete, the empty squares around it cannot be 2. Two clues with the same digit next to each other but in different places may still be one region, so check whether they can join without growing too big.

Count the room. An empty pocket of five squares surrounded by finished regions must be split into regions whose sizes add up to five, and each piece has to fit its own shape. Small pockets usually allow only one way.

Grow from big clues. A 6 in a corner with walls of other digits around it often has only one path to reach six squares, and each step along it is forced.

Sizes and difficulty

The Type menu has 9x7, 13x9 and 17x13 grids; Custom sets any width and height. There are no difficulty levels: bigger grids simply take longer.

Playing here

Click Play to open the puzzle. The menu above the board has New game, Restart, Undo, Redo and Solve (which you can undo to keep going on your own), the Type menu with the sizes, and the Game menu, where you can type in a game ID or a random seed, download the current game as a file, load a saved file and change the preferences. Your game in progress is kept in this browser and comes back with its whole undo history the next time you open the page.

On a touch screen, tap a square (or drag across several) and use the number keys that appear below the board; the Clear key empties them.

Credits and licence

Filling was written by Jonas Kölker for Simon Tatham's Portable Puzzle Collection, which Simon Tatham maintains with code contributed by several other authors and distributes with its source code under the MIT licence. This page runs a WebAssembly build made by FredyGames from the author's official source snapshot, with no changes to the puzzle; the source and the build script are hosted with the game, and the licence text is linked from this page.