Flood-Fill Color Puzzles: The Logic Behind Filling a Board in Limited Moves

This puzzle looks like simple coloring, but every click reshapes which colors are even reachable next. Here is how it actually works.

Picking a color grows your region outward

You control a single connected region that starts at one fixed cell, usually the top-left corner. Choosing a color instantly absorbs every cell of that color touching your region's current border, growing it outward in one step.

You have a fixed number of moves to cover the board

The puzzle gives a move budget tied to the board size and color count. The goal is for your region to swallow every cell on the board before you run out of moves, not just to keep making legal picks.

Picking a color already inside your region does nothing

If none of the cells touching your region's border are that color, the move is wasted entirely — your region stays exactly the same size, which is the single most common way players burn through their move budget without progress.

What matters is the border, not the whole board

Efficient play means tracking which colors currently touch your region's edge, not how much of each color exists on the whole board. A color that dominates the board but never touches your frontier is irrelevant to your next move.

Finding the truly optimal solution is a genuinely hard problem

Solving a flood-fill board in the fewest possible moves is what computer scientists call an NP-hard problem for general boards, which is why even strong players rely on greedy, look-ahead heuristics rather than a guaranteed-perfect method.

Why the frontier grows faster than you expect

Early moves on a fresh board tend to absorb only a handful of cells, since your region's border is still small. But as the region grows, its border touches more of the board at once, so a well-chosen color late in the puzzle can swallow a large fraction of what remains in a single move — which is why sequencing matters more than any individual pick.

The math behind an easy-looking game

Researchers have formally studied this exact puzzle (often published under the name "Flood-It") and shown that determining the minimum number of moves needed for an arbitrary board is NP-hard. That does not mean any given puzzle is unsolvable within its move limit — puzzle generators account for this — but it does mean there is no simple shortcut formula for finding the perfect sequence on a large board.

Frequently Asked Questions

Is every puzzle guaranteed to be solvable within its move limit?

Well-designed versions generate the board and move limit together specifically so a solution exists, typically with some slack built in above the mathematically optimal number of moves. A puzzle that ships with an impossible move count is a bug, not the intended difficulty.

What is the best general strategy for large boards?

Favor whichever color currently touches the most of your region's border rather than the color that appears most often on the whole board, and try to look one move ahead to see which choice sets up the biggest absorption on your following turn.