Obstacle corridor · 82 × 14 cm

Patience is a virtue — how a crowd of cockroaches gets through a bottleneck

–s
…effective crossing time, live
Waiting prob.0.90
Crowding20ε₀
Turned back–
Waiting now–
live model ↓
Patience forecast simulating in your browser…
0Today's summary

The paper in one breath

When a crowd squeezes through a narrow, cluttered passage, the group gets through faster if each individual is willing to stop and wait when it bumps into someone from behind.

  • 🪳Roaches queue, robots shove. Alone, cockroaches and vibrating bristlebots cross an obstacle course about equally well. In a crowd of twenty, the roaches are clearly faster — they form lines instead of logjams.
  • 📡Four bits are enough. The authors' model agent decides every move from just two antennae, each reporting one of four states. That cost doesn't grow with crowd size.
  • ⏸One dial, two species. A single parameter — the probability of waiting, pw — turns robot-like agents (0) into roach-like ones (near 1).
  • ⏱Slower is faster. Waiting costs the individual a moment but saves the group from jams. The benefit grows with crowding and with slow stragglers in the mix.

The dark bar at the bottom of the screen is the paper's one dial. Everything on this page responds to it. Try it now and watch the forecast above.

1Steering by touch

One roach, two antennae, two bits

In the experiments, every big change of direction a roach made was triggered by an antenna brushing a wall or obstacle. The model keeps only that: each antenna reports touching or not touching.

Tap empty space to add a post. Drag posts — or the roach — anywhere. Drag a post out of the box to remove it. Pause and step to see each decision.

Left antenna (+)
0
clear
Right antenna (−)
0
clear
0 0Nothing touching → walk forward one step.
1 0Left antenna touching → turn clockwise in place until both are clear.
0 1Right antenna touching → turn counter‑clockwise until clear.
1 1Both touching → take the smaller turn, preferring one that still faces the exit.
"Just as a whitewater rafter uses his oars to push off rocks… a running roach uses antennal collisions as the driving impetus to rotate its body away from obstacles."Mayo et al., p. 6

The torque comes from the roach's own legs, not from the obstacle pushing back. Bristlebots get the same effect mechanically: their oblong bodies twist away when they hit things. That is why one rule describes both.

2The social rule

Two more bits: who am I touching?

The social version asks each antenna one more question. Is it touching a wall, or another agent? And if another agent, is that agent touching me back?

Slowed down 2.5× so you can watch each step.

