Ball Sort · Guide

Ball Sort Strategy: One Ball Per Move, the Empty Tube and Par (2026)

slug: ball-sort-beginner-tips · Last verified 2026-11-07

Try it yourself — play Ball Sort now

Free in your browser, no download or sign-up.

Play Ball Sort

Last updated: November 2026 · Tested on Playnesta's Ball Sort (Playnesta-original MIT; 12 frozen levels, one-ball moves, BFS par) · 62-check headless harness · strategy probe replaying every shortest solution, 3,600 blind playouts and 300 uniformly random deals · the live engine.js, levels.js and main.js are byte-identical to the files measured here
Method: every number below comes from the shipped build, not from a design note. The move rules, the breadth-first solver and the capacity limit are in js/engine.js; the 12 frozen deals and their pars are in js/levels.js; the star table, the hint wiring, the undo stack and the URL pinning are in js/main.js (all three Playnesta-original, MIT). The 62-check headless harness passed again in this session, and a separate probe imported the same modules the live page serves, replayed a shortest solution for all 12 levels while classifying every legal first move, classified the board halfway down each solution, compared the same deals against a pour-form solver, ran 3,600 seeded blind playouts and sampled 300 uniform random deals. The files the live site serves hash to the same bytes as the copies measured here (engine.js 1d6fb76f…, levels.js d4a027a4…, main.js 6f4cd895…). The game page explains the taps and the rules; this page is the strategy layer: which of the legal moves is actually safe, why the empty tube is the scarce resource, and what the stars are really measuring. Ball sort and colour ball sort are descriptive names for the puzzle family and are used here for search only.

1. The library in numbers: 12 levels, 192 balls, three decks

The build ships 12 frozen deals in three tiers of four. Nothing is generated at runtime, so the shape of the whole library can be counted rather than guessed:

Tier Levels Colours Tubes Empty tubes Tubes full at start Balls Par Legal moves at the start
Easy 1–4 3 5 2 3 12 10–11 6
Medium 5–8 4 6 2 4 16 14–15 8
Hard 9–12 5 6 1 5 20 22–27 5

Three things follow from that table, and they explain almost everything that happens later.

Every level starts with every filled tube completely full. There is no half-empty tube to work with at the start, in any tier. The spare capacity in the deal is exactly the empty tubes: two in easy and medium, one in hard.

The hard deck is only 20 balls and yet its par is two to three times the easy par. That is not a difficulty label, it is arithmetic: with one empty tube every ball has to be shuffled more times to get where it belongs. The pars add up to 199 moves across the library, for 192 balls. Easy and medium solve at fewer than one move per ball (42/48 and 57/64); hard runs at 100 moves for 80 balls, 1.25 moves per ball.

The deals are deliberately mixed. The generator rejects any board where a tube starts finished (four of one colour) or where any colour is already gathered, so the first move is never a free win. Measured on the frozen deals, the longest same-colour run inside a tube is 3 and no tube holds more than 3 balls of one colour. Hard levels are the flattest: only 4 of the 80 balls touch a ball of the same colour, against 8 of 48 on easy and 9 of 64 on medium.

2. Par is a search result, not an estimate

Every level's par was produced by a breadth-first search over the exact move set the page uses — one ball per move, into an empty tube or onto a matching colour, never past four in a tube. The first solved depth is the par.

The probe re-ran that search against the shipped library: all 12 pars match, and the shortest path replayed on the board ends solved with the same number of balls. What is worth noticing is how much work each proof took:

Level Par States expanded to prove it
1 (easy) 11 1,445
2 (easy) 10 836
3 (easy) 10 1,172
4 (easy) 11 1,663
5 (medium) 14 7,120
6 (medium) 14 5,873
7 (medium) 14 6,339
8 (medium) 15 10,200
9 (hard) 26 119
10 (hard) 27 180
11 (hard) 25 115
12 (hard) 22 199

The hard levels need the fewest expansions, which looks backwards until you see why: they offer almost nothing to choose between. With five full tubes and one empty one, the first move has exactly five options, and the search tree stays narrow the whole way. Easy and medium have two empty tubes, so both tubes can be used as parking spots and the tree fans out — 10,200 states on level 8 against 199 on level 12.

