hr-studioAgents & Swarms · 02
A computational design primer · Swarm Intelligence

Nobody is in charge, and yet

A flock has no leader. Each bird watches a handful of neighbours and copies them, badly. From that — from nothing but local copying and noise — comes a decision the whole group makes together: a direction, a destination, sometimes the answer to a problem none of them could state. This is what a swarm is: not many things moving, but many things agreeing.

Scroll — start with one rule
i.

Alignment, and the moment it snaps

Give each agent one instruction: point the way your neighbours are pointing. Add a little noise to the turn — a gust, a misjudgement. Nothing else. No leader, no target.

Turn the noise down and the crowd suddenly locks into one direction. Turn it up and the order evaporates. It doesn't fade gently: there is a critical noise where the flock stops being a flock. Physicists call this a phase transition, and it is the same mathematics as a magnet losing its magnetism when you heat it.

The readout is the order parameter — the length of the average heading. One means perfect consensus; zero means a milling mob.

Vicsek model · 400 agentsφ = —
ii.

A few who know where they're going

Now let a handful of agents carry a private preference — a food source, a nest site, a migration route. They still align with their neighbours, but they lean, faintly, toward their goal.

The striking result, from Couzin's work: the informed few don't have to argue, signal, or lead. They don't even need to know they are the informed ones. As the group grows, a smaller and smaller fraction is enough to steer it. Below a few percent, the group wanders. Above it, the whole swarm goes where the minority wanted.

Nobody in the crowd can tell who is informed. The direction is nonetheless collective knowledge.

Informed agents shown darkererror —
iii.

A swarm that searches

Kennedy and Eberhart were simulating birds when they noticed the flock was solving something. Give every agent a memory of the best place it has personally found, and a rumour of the best place anyone has found. Let it be pulled by both, and by its own momentum.

That is the whole of particle swarm optimisation. Three numbers: how much you coast, how much you trust yourself, how much you trust the crowd. The landscape below is a fitness surface — bright is better — and the swarm has never seen it. It only ever samples the point it is standing on.

Bright is better · ★ is the best foundbest —
iv.

The cost of agreement

Agreement is not free. Raise the pull toward the crowd's best find and the swarm converges faster — and then it is standing still, all in one place, sampling one hill. It has stopped looking.

That costs nothing while the world holds still. Below, it doesn't: the swarm hunts, settles, and then the summit moves. Each dot is where an independent swarm ended up afterwards. A loose swarm still has scouts far from the crowd, and it finds the new peak. A converged one has none, and never learns the world changed.

This is why real swarm algorithms fight to keep their diversity. Confidence and adaptability are the same dial, turned opposite ways.

The summit relocates mid-run
v.

The swarm studio

A landscape you can rearrange, and three hundred agents who cannot see it. Drag the peaks around while the swarm is hunting and watch it abandon a summit that no longer exists. Starve it of momentum and it crawls; starve it of crowd and it never agrees; give the crowd everything and it collapses onto the first good idea it has.

Every swarm algorithm in production — routing, scheduling, antenna design — is this argument between three numbers.

Drag a peak · amber have agreed · ink still searching
A swarm has no plan, no map, and no leader — only momentum, memory, and rumour. It is enough to fly, and enough to search.