How to Use the Ball Sort Solver

The Ball Sort Solver rebuilds a standard tube puzzle from JSON, checks the exact four-ball rules, searches in the browser, validates every returned move, and lets you replay the answer one exposed ball at a time.

Quick answer

One array value is one ball, and one move transfers one ball

Write each tube from bottom to top, include at least one empty tube as [], make every color appear exactly four times, and verify the tube preview before selecting Solve.

Do not use this solver for liquid layers that pour as a connected group. Check the Water Sort vs Ball Sort guide when the visual theme is unclear.

What the Ball Sort Solver Actually Supports

FeatureCurrent behaviorLimit
Tube inputBottom-to-top arrays, with supported wrapper objectsMaximum 32 tubes; capacity fixed at 4
Color valuesFinite numbers or trimmed non-empty strings up to 32 charactersEvery color must appear exactly 4 times
SpacePartly filled tubes provide slots during movesInitial validation still requires at least one explicit empty tube
Move ruleMoves one exposed top ball to an empty or same-color targetAdjacent matching balls never move as one group
SearchCancellable, batched heuristic search in the browserDefault limit is 120,000 states or 12 seconds
ReplayPrevious, Next, Play/Pause, Reset, and a detailed move listNo shortest-solution guarantee
ShareCarries the Ball type, tubes, capacity, palette, and checked movesOnly capacity-4 Ball links are restored

Use a Complete Standard Tube Layout

This is the tested three-color example published in the Ball Sort Solver. Each of the three colors appears four times and the level includes two empty tubes.

[
  [1, 2, 3, 1],
  [2, 3, 1, 2],
  [3, 1, 2, 3],
  [],
  []
]
Colors3Balls per color4Empty tubes2
A B C D E

The final value in A is 1, so the top ball in Tube A is color 1.

Ball Sort Solver Workflow

1

Record every tube

Read tubes left to right. Inside each tube, start with the bottom ball and end with the exposed top ball.

2

Load and preview

Select Load JSON, then compare every circular ball, tube label, and top color with the game.

3

Pass strict checks

Fix capacity, color-count, empty-tube, or value errors. Solve remains unavailable until the standard level is valid.

4

Search or cancel

Select Solve. The status reports visited and queued states, and Cancel Search stops the current run without changing the input.

5

Replay and share

Use Previous, Next, Play/Pause, and Reset. Copy the text result or create a Ball-specific link with validated moves.

Ball Sort Validation Is Stricter Than Water Sort Validation

Required for search

A standard valid level

  • Contains at least one tube and at least one color.
  • Uses no more than 32 tubes.
  • Places no more than 4 balls in any tube.
  • Uses exactly 4 balls for every color.
  • Includes at least one explicit empty tube [].
  • Uses only finite numbers or short non-empty strings.

Not supported

Variants outside the model

  • Hidden or unknown balls.
  • Uneven tube capacities.
  • Capacity other than 4.
  • Automatic helper tubes.
  • A rule that lifts several matching balls at once.
  • A screenshot sent directly to the solver.

Accepted wrapper shapes

The simplest input is a top-level array. The parser can also find tube arrays under tubes, bottles, level, or data. An individual tube may be an array or an object with a balls or colors array.

How the One-Ball Move Rule Works

The source must have an exposed ball. The target must have an open slot and must be empty or show the same color on top. Even when two matching balls touch, only the final array value moves.

Before one action
source = [2, 1, 1]
target = [1]
After one action
source = [2, 1]
target = [1, 1]

The remaining top 1 needs a second action. The core rejects any Ball Sort move whose amount is not exactly 1.

Understand the Search Status

Solution found

The returned move list is replayed from the initial level and checked to finish in a solved state.

Already solved

Every non-empty tube is full and uniform, so no moves are needed.

Search limit reached

The current run reached 120,000 visited states or about 12 seconds before finding a solution.

Search cancelled

You stopped the batched search. The loaded JSON and preview remain available.

No solution found

The reachable space under the implemented search was exhausted without a solved state.

Solver error

An unexpected search failure occurred. Recheck input and reload before trying again.

These states are different. A search-limit result is not the same as a proven unsolvable level, and a valid found route is not a promise that no shorter route exists.

Replay, Copy, and Share the Checked Moves

Visual player

Previous and Next move one step, Play advances every 720 milliseconds, the same button becomes Pause during playback, and Reset returns to step 0.

Detailed move label

The core can describe a step as: Move the top red ball from Tube A to Tube B. The compact copied list uses tube letters and arrows.

Ball-specific share link

The payload includes puzzleType: ball, capacity, tubes, palette, and validated moves. Restored moves are checked again before replay.

Screenshot prompts are helpers, not recognition. Copy ChatGPT Prompt and Copy Gemini Prompt only place instructions on the clipboard. An external assistant must inspect the image, and you must verify its JSON in the Ball preview.

Common Ball Sort Solver Problems

Message or symptomLikely causeCorrection
Expected 4, found 3A ball was missed or a similar shade was splitRecount that color across every tube
Missing empty tubeThe outer array has no []Add every empty tube shown in the level
Top ball is wrongThe tube was recorded top to bottomReverse that inner array so the last value is on top
Move seems to skip a ballInput does not match the visible stackCompare the replay preview with the game tube by tube
Search limit reachedThe state space was not resolved within current limitsVerify JSON and rules; do not treat it as a shortest-path result
Liquid game gives odd stepsThe wrong solver was selectedUse the Water Sort Solver for connected liquid pours

Try the Ball Sort Workflow

Start with the published example, confirm the one-ball replay, then replace it with your own complete tube layout.

FAQ

What JSON format does the Ball Sort Solver use?

Use one inner array per tube and list every ball from bottom to top. The final value is the exposed top ball, and a completely empty tube is written as an empty array.

Does the Ball Sort Solver move matching balls together?

No. Every generated and replayed move transfers exactly one exposed top ball. Two adjacent matching balls require two separate actions.

Why must each color appear four times?

The current solver implements capacity-four standard levels and requires exactly four balls for every color before search is enabled.

Why is an empty tube required?

The Ball validator requires at least one explicit empty tube written as an empty array. A partly filled tube does not satisfy that specific validation rule.

Can I cancel Ball Sort search?

Yes. Search runs in browser batches and exposes Cancel Search while it is running. A cancelled search leaves the loaded level unchanged.

Does the Ball Sort Solver guarantee the shortest solution?

No. It uses a heuristic browser search for a valid route and validates every returned move, but it does not promise a mathematically shortest move list.

Can the Ball Sort Solver read a screenshot?

No. It can copy a Ball-specific prompt for an external assistant, but the solver itself only reads JSON. Verify every returned ball and color in the preview.

What is included in a Ball share link?

The link carries the Ball puzzle type, capacity, tube arrays, preview palette, and validated one-ball move list. It reloads the solution on the Ball Sort Solver page.

Explore Ball and Other Sorting Games

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