How do you solve a ball sort puzzle?
A ball sort level is finished when every color fills one tube, and each move takes a single ball from the top of a tube into an empty tube or onto a ball of the same color. Because one move carries one ball, you cannot shift a whole run the way water sort pours do — the skill is picking which ball to move next, and every move should either build a color's home tube or uncover a buried ball.
The priorities that solve most levels:
- Start with the worst-buried color. Count the balls sitting above each color's bottom ball. The deepest one decides the level, so spend your early moves reaching it rather than tidying the tops.
- Keep an empty tube. It is the only destination that accepts any ball. Fill it only to finish a color or to free a buried one — the classic losing position is two mixed tubes and no empty left.
- Build on the tube closest to done. A tube whose bottom three balls already match needs only its fourth. Feed that tube before starting a new stack somewhere else.
- Check the counts against the tube size. Every color needs exactly as many balls as a tube holds; if a count is off, the level was copied wrong, not proven impossible.
Watch for the two-color lock: red under blue in one tube, blue under red in another. Neither bottom ball can move until you clear one side into a matching color or your empty tube. With hidden ? balls, favor moves that uncover one — knowing a color is worth a move.
The worked example below packs two alternating tubes into eight single-ball moves: park the top balls in the empties, finish one color, and the second color falls into place behind it. The habits behind this — dig out buried colors, guard the empty tube, feed deep runs — are explained step by step in how to solve water sort puzzles, and the same habits carry over to ball sort, one ball at a time.
Ball sort solver facts at a glance
The ball sort solver handles 4 to 14 tubes holding 3, 4, 5 or 6 balls each, with up to 12 colors and hidden ? balls, and counts every move as one ball. When the search can finish, the move count it shows is proven to be the fewest possible; it is free and runs in your browser.
| Tubes | 4 to 14, empty tubes included |
|---|---|
| Balls per tube | 3, 4, 5 or 6 (most levels use 4) |
| Colors | Up to 12; each color must fill exactly one tube |
| Hidden ? balls | Planned around: moves never depend on a hidden color, you tap each color as it is uncovered, and balls the counts already prove are filled in for you |
| Move rule | One move takes the top ball to an empty tube or onto the same color, if there is room |
| Result | Numbered single-ball moves with a replay; proven fewest moves when the search can finish, otherwise a solution labeled “not guaranteed shortest” or a could-not-finish message |
| Share link | Copy level link stores the tubes and tube size; opening it recalculates the answer |
| Where it runs | In your browser; the level is not uploaded |
| Price | Free, no account, no download |
How to use the ball sort solver
- Count your tubes. Tap the number that matches your level, empty tubes included. Then pick how many balls fit in one tube: most levels use 4, and harder ones use 5 or 6.
- Copy each tube from the bottom up. Tap a tube, then tap the color of its bottom ball, the next ball and so on up to the top. A full tube moves you to the next one. Undo ball takes back the last ball entered; Clear tube empties the selected tube.
- Check the counters. Each color button counts the balls you have placed, for example 3/4. Every color needs a full tube of balls, so a miscounted color is easy to spot. Tap ? for a ball your game hides.
- Press Solve. You get a numbered list such as “3. From tube 3 to tube 7”. Each move takes one ball. Use Next and Back to see the tubes after each move, or Play to watch them all.
- Keep the answer. Copy all steps puts the whole move list on your clipboard, and Copy level link saves a link that reopens this level with its solution.
Tubes are numbered left to right, top row first, in the order you entered them. Enter partially filled tubes as they look now and leave empty tubes blank. There is no database of numbered levels here: the solver searches from your entries, within the tube and color limits above and using the single-ball move rule. With hidden ? balls it gives the moves up to the first ball that shows; tap its color to go on.
Try a worked ball sort example
Each example uses four tubes with room for four balls each. Tubes 3 and 4 start empty. Read these stacks from bottom to top. Load one, then press Solve; Undo example restores your previous tubes and settings.
- Ordinary 4-ball level. Tube 1: red, orange, red, orange. Tube 2: orange, red, orange, red. The shortest answer takes 8 single-ball moves.
- Hidden colors. Tube 1: red, orange, ?, orange. Tube 2: orange, red, ?, red. One safe move uncovers the ? in tube 1. Enter the color your game reveals to continue; the solver does not guess the hidden colors.
- A copied color count is wrong. Tube 1: red, red, orange, red. Tube 2: orange, red, orange, red. Five red balls and three orange balls cannot fill one tube per color. Solve shows an input error with the counts to check; this is not an unsolvable-level result.
Walk through the 8-move solution
Load the 4-ball example above and press Solve. Use Next after each move below. Move only the top ball, even when two balls of the same color are together.
- Move one orange ball from tube 1 to tube 3. This uncovers red in tube 1.
- Move one red ball from tube 2 to tube 4. This uncovers orange in tube 2.
- Move one red ball from tube 1 to tube 4, onto red.
- Move one orange ball from tube 1 to tube 3, onto orange.
- Move one red ball from tube 1 to tube 4. Tube 1 is now empty.
- Move one orange ball from tube 2 to tube 3.
- Move one red ball from tube 2 to tube 4. Tube 4 now holds all four red balls.
- Move one orange ball from tube 2 to tube 3. Tube 3 now holds all four orange balls; tubes 1 and 2 are empty.
Eight moves is the shortest answer for this starting shelf. The empty tubes give each color a temporary home while you uncover the alternating balls. Other shortest answers can use different tube numbers.
Ball sort tips that work on any level
- Keep an empty tube free. An empty tube takes any color, so it is your working space. Fill it only to finish a color or to free a buried one.
- Build on the tube that is closest to done. A tube whose bottom balls already match needs only the rest of that color. Feed it before you start a new pile.
- Count the balls above the buried colors. The colors at the bottom of several tubes decide the level. Uncover them early, starting with the one that has the fewest balls on top.
For more on empty-tube space and buried colors, read the water sort puzzle tips. Those planning ideas also help with ball sort, but a water sort pour may move several layers; this solver counts one ball per move.
How the solver works
The solver runs a shortest-path search guided by a count of moves that are certainly still needed, so the first sorted shelf it reaches has the fewest single-ball moves. It follows the usual ball sort rules: a move takes the top ball of a tube and puts it in an empty tube or on a ball of the same color, if that tube has room. It searches the possible moves from your tubes, trying first the arrangements that look closest to sorted, and keeps each distinct arrangement only once. To steer the search it counts the moves that are certainly still needed, such as every ball that sits above a different color, and that count never overestimates. That is why the first sorted shelf it reaches has the fewest moves. If no move sequence sorts the tubes, it has tried every reachable arrangement before it says so. On very large levels it may run out of room first: then it either shows a solution marked “not guaranteed shortest” or says that it could not finish, never that the level is impossible. With hidden balls it looks for the fewest moves that uncover one without relying on a hidden color, and among the shortest plans it prefers the one that keeps the most possible fillings of the hidden balls sortable. Everything runs in your browser.
Frequently asked questions
How is ball sort different from water sort?
In ball sort, one move takes a single ball off the top of a tube. In water sort, one pour moves the whole run of the same color on top, as much of it as fits. So a level usually takes more ball moves than pours, and the answer with the fewest pours is not always the one with the fewest ball moves. This solver counts single-ball moves; for pouring puzzles, use the Water Sort Puzzle Solver.
Is the answer really the fewest moves?
When the result says no solution has fewer moves, yes: the search only stops at a sorted shelf once it has ruled out every shorter one. A few very large levels have too many arrangements to check in a browser. Then you get a solution that is labeled as possibly not the shortest, or a message that the solver could not finish.
Why does the solver say my level cannot be solved?
First check whether the message is an input error or a search result. Every color has to fill exactly one tube, so each color needs as many balls as a tube holds, and the solver names any color with too few or too many. It only says a level cannot be solved after trying every reachable arrangement. If it runs out of room before that, it says it could not finish instead.
How many tubes and balls per tube can it solve?
Pick 4 to 14 tubes, empty tubes included, with room for 3, 4, 5 or 6 balls each. There can be up to 12 colors, and each color must have enough balls to fill exactly one tube. A variant works here if it moves one top ball onto the same color or into an empty tube. Extra rules such as locked tubes are not modeled.
Can it solve levels with hidden question mark balls?
Yes. Tap ? for every ball your game hides. The solver plans moves that never depend on a hidden color, up to the move that uncovers one. Make those moves, tap the color that shows, and it solves on from there. When the counts already prove what a hidden ball must be, it fills that in for you. It cannot predict hidden colors or guarantee a complete solution before they are known.
Is the ball sort puzzle solver free?
Yes. It is free, with no account and no download, and it runs in your browser. The level you enter is solved on your device, and a level link keeps the tubes in the link itself.