Two practical consequences:

  • A high par here does not mean a big search. It means a board where balls have to move one at a time and every extra ball movement is one more move. Par is a length, not a difficulty score.
  • The hint is cheap for the build. The shipped solver caps itself at 250,000 states. The largest search any shipped level needs is 10,200, and proving that a fatal first move is fatal took at most 7 expansions. On these 12 levels the cap never comes into play.

3. One ball per move changes the problem, not just the pace

This is the same board family as the liquid-sorting puzzle — four balls of each colour, tubes capped at four, a ball may only land on a matching colour or an empty tube — with one rule changed: a move carries exactly one ball, never the whole matching run on top. Playnesta's Water Sort Puzzle moves a run; Ball Sort does not.

To measure what that rule is worth, the probe solved the same 12 deals with a pour-form solver: same capacity, same colour rule, but a move takes min(top run, free space) balls at once.

Level One ball (par) Pour move Extra moves
1 11 9 +2
2 10 8 +2
3 10 7 +3
4 11 10 +1
5 14 12 +2
6 14 13 +1
7 14 9 +5
8 15 12 +3
9 26 17 +9
10 27 17 +10
11 25 14 +11
12 22 16 +6

The same twelve deals cost 55 more moves in the one-ball form — 27.6% of all 199 moves — and the gap grows with the tier: 1.08× to 1.79× per level, with the hard deck nearly 1.5–1.8× longer than the pour version of the very same board.

The reason is visible in the deals themselves. A pour game only pays for a run when your matching balls are actually touching. On easy 16.7% of the touching pairs are the same colour, on medium 14.1%, on hard 5.0% — in the hard deck almost every ball sits on a different colour, so "pour the run" would usually be a run of one anyway.

What the one-ball rule really buys is freedom: you may split a run on purpose. If a tube holds two blues on top, you can lift one blue off, park it, and use the rest of that tube for something else. In a pour game that move is invisible; here it is a legal and often necessary step. That is also why the hard pars are 22–27 while the deals are only 20 balls: the solution is not "put each ball away once", it is "re-shuffle the board until the colours line up".

4. The empty tube is the scarce resource

Count the space on a hard level: five tubes hold five full sets of four, and one tube is empty. That is the entire working space. The start position therefore offers exactly five legal moves, and every one of them is a ball going into the same empty tube.

That single fact reorganises the strategy:

  • The empty tube is a one-shot budget. Any ball you park there is a ball that blocks the tube until you move it out, and you cannot move it out until there is a matching colour or another empty tube. On hard there is no other empty tube.
  • A wrong first move is often fatal. In the hard tier, 7 of the 20 legal first moves (35.0%) leave a position with no solution at all. Easy and medium have none: 0 of 24 and 0 of 32 first moves kill those levels, though 4 of the 24 easy moves and 10 of the 32 medium moves are slower than par.

The second empty tube is not a small convenience either. The probe dealt 200 uniform random boards for each shape and solved each one:

Shape Solvable
3 colours, 2 empty 200/200
4 colours, 2 empty 200/200
5 colours, 2 empty 200/200
5 colours, 1 empty 51/200 (25.5%)

Three out of four random 5-colour boards with one spare tube are dead before you touch them. The generator throws those away — it needed 45 shuffles to find the 4 hard levels it ships, and 37 of the 45 were unsolvable — which is exactly why the hard deck feels different from the medium one: not merely longer, but close to a corridor.

Practical reading: on hard, the first move decides more than it reveals. Do not spend the empty tube to "see how the board looks". Use it to move a ball you intend to stack immediately.

5. The measured opening rule: play the colour that is already on top twice

If the empty tube is the scarce resource, then the question is which ball deserves it. The probe tested the obvious candidate — the colour that is already the top ball of two different tubes — against all the other first moves.

First, the four shipped hard levels by hand. Every one of them starts with all five filled tubes topped by some colour, and in all four the winning opening is a colour that appears on top of two tubes:

