When a honeybee colony swarms, roughly half the workers leave with the old queen and cluster in a tight ball on a branch — this simulation's hanging cluster. That cluster is homeless and must find a new cavity within days. A few hundred experienced foragers become scout bees: they fly out, inspect tree cavities and other potential nest sites, judge each one on size, entrance height, draughtiness and defensibility, then fly home and advertise the best ones they found with a waggle dance — exactly like the dance used to recruit foragers to flowers.
Biologist Thomas Seeley spent decades decoding this process on isolated islands with artificial nest boxes of controlled quality, showing that swarms reliably pick the best available site through this decentralised voting process — without any single bee ever comparing the candidates itself.
A swarm cluster hangs from a branch while scout bees fly out to candidate tree cavities, dance to recruit nestmates to the best sites they find, and build a quorum before the whole swarm relocates together.
Better sites earn longer, more vigorous dances, which recruit more scouts, which produce more dances — a positive-feedback vote that converges on the best available cavity without any bee comparing sites directly.
Set how many sites are competing, how much better the best one is, and how many scouts must agree before liftoff. Watch each site's orange vote bar race toward the quorum line.
Thomas Seeley's island experiments showed swarms reliably choose the best of several nest boxes even when scouts start out split between them — collective intelligence beating any individual bee's judgement.