A water sort board that cannot be solved is a design failure, and this engine refuses to ship one. Before a level reaches your screen, the generator either proves a solution exists or rebuilds the board from a solved state by playing backwards. The rules below turn that guarantee into a solving order you can follow every level.
How water sort boards are built and checked
Level generation draws from a seeded random stream keyed to the level number, seed level times 7919 plus 131 per attempt, so the same level always deals the same board. Restarting a level is free information, since the layout returns identical.
Each attempt shuffles all color pieces and deals them into tubes of 4 layers, then adds exactly 2 empty tubes. The attempt is rejected if any tube starts fully sorted. It is then handed to a solver, a depth first search over up to 15000 states that only tries moves the engine itself classifies as useful. An attempt that passes becomes your board.
If all 50 attempts fail the solver, the engine switches to the fallback. It starts from the solved state and plays 30 plus 10 moves per color, one layer at a time, using only legal pours. A board built by inverting legal moves is solvable by construction. Either way, a solution exists before you see the first tube.
Board sizes are fully determined
The color count is level plus 2, capped at 8. Layer depth is always 4, and the empty tube count is always 2, never more.
1. Level 1 deals 3 colors in 3 tubes plus 2 empties, 5 tubes total.
2. Level 4 deals 6 colors across 8 tubes.
3. Level 6 and every level after deals the maximum, 8 colors across 10 tubes.
Difficulty grows through color count and shuffle depth alone. Your spare capacity stays fixed at 8 empty layers, which is exactly two tubes, and that constant is what every hard level pressures.
Pour rules decide which moves exist
A pour is legal when the target tube is empty, or when its top color matches the source top color and it has room. The whole run of the top color moves at once, up to the free space in the target. Two consequences follow.
First, pouring a 3 layer run into a tube with 1 free space strands the other 2 layers on the source. Count the run and the space before you commit. Second, the engine's own useful-move filter refuses two moves, pouring from a completed tube and moving a single-color run into an empty tube. Copy both rules, because the solver that proves your board solvable treats them as dead ends.
A deterministic solving order for water sort
Work through the tubes in this sequence.
1. Scan for a bottom layer whose color also sits on top of another tube. That tube can never finish until its bottom is reached, so drain toward it first.
2. Pour any top run onto a matching color in a non-empty tube whenever possible. Matching pours cost no empty space.
3. Spend an empty tube only when rule 2 has no move, and never park a single-color full run in an empty tube.
4. Keep the second empty untouched until the final third of the board. One empty absorbs mistakes, and two empties in sequence unlock deep unstacking.
5. When two tubes hold the same top color, pour from the one whose run is shorter into the one whose run is longer, since this empties a tube sooner.
The math behind the order. Finishing a color needs its 4 layers in one tube, and every layer that sits under a foreign color must first move somewhere. The 8 spare layers absorb exactly two full colors of displacement, so early moves should always reduce, never rearrange, the number of buried layers.
Undo, hints, and par
Undo is unlimited and decrements the move counter, so a wrong pour costs nothing but time. Each level offers 3 hints. Par is estimated as colors times 3 plus half the level number, which is 9 moves at level 1 and 27 at level 6. Treat par as a rough marker, since it is a formula, not a solver output.
Water sort pre-move checklist
- [ ] Counted the top run length and the target free space.
- [ ] Identified the most buried bottom layer and worked toward it.
- [ ] Confirmed no matching-color pour exists before spending an empty.
- [ ] Kept at least one empty tube in reserve.
- [ ] Refused to move a completed or single-color tube into an empty.
- [ ] Used undo immediately on any pour that buries a needed color.
The honest downside. The 15000 state solver bound is generous for small boards and can run out on dense 8 color shuffles, which then fall back to reverse-move generation. Those boards are still solvable, and they can also start awkwardly, with buried bottoms that force long empty-tube sequences. Par is an estimate, so finishing above it is common on high levels. Open the [water sort game](/en/water-sort) and test the solving order against your own boards. If you find a layout where step 1 and step 3 conflict, send the level number, since the seed makes it exactly reproducible.