Level Tops of the five filled tubes Duplicate top Optimal first moves Fatal first moves
9 4, 2, 2, 4, 0 colour 2 (tubes 2 and 3) tubes 2→6 and 3→6 1→6, 4→6, 5→6
10 0, 3, 1, 2, 1 colour 1 (tubes 3 and 5) tubes 3→6 and 5→6 none (3 slower)
11 3, 2, 3, 1, 4 colour 3 (tubes 1 and 3) tubes 1→6 and 3→6 2→6, 4→6, 5→6
12 3, 3, 0, 2, 1 colour 3 (tubes 1 and 2) tubes 1→6 and 2→6 4→6

Four samples is not evidence, so the probe also dealt 150 uniform random solvable 5-colour/1-empty boards and classified every legal first move by whether its colour was the top of two or more tubes:

First move Count Fatal On a shortest path
Duplicate-top colour 355 63 (17.7%) 278 (78.3%)
Colour that is on top once 395 219 (55.4%) 30 (7.6%)

The gap is large and it points the same way as the hand check. 89.3% of solvable hard boards have at least one duplicate-top colour, and 126 of the 150 sampled boards have a duplicate-top move that keeps the level winnable.

Why it works, in board terms: a colour that tops two tubes can be gathered without leaving the board in a worse shape — move the first copy into the empty tube, then stack the second copy onto it, and the tube keeps the colour. A colour that tops a single tube has to be stored before it can be gathered, and on hard the only place to store it is the one empty tube you were going to need later.

On the medium shape (4 colours, 2 empty) the same rule helps but nothing is at stake: duplicate-top moves were optimal 88.5% of the time against 61.8% for single-top moves, and no first move — 624 duplicate-top, 576 single-top — was fatal, because the second empty tube absorbs the mistake.

One caution: this is a rule about the first move, measured at the start position. It is not an algorithm, and it says nothing about moves three to ten, where the board has its own opinions.

6. What a fatal move looks like

"Legal" and "safe" are different words in this game, and one board makes the difference concrete.

Level 12 opens like this, bottom to top, with tube 6 empty:

1: 1 2 4 3     2: 2 3 2 3     3: 1 3 1 0
4: 4 0 4 2     5: 4 0 0 1     6: (empty)

Five legal first moves, all into tube 6. Four of them are survivable-but-slower or optimal. One is not: move the 2 from tube 4 into tube 6 and the board becomes

1: 1 2 4 3     2: 2 3 2 3     3: 1 3 1 0
4: 4 0 4       5: 4 0 0 1     6: 2

and there are now zero legal moves. Every filled tube is topped by a colour that appears nowhere else on top, and the only empty tube holds the 2 that has nowhere to go. The level is over at move one, in the literal sense — not "hard to finish", but a position in which nothing can be done until you press Undo.

Level 9 shows the milder version, which is more common. It opens:

1: 3 1 2 4     2: 0 4 1 2     3: 0 3 0 2
4: 1 4 3 4     5: 3 2 1 0     6: (empty)

Move tube 1's 4 into tube 6 and the position still has legal moves, but none of them lead anywhere: the search proves the board dead after 7 expansions, and the page's hint says so plainly ("No solution from here — undo a move."). Move tube 2's or tube 3's 2 instead and the board is on a shortest path — 25 moves left of the 26-move par.

That is the whole argument for looking one move ahead: not because the page is strict, but because 35% of the legal openings on hard are traps that only look like moves.

7. A move is not always reversible — that is why Undo exists

In most sliding puzzles you can take a move back by moving the same piece the other way. Here you often cannot. A ball that came off tube A can only go back to tube A if A is now empty, or if A's new top is the same colour.

The probe measured this on the board halfway down each level's shortest solution, where the answer matters most:

  • Only 18 of the 37 legal moves available at those halfway positions (48.6%) could be reversed by the same move played backwards.
  • The first tube you empty is usually the one where this bites: the ball that came out of it is exactly the ball that would go back, and once the tube is empty it accepts any colour, so the reverse works — but the moment you drop something else in, the original ball has nowhere to go back to.

The build's answer is a snapshot undo, not a reverse move: every ball moved pushes the whole board onto a stack, Undo pops it and decrements the move counter. Undo has no cost — it does not spend a hint, does not touch the star table and does not block at any level. The stack has no fixed depth, so you can walk back to the opening position.

