Ball Sort Solver

Enter a Ball Sort tube layout, check every color count, search for a valid solution, and replay the result one top ball at a time. Puzzle data and search stay in your browser.

Ball Sort rule: Move exactly one exposed top ball per step.
Working with liquid layers that may pour together? Use the Water Sort Solver.

Tube JSON

Use one inner array per tube. Write balls from bottom to top: the first value is the bottom ball and the final value is the exposed top ball.

Bottom-to-top input: the last value moves first. Use [] for an empty tube.

Tube Preview

Color IDs
Color Count Check

Solution Steps

The search uses only standard four-ball tube rules. It never moves a matching group as one action.

Load valid level JSON to preview the puzzle.
Step 0 / 0One exposed ball per step

Load valid tube JSON, then select Solve.

Move List

How the Ball Sort Solver works

  1. Enter the full level as tube JSON from left to right.
  2. Write each tube from bottom to top and keep the top ball as the last value.
  3. Load the JSON to check capacity, empty tubes, and the required count of four for every color.
  4. Select Solve, then use Previous, Next, Play, Pause, and Reset to inspect the result.
  5. Copy the move list or share a Ball-specific link that reloads this solver and its replay.

Standard rules used here

Each tube holds at most four separate balls. A legal move takes only the exposed top ball and places it into an empty tube or onto the same top color. A solution is complete only when every non-empty tube is full and contains one color; empty tubes are allowed.

Search results and limits

The solver distinguishes invalid input, no solution found, search limit reached, search cancelled, and solver errors. Search runs in small browser batches so the page can update and accept cancellation. The solver searches for a valid solution. It may not return the shortest possible solution.

Supported input

Color IDs may be finite numbers or short non-empty strings, matching the existing solver input style. This first version supports capacity 4 only. It does not support hidden colors, unknown colors, uneven capacities, automatic helper tubes, or moving several adjacent balls as one action.

Related tools, games, and guides

Ball Sort Solver guide | Water Sort vs Ball Sort guide | Ball Sort Games · Water Sort Solver · Water Sort Level Editor

FAQ

Does this solver move more than one ball at a time?

No. Every generated step moves exactly one exposed top ball. Adjacent matching balls require separate moves.

How should tube arrays be ordered?

Write each tube from bottom to top. The first value is the bottom ball and the last value is the exposed top ball.

Why must every color appear four times?

This page implements the standard four-ball rule, so a valid starting level needs exactly four balls of each color.

Does the solver guarantee the shortest answer?

No. It searches for a valid solution and may not return the shortest possible solution.

Can I share the replay?

Yes. Share Solution creates a link for this Ball Sort page with an explicit Ball puzzle type and the checked one-ball move list.

Explore Sorting Game Categories

Choose the sorting style that matches the way you want to play.

Recommended Sorting Games

Try another sorting puzzle selected from the game library.

Sort Water Now

Sort Water Now

A quick bottle puzzle for practicing empty-space planning and clean color stacks.

BBQ Sort Puzzle

BBQ Sort Puzzle

A food-themed sorting puzzle where matching items must be staged carefully.

Balloon Sort

Balloon Sort

A bright balloon sorting puzzle built around careful aim and color-clearing moves.

Ball Craze Sort

Ball Craze Sort

Fast ball sorting with simple rules and useful empty-tube strategy.

Fruit Sort

Fruit Sort

A bright fruit sorting puzzle built around smart matches and clean combinations.