Experiment 06
Boids
Three local rules and a single perception radius are enough to turn a cloud of random velocities into a coherent flock that wheels, tightens, and scatters like a single organism — with no individual ever knowing the group's overall motion.
What is Boids?
Boids is a flocking model: each individual — a boid — perceives only its immediate neighbours, within a single fixed radius, and applies three rules to them at every simulation step. Separation: steer away from neighbours that are too close, to avoid collision. Alignment: match the average velocity of the neighbourhood. Cohesion: steer toward the neighbourhood's center of mass. These three forces, weighted and summed, determine the boid's acceleration — nothing else enters the computation.
Unlike LifeLabs' evolutionary agents, there is no brain and no selection here: every boid applies the same three rules, with the same weights, at every step, from the first individual to the last — no parameter is learned, no generation selects the fittest boids. The collective behavior is not the product of learning, but the repeated execution of a fixed, purely local rule.
Why this is emergence — collective movement, not coordination
Every run starts from randomly drawn velocities, with no shared direction: at step zero, the flock is just a cloud of points each moving on its own. No boid knows the group's heading, no message is exchanged, no target position is set in advance. And yet, after a few hundred steps, an order parameter — the average alignment of individual velocities — climbs well above what it would read for independent velocities: the flock has started flying in a shared direction, splitting into a few coherent groups, re-forming after crossing paths.
This rise is not a measurement artifact: the lab's control test (the "golden test") runs the same simulation with all three rules switched off — zero weights, no interaction between neighbours — and there the order parameter stays flat, close to its value for independent random velocities. The rise observed when the rules are active is therefore attributable to the three rules themselves, not to a bias in the computation or the initialization.
Pilot
Pilot the flock
Replaying a trajectory
The player below replays, frame by frame, the recorded positions and velocities of the flock over the course of the published run. Each boid starts in a random direction, then groups take shape.
Loading trajectory…
The replay couldn't be loaded
This run's trajectory couldn't be fetched. In the meantime, here's a video capture of the simulation, when available.
The vital signs we measure
Each run records three time series, computed at regular intervals during the simulation, which serve as "vital signs" for the observed flock:
- Order parameter
- the mean alignment of individual velocities, normalized between 0 (independent velocities, no shared direction) and 1 (the whole flock flies in exactly the same direction) — the most direct signal of collective self-organization.
- Number of clusters
- the number of spatially distinct groups detected within the flock — it drops to a single group once the flock gathers, and rises when it splits or stays scattered.
- Mean speed
- the mean speed of the boids across the whole flock — it shows whether the group has settled into a cruising pace or keeps accelerating or slowing down as a whole.