Follower · left (+)
00
clear
Follower · right (−)
00
clear
walking
00clear
01wall or obstacle → steer as before
10agent, mutual (face to face) → steer around it, treat like an obstacle
11agent, non‑mutual (I'm behind it) → stop and wait with probability pw; otherwise steer around

clearobstaclemutualnon‑mutual

Why the mutual test? If two agents meet face to face, waiting is pointless — each blocks the other forever. The "is it touching me back?" check means only the one behind waits. Set the dial to 0 and the follower barges around. Near 1, it queues.

3Same crowd, two temperaments

Bugs vs bots, side by side

Both lanes receive the identical stream of arrivals. Left: pw = 0, pure collision-steering like a bristlebot. Right: your dial setting. Tap an agent to freeze it for three seconds, like a timid roach. It freezes in both lanes.

Bots –
pw = 0
–s τξ
crossed 0turned 0
Roaches –
pw = 0.90
–s τξ
crossed 0turned 0

ε₀ ≈ 1 agent every 129 steps: slow enough that each agent clears the corridor before the next arrives. 20ε₀ means twenty times that. One step is 1/30 s, as in the experiment videos. Scores use the last 80 agents to leave.

4Scoring a crowd

Effective mean crossing time, τξ

Averaging only the agents that made it across rewards giving up: the ones that turn back at a jam don't count against you. So the paper divides by the fraction ξ that made it. If only half get through, it effectively takes twice as long.

Live numbers from the two lanes above. Blue: crossed. Red: turned back.

The authors also frame τξ as the payoff in a game. Each agent wants food on the far side of an exposed corridor. Standing still is risky — "stationary, exposed organisms are more vulnerable to predation" — yet waiting still lowers everyone's expected crossing time. The strategy that looks costly for one is best for all.

5The real animals

What the cockroaches did

American cockroaches and Hexbug Nano bristlebots ran a 6‑inch‑wide plexiglass corridor with four 3‑inch posts in a diamond. A camera filmed from above at 30 fps, and tracking software (TRex) turned each video into trajectories.

Solo roach
125 ± 68 frames
≈ 4.2 s · 34 runs
Solo bristlebot
177 ± 30 frames
≈ 5.9 s · 34 runs

Alone, the difference isn't statistically significant. Heatmaps of where each went (Fig 4) look broadly alike. The bots don't ricochet around like billiard balls.

In groups (Fig 5)

roaches bristlebots · mean ± 1 sd, values read from the paper's Fig 5. Normalised by each agent type's solo crossing time.

With ten agents the two are indistinguishable (p = 0.988): the corridor rarely gets crowded enough to jam. With twenty, the roaches' queuing shows (p = 0.029).

6Reproduce the result

Run Fig 6 yourself

Each point in the paper's Fig 6 is 100 simulations of 100 agents. Dashed lines are the paper's curves, traced by eye. Dots are runs computed now, on your phone, with the same rules.

Each dot here: 20 runs × 100 agents. A full sweep takes a few seconds.

Read the shape. At light crowding (bottom curve) waiting barely matters. As crowding rises, the curves fan out at pw = 0 and converge near 1. Patience makes the crowd's speed almost independent of how crowded it is. With slow stragglers, everything is slower, but patience helps even more.

7A fluid analogy

Laminar queues, turbulent shoving

The authors compare pw to the Reynolds number. High patience is like a viscous fluid: the crowd "sticks together" and flows smoothly around posts. No patience is like high Reynolds flow: some of the crowd bounces off obstacles and flows backwards into the oncoming stream, like eddies.

pw = 0
pw = 0.95
"Backflow radar": where agents walked against the current, summed over 6 runs at 20ε₀. Agents enter at the top. Brighter means more backwards walking.
8Cost of thinking

Why "minimal" cooperativity

Classic flocking models (Vicsek) have each agent read the heading of every neighbor. If a heading can only be resolved to within a sector of width η, each neighbor costs log₂(2π/η) bits. Multiply by the number of neighbors.

Resolution ηπ/8
Neighbors ⟨n⟩1

The roach-style agent's cost stays fixed at 4 bits however crowded it gets. A Vicsek agent ties it only with one neighbor at π/8 resolution. The authors note the comparison isn't entirely fair: their agents start out already facing the same way.

9A design you could build

Patience in hardware, no processor needed

The paper ends by proposing a robot. Two wire antennae are wired straight into the leg circuits. Pressure on one antenna cuts power to the opposite legs, so the robot pivots away. Both pressed: everything stops — that's the wait.

…or tap an antenna directly.

One antenna must be shorter than the other, or a head‑on hit with a wall would freeze it forever. Because the rule only needs touch, it would work around any moving thing — other robots, people, animals.

"If an agent can independently navigate its environment, then programmed patience may be the only additional prerequisite for navigating it as part of a group."Mayo et al., p. 14
10Read critically

What to hold loosely

  • The headline test is as small as it can be. The 20‑agent comparison has 3 roach and 4 bot replicates. There are only 35 ways to split 7 runs into 3 and 4, so the smallest possible p‑value is 1/35 ≈ 0.029 — exactly what was reported. The roaches beat the bots in the most extreme arrangement possible. That is the strongest result this design can give, and it rests on seven videos.
  • Different engines. Roaches were nudged along by fanning them with cardboard. Bots were driven by tilting the table 0.89°. Crowding was not matched precisely between species.
  • The model is qualitative by design. Model agents follow narrower paths than real ones (Fig 4B–C). The authors say a little noise would fix that, but matching numbers was never the goal.
  • "Four bits" is the decision, not the senses. Telling mutual from non‑mutual contact takes rich sensing. The four bits are what's left after the brain has done that work.
  • Not a new phenomenon — a new mechanism. "Slower is faster" is well documented in crowds, traffic and grains. What's new here is how little information an agent needs to get it.

Worth stealing

  • 📏Score failures, not just successes. τ̄/ξ penalises giving up. That's a useful pattern for any throughput metric.
  • 🤝Asymmetric courtesy. Yield only when you're behind. Never when you're face to face.
  • 🎛One dial between two behaviours. A single parameter that interpolates between observed species makes the model testable and teachable.
Sources

The paper and data

Mayo AM, Carrigee C, Harrison AB, Mayo ML, Pilkiewicz KR (2026). Patience is a virtue. PLOS Complex Systems 3(10): e0000136 ↗ Roach and robot trajectory dataset (Kaggle) ↗ Bret Victor — Scientific Communication as Sequential Art ↗

The paper is CC0 public domain. The simulation here re-implements the Methods section. Chart values marked "traced" were read by eye from the published figures.

Waiting probability pw0.90
0 · bristlebot (shoves)roach (queues) · 1