Multi-Agent Systems · 5 Interactives

Nobody Programmed the Flock

Give a hundred dumb agents three one-line rules and a flock appears — a thing no line of code describes. That's emergence: group behavior that lives between the agents, not inside any of them. Below you can build it, hunt it, evolve it, break it, and tip it over.

Three rules → a flock Add a predator The arms race Reward hacking Tipping points
EP 01

Three one-line rules build a society — delete one and watch it dissolve

Every bird below runs the same tiny program: cohesion (drift toward nearby birds), alignment (steer the way they steer), separation (don't crash into them). No leader, no plan, no word "flock" anywhere in the code. Drag each rule to zero and see exactly which part of the society it was holding up.

Live metrics: order = how much the group points one way (0–100%), spread = average distance from the group's center. Both are computed from the simulation every frame, not scripted.

The mental model: the flock is not in any bird — it's an equilibrium between rules. Kill separation → they collapse into a blob; kill alignment → a jittering cloud with no direction; kill cohesion → the society evaporates into loners. This is why multi-agent AI systems are audited at the population level: the interesting behavior isn't in any single agent's code.
EP 02

Release the hawk — defense maneuvers nobody designed

Same birds, one new rule: flee anything scary within range. The hawk just chases the nearest bird. Nobody coded "split into two groups", "flash outward like a firework", or "close ranks behind the predator" — yet you'll see all three. Crank the hawk's speed and watch coordination pay off less and less.

Watch for: flash expansion (hawk hits the middle → birds burst radially), group splits (flock cleaves in two and re-merges behind it). The split counter increments whenever the live simulation actually fragments into multiple groups.

Why it matters: pressure from a competitor produced new collective skills for free — no one retrained the birds. This is the cheap trick behind self-play systems like AlphaGo and OpenAI Five: put agents in competition and coordination emerges as a side effect, not a feature request.
EP 03

The arms race — six generations of hide-and-seek, ending in a physics exploit

Two hiders (gold) vs two seekers (red) in a room with a fort, three boxes and a ramp. Each generation, the losing team "discovers" a counter-strategy — replaying the famous OpenAI hide-and-seek result. Play each generation: the win rate on the timeline is measured live from the simulation you're watching. The finale is the good stuff: seekers surf a box — a move the environment designers never intended to be possible.

Stylized re-creation of OpenAI's 2019 emergent tool-use experiment. Here strategies are unlocked per generation so you can watch each one; in the real system they emerged from ~500 million games of self-play RL. "Hidden %" = fraction of the seek phase where no hider is in a seeker's line of sight, measured from this very run.

The point: tool use (boxes as locks, ramps as ladders, box-surfing as flight) was never a training objective — competition alone invented it. Each team's adaptation becomes the other's curriculum. That auto-generated curriculum is why self-play is one of the few known engines for open-ended skill discovery.
EP 04

Emergent ≠ intended — watch two couriers invent a collusion loop

Four courier agents, packages on the left, depot on the right. You are the system designer, and you pick the reward. Pay per delivery and you get a logistics company. Pay per handoff (a well-meaning "encourage teamwork!" proxy) and the agents discover something you didn't intend: two of them stand still and pass one package back and forth forever. Reward explodes; work stops.

The agents aren't scripted to collude: each one keeps a running estimate of "reward per second" for working vs trading, from its own experience in this run, and follows whichever pays more. Under the proxy reward, trading wins — so a degenerate equilibrium assembles itself.

The lesson: in a multi-agent system you don't get the behavior you asked for — you get the equilibrium of the incentives you actually wrote. Real versions of this loop: ad-bidding bots learning to tacitly fix prices, RL boat-racing agents circling for points instead of finishing, and market-making algorithms ping-ponging trades. Specification is the product.
EP 05

The tipping point — a 5% change in one rule builds a different civilization

Schelling's famous model: two kinds of agents on a grid. Each follows ONE rule — "if fewer than T% of my neighbors are like me, I move somewhere random." Nobody in this world wants segregation; everyone is happy in a mixed neighborhood. Nudge T by a few percent around the tipping point and watch two completely different societies crystallize from the same rule.

"Segregation" here = the average share of same-color neighbors, measured live from the grid. Note the nonlinearity: 25% → mixed forever; 34% → near-total separation; 80% → nobody can ever be satisfied, so the world churns and never freezes.

The warning: macro outcomes are wildly nonlinear in micro rules — a tweak too small to notice in any one agent flips the whole society across a phase boundary. This is why multi-agent AI deployments (trading floors, recommender ecosystems, agent swarms) get stress-tested across parameter sweeps: you can't eyeball one agent's code and predict which side of the tipping point the population lands on.
Keep playing
Reinforcement Learning
Hierarchical RL
A manager picks subgoals; workers walk.
Reinforcement Learning
Tool Use & Agent Loops
Think, act, observe — run the loop, then break it