Sorting Network Factory

Fit swap gates between conveyor belts: smaller up, bigger down! Design a factory that sorts boxes arriving in any order, with the fewest gates and rounds, then merge runs and pick places.

Play

A design puzzle about sorting algorithms, built around sorting networks. The factory has 3 to 6 conveyor belts, and numbered boxes come in from the left. You can fit a swap gate between any two belts: as two boxes pass, it compares them and always sends the smaller one to the upper belt. The gates are fixed and can't look at the boxes first, so a design only counts when it works whatever order the boxes arrive in.

Press "Test all" and the factory sends every possible order through (720 orders for 6 boxes). If any fail, it replays the simplest failing order in slow motion and marks the wrong belts, and gates that never swapped anything turn dashed to show they are spare. The 3-star mark is the fewest gates possible, found by computers trying every option: 5 gates for 4 boxes, 9 for 5 and 12 for 6.

There are 5 chapters and 30 levels: Meet the Gate (smallest and biggest), Sort Everything (inserting, the top two, full sorts), All at Once (gates on different belts work at the same time, with a cap on rounds), Merge Two Runs (combine two sorted runs) and Pick the Places (the median, the top three, the biggest and smallest). An endless Random challenge locks a few gates in place and asks you to finish the job. The hint is worked out on the spot and shows where the next gate should go, or which gate rules out 3 stars.

How to play

  1. Tap "Start designing" to carry on from the first level you haven't cleared, or pick a chapter from "Levels". The first time you open a chapter, an engineer note explains the idea with a small picture, and "Engineer notes" on the title screen lets you read them again.
  2. The task bar at the top gives the goal and the rule. The boxes on the right show where boxes must end up: a box with a number needs the box of that rank (1 is the smallest), and a box with only a dot can take anything. Belts grouped by a purple bracket on the left get their boxes already sorted, small to big.
  3. Tap two belts to fit a gate; the small arrow on a gate shows that the smaller box goes up. "Try one" lets you watch a random set of boxes go through, and when you are ready, press "Test all". A failed test costs nothing: watch the failing order, change your gates and test again.
  4. Every gate counts, and the task bar shows your gate count and rounds. Chapter 3 and some later levels cap the rounds: gates that don't share a belt can go in the same round. Matching the fewest gates (within the round cap) earns 3 stars, 1–2 more gates 2 stars, and more than that 1 star; a hint caps the level at 2 stars. Clearing 3 levels of a chapter opens the next one.

Controls

For parents

Last updated:

You might also like