DOCUMENTATION / PHYSICAL WORLDS

Steering a Swarm.

A swarm of microrobots pushed by one shared field through branching channels, and sequences that deliver it.

Open the experiment

What the page shows

A swarm of small robots in a branching network of channels, seen from above, steered by one field that pushes every robot the same way. The goal is to get the whole swarm into one chosen outlet, or, in sorting mode, to send two kinds of robot to two different outlets.

Gray channels
A tree of channels from one inlet (left) to eight outlets. The far 40% of the target outlet glows; a robot there counts as delivered. In sorting mode a second outlet glows pink.
Dots
Robots, colored by mobility (how fast they move under a unit push): blue less, orange more. In sorting mode, cyan and pink are the two kinds; pink is more mobile by the chosen ratio.
Arrow
The field now: its direction and strength (at most 1, the outer circle).
Readouts
Robots delivered, or each kind in each outlet with the separation score; the move of the design being played; simulated time and frame rate.
The results
Lower on the page: every design's delivered fraction under each tested condition and friction, and the sorting curve.

How to use it

Field dial, arrow keys
Drag inside the dial to push every robot; strength grows with distance from the center and springs back to zero on release. The arrow keys push one unit along each axis while held. Taking over from a design keeps the swarm where it is.
Designs
Field sequences from the study, 40 moves each (the published algorithm: many short moves). When a design finishes, the swarm is held where it ended, which is where the study measured it.
Deliver, Sort two kinds
The two tasks. In sorting mode, choose the mobility ratio; each ratio has its own evolved design.
Flow
None, steady (inlet toward outlets), pulsatile (the same, rising and falling), or reversed (outlets toward the inlet).
Wall friction, Robots, Variation, Speed
Coulomb friction at the walls (the designs were made at 0.5); the swarm's size; how much robots' mobility varies (10% in the study); simulation steps per frame.
New swarm, Replay, Copy share link
Scatter a new swarm; run again from the same start; copy a link with every setting and the swarm's seed.

Try this: steer by hand toward the target and watch robots fill the wrong branches. Then play Point at target and Evolved, robust on the same swarm. Raise the friction to 1, or reverse the flow, and see which designs still work.

Background and theory

One input for many robots

Magnetic microrobots are driven by fields from coils outside the body. At the scale of a swarm the field is nearly uniform, so every robot gets the same command, and symmetry has to be broken by something else: walls and obstacles, friction against them, collisions, flow, or differences between robots. In the idealized “tilt” model every particle moves the same way until blocked; gathering a swarm in a maze-like network that way is NP-complete, and Becker, Fekete and colleagues give algorithms with guarantees and heuristics, of which MSTE (MinSumToExtremum) is their best for many particles.

What this study asks

Whether a fixed sequence of pushes, designed through a continuous simulation with walls, friction, collisions and flow, can deliver a swarm it never saw better than the published algorithm and simple baselines; whether designing over the conditions one can’t control (friction, robot variation, flow) protects a design; whether gradients through the simulation are a good way to design; and how different two kinds of robot must be before one field can sort them. See Reading the results for how the comparisons are made.

Methods

The model

Lengths are in units where the root channel is 0.3 long. The network is a binary tree three levels deep: the root along x, each child turning ±0.6 rad, 0.8 times as long and 0.85 times as wide per level (root half-width 0.07); 15 channels and 8 outlets, closed at their ends. Robots are disks of radius 0.006 with no inertia. Robot i moves at

a = mᵢ F + u(x) + 200 Σⱼ max(2R − dᵢⱼ, 0) (xᵢ − xⱼ)/dᵢⱼ

(mobility times field, plus flow, plus soft repulsion from overlapping robots), corrected at walls: within contact distance, the part of a pointing into the wall is removed, and the sliding part is reduced by Coulomb friction, |vt| = max(|at| − μ·push, 0). A spring of stiffness 100 corrects any overlap with a wall. The free space is a smooth maximum over the channels (temperature 0.004), and every switch is smooth (width 0.0012), so the model is differentiable. Flow is parabolic across each channel and halves at each junction. Steps are explicit Euler, 0.0015 long; a move is 300 steps (0.45 time units) under one fixed field of strength at most 1, and a design is 40 moves.

