Print

 

🐝 Modelling Bee Colony Behaviour β€” A New Interactive for Secondary Biology

Published by lookang | sg.iwant2study.org | March 2026


Why Model a Bee Colony?

A honeybee colony is one of nature's most extraordinary computing systems. No single bee holds a map of the hive, yet thousands of individuals β€” each following a handful of simple rules about its nearest neighbours β€” collectively thermoregulate, navigate, and even vote on new nest sites. This is emergence: complex, coordinated behaviour arising from local interactions alone.

 

For Secondary 3–4 Biology students meeting concepts like adaptation, response to stimuli, and the organisation of living things, a bee swarm offers an almost perfect case study. But it is notoriously hard to observe in a classroom. That is why I built the Bee Colony Behaviour Model β€” a free, browser-based interactive that puts a living colony in every student's hands.


What Is the Interactive?

The Bee Colony Behaviour Model is a self-contained HTML5 simulation β€” no installation, no plugins, no login β€” that runs on any device from a school Chromebook to a mobile phone. It lets students adjust real environmental parameters and watch the colony respond in real time.

At its heart is an agent-based model (ABM): each bee on screen is an autonomous software agent with its own position and velocity. Agents sense only their immediate neighbourhood; there is no central controller. Global patterns β€” the tight "beard", the coordinated drift in wind, the pulsing waggle dance β€” emerge spontaneously from their local interactions, exactly as they do in nature.


Key Concepts Covered

The interactive is explicitly designed around five biology key concepts, displayed as hoverable chips at the top of the page:

ConceptWhat the interactive shows
Agent-Based Model Each bee obeys three local rules; complex swarm patterns emerge without a "leader"
Collective Behaviour The colony acts as a superorganism β€” individual bees respond to neighbours, producing coordinated group dynamics
Thermoregulation As wind increases, bees cluster to maintain ~35 Β°C inside the hive; outer bees insulate inner bees and the brood
Waggle Dance Toggle on to see forager bees break into a figure-8 motion, communicating food source direction
Beard Formation At high wind speeds, the cluster elongates into a teardrop shape β€” minimising aerodynamic drag while holding the group together

Feature Tour

πŸŽ›οΈ Simulation Controls

Four one-click weather presets β€” β˜€οΈ Calm, 🌬️ Breezy, πŸ’¨ Windy, β›ˆοΈ Storm β€” immediately demonstrate how colony structure changes across conditions. Students can then fine-tune:

 

πŸ“Š Real-Time Graphs

Two live strip charts update every animation frame:

 

  1. Cluster Compactness (%) β€” derived from mean agent–centroid distance; rises sharply as wind increases, showing the beard transition quantitatively.
  2. Average Bee Speed β€” peaks briefly during the reorganisation phase as bees rush inward, then settles lower once the tight cluster is stable.

Students can read off these graphs to support written answers or data analysis tasks.

πŸ–±οΈ Click-to-Label Canvas

Clicking anywhere on the simulation canvas drops a persistent text label at that point.


Students can annotate the display β€” marking "high-activity core", "peripheral guard bees", or "wind direction" β€” turning the screen into a digital field-sketch, excellent for practicals and e-portfolios.

 

🎨 Colour-Coded Bees

The colour of each bee reflects its local density, serving as a visual proxy for the thermal gradient inside a real beard:


The Mathematics Inside

One of the design goals was to make the simulation's equations fully transparent β€” so that curious students and teachers can see exactly what is going on. Clicking πŸ“ Mathematical Model at the bottom of the page expands a journal-style derivation of all 11 equations, rendered in crisp LaTeX.

Here is a brief tour of the core physics:

Euler Integration advances each bee's position each timestep:

\[\vec{x}_i(t+1) = \vec{x}_i(t) + \vec{v}_i(t)\]

Five forces are superposed to update velocity:

\[\vec{v}_i(t+1) = \mathrm{clamp}!\left(\vec{v}_i(t) + \vec{f}^{,\mathrm{sep}}_i + \vec{f}^{,\mathrm{ali}}_i + \vec{f}^{,\mathrm{coh}}_i + \vec{f}^{,\mathrm{wind}} + \vec{f}^{,\mathrm{clust}}i,;;v{max}\right)\]

The three Boids rules β€” Separation (avoid crowding), Alignment (match neighbours' heading), Cohesion (steer toward local centre of mass) β€” were first formalised by Craig Reynolds in 1987 and remain the canonical model for collective animal motion.

The two bee-specific additions are what make this more than a generic flocking simulation:

The compactness observable plotted in the live graph is:

\[C(t) = \max!\left(0,;100 - \frac{\bar{d}(t)}{1.8}\right)\]

where (\bar{d}(t)) is the mean agent–centroid distance. A full parameter table (12 parameters with symbols, defaults, and descriptions) is also provided.


Built-In Quiz

A six-question quiz tests conceptual understanding by tying each question directly to a numbered equation in the derivation section.


Students are asked, for example, which force drives beard formation as wind increases (the colony centroid pull, Eq. 8), or why speed clamping is necessary (metabolic / biological locomotion limits, Eq. 9). Correct answers are highlighted green; incorrect answers show a targeted hint pointing back to the relevant equation β€” encouraging students to reconcile the maths with the visual behaviour they just observed.

A score banner gives tiered feedback from "Keep exploring β€” re-read the equations!" (0/6) to "Perfect score! You have mastered the bee swarm behaviour model." (6/6).


Pedagogical Design Decisions

Several deliberate choices were made to maximise learning:

  1. Presets before sliders β€” Students click a weather preset first (immediate payoff), then explore sliders (hypothesis testing). This mirrors the scientific method without requiring explicit scaffolding.
  2. Observation hints β€” Each preset updates an observation box ("Notice how the colony compresses and slows β€” the cluster absorbs wind energy collectively!"), narrating what to look for so students know what constitutes a valid observation.
  3. Equations after exploration β€” The maths panel is collapsed by default. Students meet the behaviour first; the formal model rewards curiosity rather than front-loading abstraction.
  4. Mobile-first responsiveness β€” The two-column grid (canvas + controls) collapses to a single column on screens narrower than 700 px. All sliders and buttons pass touch-target size guidelines, and the canvas uses https://sg.iwant2study.org/ospsg/index.php/interactive-resources/biology" target="_blank" rel="noopener noreferrer" class="underline text-text-300 hover:text-text-100" style="color: rgb(61, 61, 58); font-family: "Helvetica Neue Light", HelveticaNeue-Light, "Helvetica Neue", Helvetica, Arial, sans-serif; outline: rgba(27, 103, 178, 0) solid 1.5748px; text-decoration: none; transition: color 0.3s; display: inline; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: hsl(210 70.9% 51.6%/1); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(31, 30, 29); box-sizing: border-box; outline-offset: 2px; scrollbar-color: rgba(31, 30, 29, 0.35) rgba(0, 0, 0, 0); scrollbar-width: thin; text-rendering: optimizelegibility;">Access the Bee Colony Behaviour Model and all other Biology interactives

    The interactive is free, requires no login, and works on any modern browser. If you find it useful in your class or would like to suggest improvements, do leave a comment or reach out through the iwant2study.org portal.


    Made by lookang, using Claude 4.6. Part of the Open Source Physics @ Singapore (OSPSG) project.

1 1 1 1 1 1 1 1 1 1 Rating 0.00 (0 Votes)
Parent Category: Interactive Resources
Category: Biology
Hits: 21