🐝 Beehive Colony: Agent-Based Model
Thousands of individually-simulated bees nurse brood, forage a flower field, guard the entrance and thermoregulate the hive — watch a honeybee superorganism emerge from simple, role-based agent behaviour.
Thousands of individually-simulated bees nurse brood, forage a flower field, guard the entrance and thermoregulate the hive — a honeybee colony rendered as a genuine agent-based model, where colony-wide behaviour emerges from simple, role-based rules followed by each bee.
🔬 What It Demonstrates
No single bee runs the colony. Each agent follows a handful of rules tied to its role — nurse, forager, guard, builder, thermoregulator or scout — and the colony-level patterns we recognise, like a warm brood nest and full honey stores, emerge purely from thousands of those small decisions adding up.
🎮 How to Use
Set the target population, pick a season, and drag the forager-ratio slider to see how the balance of roles shifts honey stores, brood coverage and swarm pressure. Flip on disease pressure to watch a Varroa-style stressor erode colony vitality, and use the speed buttons to fast-forward through whole seasons.
💡 Did You Know?
A strong summer colony can hold 40,000–60,000 bees, yet it keeps its brood nest within about two degrees of 35°C purely through collective fanning and clustering — one of nature's clearest examples of decentralised, "superorganism" self-regulation.
Bee agents are rendered with THREE.InstancedMesh (a single draw call per role group) rather than one mesh per bee, so the scene stays fast even with thousands of visible agents; populations above the render cap continue to update on aggregate ("statistical mode"). A lightweight tick loop — decoupled from the render frame rate — advances resources, brood coverage, a composite Colony Vitality Index and a swarm-pressure meter once per simulated second, and periodically repaints the hex-comb canvas texture so the brood/honey/pollen zones visibly reflect the colony's current state.
3D · Three.js / WebGL · 60 FPS target · runs fully client-side, no install