Designs

  • Point at target: each move pushes along the inlet-to-target path at the position a robot moving at speed 1 would have reached.
  • Published algorithm (MSTE): run on a grid of cells the robots’ diameter wide, gathering at the network’s top-right-most cell (in the target outlet). Its 515 commands become unit pushes along the axes, 8 steps each (enough to cross a cell), the plan repeated three times to fill the time.
  • Greedy: each move, the one of 16 directions that most improves a smooth score on 8 training swarms.
  • Evolution strategy: from greedy, 100 iterations of 4 random perturbations tried both ways (σ 0.3), scored on 8 training swarms drawn afresh each iteration, Adam at 0.03. The nominal design uses friction 0.5 and no flow; the robust one draws each swarm’s friction (0.3–0.8), variation (5–15%) and flow (none, or steady up to 0.3).
  • Gradient, robust: from greedy, 205 Adam steps at 0.001 on the gradient of the smooth score through the whole run, under the robust design’s drawn conditions, at the same computing cost. Collisions make the gradient grow about 20-fold per move, so it is capped at each move boundary.
  • Sorting: 32 robots of each kind, the second more mobile by the ratio; a robust evolution strategy per ratio on the separation score, from a greedy start.

Evaluation and pre-registration

  • 64 held-out swarms, scattered along the channels. Conditions: as designed; variation 20%; steady, pulsatile and reversed flow; 128 robots; collisions 5× stiffer (with a 5× smaller step); and a clumped start at the inlet. Each at friction 0, 0.5 and 1. Every design runs on the same swarms (paired comparisons).
  • A difference counts if it is at least 3 standard errors, paired by swarm.
  • The system, designs, seeds, conditions, questions, decision rules and predictions were fixed on 7 November 2026, before any of these runs, with two amendments made before the full run and recorded in the plan.
  • The browser runs the same model on the GPU, matching the research code to float32 rounding.

Results and what they mean

Delivered, friction 0 / 0.5 / 1
Evolved, robust 97% / 95% / 75%; evolved, one condition 96% / 89% / 65%; greedy 84% / 82% / 59%; gradient 83% / 81% / 59%; published algorithm 82% / 61% / 58%; point at target 19% / 16% / 17%. Standard errors under 1 point.
Designs beat the baselines
Both evolved designs beat greedy and the published algorithm at every friction, by 6 to 34 points.
Robustness is free
The robust design beats the one-condition design as designed (+1, +6, +10 points at the three frictions) and in 16 of 21 other tests, by up to 19; it is behind by about 2 points only on frictionless walls with 128 robots or stiff collisions.
Gradients didn't help
The gradient design ended slightly below greedy (−1.2 ± 0.2 points at friction 0.5); the evolution strategy beat it by 14 to 16 points at equal cost.
Sorting
Separation is zero for identical robots; 0.12 / 0.24 / 0.04 at a 1.5× ratio (friction 0 / 0.5 / 1); nothing at 1.1×; at 2×, 0.16 / 0.07 / 0.04.
Stiff collisions
The ranking held (the two evolved designs swap at friction 0), but numbers at friction 1 moved by up to 16 points.

Against the predictions made before the test: the evolved designs gained more than predicted (about 5 points); designs were predicted not to beat greedy at friction 1 and did; the gradient design was predicted to beat greedy by 2 points and didn’t; robustness was expected to cost up to 2 points and cost nothing; a 2× ratio was expected to sort better than 1.5× and mostly didn’t; stiff collisions were expected to change results by under 3 points and changed some by more.

Sorting works mainly by delivering the more mobile kind to its outlet; few robots of the other kind reach theirs (at most 4%).

Limits and open questions

  • A 2D model with soft collisions: robots in a crowd overlap by about a quarter of a diameter on average.
  • One network, one target outlet. No rolling, magnetic torque or fluid coupling between robots.
  • One training run per design; how much designs vary between runs wasn’t measured.
  • The published algorithm was made for a grid of cells; how well it does here depends on the translation.
  • Gathering is NP-complete: every comparison is relative, with no measure of how close to optimal anything is.
  • Open: whether sequences designed this way work on real robots in real vessels, and how much a closed loop adds.