Two habits follow:

  1. Undo before you guess again. In the probe, blind play ended in a no-solution position in 30.2% of 3,600 playouts; undo is the entire difference between that and a lost level.
  2. Do not rely on "I can always put it back." Half the time you cannot, and the position you leave behind is a new problem, not the old one.

8. The board narrows as you solve it

Counting the legal moves along each level's shortest solution shows how the decision load changes:

  • Easy and medium paths offer between 3 and 8 legal moves at most steps, and only 1 position across the four medium paths (level 6) and none on easy had exactly one legal move.
  • Hard paths offer between 1 and 5, with a median of 2. Across the four hard solutions, 27 of the 100 positions allowed exactly one legal move — level 11 alone had nine of them.

So the hard tier is not "more choices, harder to pick". It is a corridor: at the start you pick one of five, and after the first few moves you are often picking between one and two. The middle of a hard solution is nearly forced:

Level Halftime position: legal moves Of which fatal
9 2 0
10 2 0
11 2 0
12 1 0

None of the 37 legal moves available at those halfway positions was fatal, in this sample. The danger lives at the edges — the opening, where a tube is still full of mixed colours, and the moments where a ball has to decide where its colour is going to live.

Practical reading: spend your attention at the start of a level. The endgame is mostly arithmetic (count the balls of a colour, count the free slots), and the page will let you move; the opening is where a level is won or lost.

9. Stars measure optimality, not speed

There is no timer in this build. The star table reads exactly one number, your move count, against the level's par:

Moves Stars
exactly par ★★★
par + 1 to par + 5 ★★☆
anything else ★☆☆

Because par is the minimum, "moves ≤ par" can only mean "moves = par". Three stars is therefore a statement that you found a shortest solution, not that you were fast. Five wasted moves are free on the two-star band; the sixth costs the second star.

Hints do not touch this table. The win card prints how many hints you used ("3 moves · par 10 · 1 hint"), and the hint counter is stored with the record, but starsFor(moves, par) never reads it. You can ask for every hint and still take three stars, provided you keep the move count at par.

What the obvious approach is worth, measured:

  • The greedy rule — complete a finished tube when you can, otherwise land on a matching colour, otherwise use an empty tube — clears 2 of 12 levels (level 2 in 12 moves, par 10; level 6 in 17 moves, par 14). The other ten stall inside or before the three-par budget. The rule is not wrong, it is just not sufficient.
  • Blind play with random legal moves solved 361 of 3,600 seeded playouts (10.0%): 13.8% on easy, 8.4% on medium, 7.9% on hard. And 30.2% of all playouts ended in a position with no solution at all — 86.9% of the hard ones did.

So: a level's star rating is a fair measure of whether you were actually solving it, and a mediocre heuristic will keep you busy without ever collecting the third star.

10. Controls, pinning and what the page records

  • Tap a tube to lift its top ball, tap a tube to drop it. Tapping the same tube again puts the ball back without spending a move. A full tube or a different colour is refused with a short shake and a one-line reason in the status bar.
  • Keyboard: 1–9 pick a tube, U undo, H hint, R restart, arrow keys change level.
  • ?level= pins the start: a number 1–12, or a tier name (?level=hard starts on level 9). Anything unrecognised falls back to level 1. There is no seed — the deals are frozen, so the same URL is always the same board.
  • Records are per level best move counts, kept in this browser under pn.ball-sort.best.v1. Nothing is sent anywhere; clearing site data clears the records.
  • Analytics bridge fires game_load, game_start on the first board interaction, game_60s sixty seconds after that, game_restart when you switch level after playing, and game_win when a level is solved. There is no game_lose — a dead position is not a loss, it is a position you can undo.

11. A one-minute checklist

  1. Count the empty tubes before you move. Two means you can experiment; one means the first move is most of the level.
  2. Look at the tops. A colour on top of two tubes is the natural opening; a colour on top of one is usually a stored problem.
  3. Do not park a ball in the last empty tube "to look". Park the ball you are about to stack.
  4. Before every move on a hard level, ask what colour the tube you are emptying will accept. If the answer is "nothing", you have probably just ended the level.
  5. If the hint says no solution, undo — do not look for a clever move that does not exist.
  6. Watch the move counter against par as you go: par+5 is the last chance for two stars, par is the only way to three.
  7. When only one legal move remains, take it and re-count; the forced section usually ends within a few moves of the next colour completing.

