Steering a Swarm
Magnetic microrobots are steered by a field applied from outside the body, and every robot feels the same push. So how do you get a whole swarm, scattered through a branching network of channels, into one chosen outlet? Only the walls, collisions, the flow and small differences between robots break the symmetry. Try it by hand with the dial, then watch the sequences the study designed.
How the simulation works, and what to try
The network is a branching tree of channels (gray) from one inlet on the left to eight outlets. The glowing end of one outlet is the target. The dots are robots, colored by how strongly they respond to the field (blue less, orange more); they differ by about 10%, as real ones would.
The field pushes every robot the same way, with strength at most 1; the arrow in the corner shows it. Robots are too small for inertia to matter, so each moves at once at a speed set by the push, the flow and the robots around it. Walls stop the push into them and, with friction, slow sliding along them. Robots push each other apart when they touch.
The controls. Drag the dial (or hold the arrow keys with the picture or dial selected) to steer by hand; it springs back to zero when you let go. The design buttons play a field sequence from the study: 40 moves, each a fixed push, after which the swarm is held where it ended. Sort two kinds switches to two kinds of robot, the pink ones more mobile by a chosen ratio, with a second outlet for them. Wall friction, flow, robot count and variation change the conditions; New swarm scatters the robots afresh; Copy share link saves every setting and the swarm.
Things to try. Steer by hand first: see how pushing toward the target sends half the swarm into the wrong branches. Then compare Point at target with Evolved, robust. Turn the friction up to 1, or add reversed flow, and watch which designs still work. In sorting mode, compare a ratio of ×1, where no field can separate identical robots, with ×1.5.
Loading…
Refined over drawn friction, robot variation and flow: in the study the best design, about 95% delivered at friction 0.5.
The result
We compared six ways of choosing the field: two simple baselines, a published algorithm for gathering a swarm with one shared push, and three sequences designed through the simulation. Each was tested on 64 swarms it was never designed on, at three levels of wall friction and under seven changed conditions. The test, its measures and its decision rules were written down before any of these runs.
Designed sequences deliver most of the swarm. At moderate wall friction, the best design puts 95% of the robots in the target outlet, against 82% for a greedy method that picks the best push one move at a time, 61% for the published algorithm translated to these channels, and 16% for pushing along the path to the target. It was found by an evolution strategy, a search that tries random changes to the sequence and keeps what helps, starting from the greedy one. It wins at every friction level tested, by 12 to 16 points over greedy.
Designing for the uncertainty costs nothing. A sequence designed over a range of friction, robot variation and flow did better than one designed for a single condition, even under that single condition (95% against 89%), and better in 16 of the 21 other tests, by up to 17 points with flow on sticky walls (19 with stiffer collisions). It fell behind by about 2 points only on frictionless walls with twice the robots or with stiffer collisions.
Gradients through the simulation didn’t help. The simulation is differentiable, so a sequence can be improved by following the gradient of a smooth score. But collisions make the gradient grow about 20-fold with every move, and capped to stay finite, it didn’t improve on its greedy start (81% against 82%). The search without gradients did, by 13 points.
Sorting by mobility needs a difference of about 1.5×. With identical robots no field separates them, as it must be. At a 1.5× difference in mobility one designed sequence reaches a separation of 0.24 at moderate friction, mostly by delivering the more mobile kind (53% of them, against 5% of the others); at 1.1× it does nothing. A 2× difference separated less than 1.5× at moderate and high friction, which may be the search rather than the physics.
A 2D model with soft collisions, in which robots in a crowd overlap. A check with collisions five times stiffer kept the ranking of the designs but moved the numbers at high friction by up to 16 points, so the main results are quoted at moderate friction. Every comparison is relative: gathering is a hard problem, and nothing here says how close to the best possible any design is.
Loading the results…
Conclusion
One shared push can deliver nearly a whole scattered swarm through a branching network, if the sequence of pushes is designed for it: walls and collisions do the selecting, and a search over sequences in a simulation finds ways to use them that neither a greedy method nor a gathering algorithm made for an idealized grid does. Designing over the conditions one can’t control, friction, robot-to-robot variation and flow, cost nothing and held up better under conditions none of the designs saw. Gradients through the simulation, the obvious tool for a differentiable model, were defeated by collisions; a simple search did better at the same cost. Sorting two kinds of robot with one field works once they differ by about half again in mobility. All of this is in a simplified 2D model; real vessels, real robots and real flow are the test that would settle it.
The science
Magnetic microrobots, from helical swimmers to drug-carrying particles, are driven by fields from coils outside the body. A field is nearly uniform at the scale of a swarm, so every robot gets the same command. Control under a shared input is well studied as a puzzle: in the “tilt” model every particle moves the same way until blocked, and gathering a swarm into one place in a maze-like vessel network is NP-complete. Becker, Fekete and colleagues give algorithms for it; the best of their heuristics, MSTE, repeatedly takes the move that most reduces the total distance to an extreme cell. Their model is a grid of cells; here MSTE’s moves become unit pushes along the axes, each long enough to cross one cell.
Other work uses differences between robots (size, magnetic material) to move two or three independently with one field, wall friction to reshape a swarm, or reinforcement learning to steer a swarm from its observed positions, which needs imaging. This study asks a different question: can a fixed, open-loop sequence, designed through a continuous simulation with walls, friction, collisions and flow, deliver a swarm it has never seen, and does designing over the conditions one can’t control protect it?
The model: a binary tree of channels, three levels deep, each a straight channel with rounded ends. Robots are disks with no inertia; each moves at its mobility times the field, plus the flow, plus a soft push from any robot it overlaps. At a wall the push into the wall is removed and sliding is slowed by Coulomb friction. Every switch in the model is smooth, so it can be differentiated. Flow is parabolic in each channel and halves at each junction.
What’s real
- Uniform fields steering every robot alike is how magnetic microrobots are driven; wall friction and robot-to-robot differences are known tools for breaking the symmetry.
- Gathering with a shared push is NP-complete, and the published algorithm compared here (MSTE) is from that line of work.
- Robots too small for inertia move at a speed set by the force on them, as in the model.
- The browser runs the same model as the study, checked against the Python research code step by step.
What’s simplified
- 2D, with disks instead of shaped robots: no rolling, no magnetic torque, no fluid coupling between robots.
- Soft collisions: robots in a crowd overlap; a stiffer check kept the ranking but changed the numbers at high friction.
- An idealized branching tree with closed outlets and simple parabolic flow, not a real vessel network.
- Sequences are fixed in advance; with imaging, closed-loop control could do more.
Sources
- Becker, Fekete, Huang, Keldenich, Kleist, Krupke, Rieck & Schmidt, “Targeted drug delivery: algorithmic methods for collecting a swarm of particles with uniform, external forces” (2024)
- Fekete, Friemel, Kramer, Reinhardt, Rieck & Scheffer, “Tilt automata: gathering particles with uniform external control,” SoCG (2026)
- Shahrokhi, Mahadev & Becker, “Algorithms for shaping a particle swarm with a shared control input using boundary interaction” (2016)
- Diller, Floyd, Pawashe & Sitti, “Control of multiple heterogeneous magnetic microrobots in two dimensions on nonspecialized surfaces,” IEEE Transactions on Robotics (2012)
- Jagadish & Varma, “Navigation of micro-robot swarms for targeted delivery using reinforcement learning” (2023)