Color Flood Strategy

How color flood works

Your patch is the region joined to the top left corner. Each move you choose a color: the whole patch takes it and joins every touching cell of that color. You win when the board is one color within the move limit. It is a game version of the flood fill algorithm behind the paint bucket in drawing programs:

It is used in the "bucket" fill tool of paint programs to fill connected, similarly colored areas with a different color, and in games such as Go and Minesweeper for determining which pieces are cleared.

Wikipedia: Flood fill

Play today's color flood or a practice board while you read.

1. Aim for the middle of the board

Grow your patch toward the center first. From the middle, every later move touches more of the board.

2. Choose by border, not by area

Pick the color that lines most of your patch’s edge, so the next move has more to grab. A big blob far away does not help yet.

3. Finish off colors that are nearly gone

When a color only has a few cells left, taking them removes that color from the board for good, so you need one move less later.

4. Count the colors left near the end

Once your patch covers most of the board, you need at least one move per color still showing. Pick them in an order that clears pockets in one go.

Why the greedy color flood move loses

In color flood, the greedy move (always taking the color that adds the most cells) feels right because the patch visibly grows. But a big grab in a corner can leave your border touching mostly one color, and the next move adds little. We played 400 random boards with 6 colors twice: once with a greedy player that always takes the color adding the most cells, once with our beam search solver.

Average moves to clear the board, 6 colors
BoardOur solverGreedy playerExtra movesBoards where greedy was worse
12×121822.9+4.9100%
14×1420.426.4+6100%
16×1622.629.8+7.2100%
18×1825.133.9+8.8100%

The daily puzzle gives you our solver's count plus a few spare moves, and on Sunday (18×18) none at all, so greedy play runs out of moves. More numbers are in the difficulty report.

Why no program can promise the fewest color flood moves

Finding the true minimum number of moves in color flood is a hard problem. In the paper that analysed this kind of game, where c is the number of colors:

We show that finding the minimum number of flooding operations is NP-hard for c>=3 and that this even holds when the player can perform flooding operations from any position on the board.

Clifford, Jalsenius, Montanaro and Sach, “The Complexity of Flood Filling Games”, Theory of Computing Systems, 2012 (arXiv:1001.4420)

Our boards use 6 colors, so the minimum cannot be found quickly in general. The solver searches many lines at once and keeps the best, so the result screen says "our solution" rather than "the minimum", and why a sharp player can sometimes beat it.

Questions and answers

What is the best strategy for color flood?
Grow toward the middle of the board, choose colors by how much of your border they line rather than by how many cells they add right now, and clear colors that are almost gone. Then finish with one move per remaining color.
Is picking the biggest area each turn a good strategy?
No. In our test on 400 boards, always taking the color that adds the most cells needed 4.9 more moves than our solver on 12×12 boards and 8.8 more on 18×18 boards.
Is color flood the same as Flood-It?
It is the same kind of puzzle, often called a flood fill game: you repeatedly recolor the region joined to one corner until the board is one color. Our boards, colors and daily puzzle are our own.
Can you always find the fewest moves?
Not quickly. Researchers proved that finding the minimum number of moves is NP-hard with three or more colors, so our move limit comes from a solver’s best effort plus a little slack.

Sources

  1. Clifford, Jalsenius, Montanaro and Sach, “The Complexity of Flood Filling Games”, Theory of Computing Systems, 2012 (arXiv:1001.4420)
  2. Wikipedia: Flood fill

Play next

More guides