FAQ

How do you play Ball Sort?

Tap a tube to lift its top ball, then tap the tube you want to drop it into. A ball may go into an empty tube or onto a ball of the same colour; a full tube and a different colour are both refused. A level is cleared when every tube is either empty or holds four balls of one colour. This build has 12 levels: easy (3 colours, two spare tubes), medium (4 colours, two spare) and hard (5 colours, one spare).

What does par mean, and where does it come from?

Par is the fewest legal moves that solves the level, computed by a breadth-first search over the exact move set before the level shipped. It is not an estimate and not a designer's target: the probe re-ran the same search on the frozen library and all 12 pars match. The pars are 11, 10, 10, 11 (easy), 14, 14, 14, 15 (medium) and 26, 27, 25, 22 (hard) — 199 moves for 192 balls.

Why is Ball Sort harder than the water-sorting version?

Because a move carries exactly one ball instead of a whole matching run. Solving the same 12 deals with pour moves takes 55 fewer moves (27.6% of the total), and on the hard deck the one-ball form is 1.5–1.8× longer. It also changes the strategy: you may split a stack on purpose to free a tube, which is a move a pour game does not have. In the hard deals only 5% of touching ball pairs are the same colour, so a "run" is usually one ball anyway.

What is the best first move?

Play a colour that is already the top ball of two different tubes: move one copy into the empty tube, then stack the other copy onto it. Measured on 150 random solvable hard-shape deals, duplicate-top moves were fatal 17.7% of the time against 55.4% for single-top moves, and optimal 78.3% against 7.6%. All four shipped hard levels open this way. It is a rule about the first move, not an algorithm for the whole level.

Why did my level become unsolvable after one move?

Because on the hard tier 7 of the 20 legal first moves leave a position with no solution. Level 12 is the clearest case: move the 2 from tube 4 into the empty tube and the board has zero legal moves — every remaining top ball has nowhere to land. Nothing is broken; a legal move and a survivable move are different things in this game, and Undo is how the build lets you take it back.

Does the hint cost me stars?

No. starsFor(moves, par) reads only your move count and the par: exactly par is three stars, par+1 to par+5 is two, anything else is one. Hints are counted and printed on the win card ("1 hint"), and the dead-position message is a hint too, but the star table never looks at the counter.

What does "No solution from here — undo a move" mean?

It means the solver searched the whole position reachable from your board and found no path to a solved state, so the hint refuses to invent one. It is a real dead end, not a hint limit: on the shipped levels the largest search needed to solve was 10,200 states and the largest needed to prove a position dead was 7, both far under the solver's 250,000-state cap. Use Undo.

Can I undo any move?

You can undo any number of moves — Undo pops a full board snapshot and decrements the counter, with no cost and no limit. What you cannot do is rely on reversing a move by playing it backwards: at the halfway positions of the 12 shortest solutions only 18 of 37 legal moves could be reversed that way, because a ball only goes back into its old tube if that tube is empty or topped by the same colour.

How hard is the hard tier really?

Hard is 20 balls in six tubes with one empty tube, par 22–27, and 27 of the 100 positions on its shortest solutions offer exactly one legal move. Blind random play solved 7.9% of hard playouts and 86.9% of them ended with no solution at all. Three random 5-colour boards with one empty tube are dead on arrival; the generator needed 45 shuffles to find the four it ships. It is less a difficulty setting than a change of genre.

Is there a timer, and are there more levels?

No timer: the only scored number is your move count against par, plus the hints printed on the win card. Best move counts are stored per level in this browser only. The library is frozen at 12 levels, so the page cannot generate a 13th; if you want more of the same family, Playnesta's Water Sort Puzzle uses the pour move instead, and Number Mosaic is the deduction puzzle with the same "prove before you place" habit.

More games to play

More free browser games on Playnesta — pick your next round.