Solver · Live
Water Sort Puzzle Solver,
every pour, step by step.
A free water sort puzzle solver for water sort, ball sort and color sort games. Tap your colors into the tubes, press Solve, and get a numbered list of which tube to pour into which, found by a search that runs privately in your browser.
Interactive
Set up your puzzle
Tubes
Tube capacity
Move rule
The whole top color moves at once, as far as the next tube has room.
Pick a color, then tap a tubeRed
The number under each color is how many you have placed. In most puzzles every color appears 4 times.
Your tubes
Bottom to top, left to right
Ready. Press Solve to get the pour list.
Field guide
How the water sort puzzle solver works.
A water sort puzzle, also sold as a ball sort or color sort puzzle, gives you a row of tubes filled with stacked colors plus a couple of empty ones. You win when every tube holds a single color. This water sort puzzle solver takes the tubes exactly as they look on your screen and returns a numbered list of pours, so you can follow along one move at a time instead of guessing.
The rules this solver uses
- The top color of one tube can move onto another tube only when the destination has free space and is either empty or already shows the same color on top.
- In pour mode (water sort) the whole top block of one color moves together, as far as the destination has room. In one unit mode (ball sort) a single unit moves per step.
- The puzzle is solved when every tube holds one color and no color is split across two tubes. Tubes do not have to be full.
- Hidden layers, locked tubes, bonus tubes and other special mechanics that individual apps add are not modeled.
Entering your puzzle in under a minute
Set the number of tubes and the tube capacity, then choose the move rule. Pick a color in the palette and tap a tube to drop that color on top of its stack, working from the bottom of each tube upward. Once a color reaches the tube capacity, the palette jumps to the next color. The small number under each swatch counts how many of that color you have placed. In most puzzles every color appears as many times as a tube holds, so a mismatch usually points to a typo. The undo button under a tube removes its top unit.
A worked example
Take two colors, red and orange, and a capacity of three. Tube 1 holds red, orange, red from bottom to top, tube 2 holds orange, red, orange, and tube 3 is empty. The solver returns five pours:
- Tube 1 to tube 3 (red)
- Tube 2 to tube 1 (orange)
- Tube 2 to tube 3 (red)
- Tube 1 to tube 2 (two oranges)
- Tube 1 to tube 3 (red)
The red on top of tube 1 moves into the empty tube. The orange on top of tube 2 lands on the orange now showing in tube 1, which uncovers a red that follows the first one. Then the two oranges travel together into tube 2, and the last red finishes tube 3. The solver reports five moves as the shortest possible for this setup.
How the search finds the answer
Every arrangement of the tubes is a position, and every legal pour leads to a new position. The order of the tubes does not change what a position is, so the solver sorts the tubes before hashing each position, which keeps it from visiting the same arrangement twice. It then runs A* search with a lower bound on the moves still needed:
A boundary is a place where two different colors touch inside a tube, and a block is one unbroken stretch of a single color. One pour can remove at most one boundary, so the bound never overestimates, which is what lets A* prove that a list is the shortest. On a very large puzzle the solver falls back to a faster weighted search. That search still returns a legal list of pours, but it labels the list as possibly longer than necessary. If every reachable position has been checked and none is sorted, the solver says so instead of leaving you waiting.
When the solver says there is no solution
The usual cause is a typo: a unit in the wrong tube or a missing unit. Dead ends are real, too: with a single empty tube and many colors, a random arrangement is often impossible. If the message says the search limit was reached, the puzzle was not proven impossible, only too large to finish inside a browser tab.
Tips for solving without help
- Keep one empty tube in reserve for as long as you can, since it is your only free move.
- Look at the colors at the very bottom of each tube first. They decide how many pours you will need.
- Before filling an empty tube, check which color you can finish completely in it.
Disclaimer: This tool is an independent fan creation and is not affiliated with, authorized, or endorsed by the developer or publisher of any water sort, ball sort or color sort game. Game and app names belong to their respective owners. Provided for practice and entertainment only; results depend on the colors you enter.