Built 2026-10-13 under Claude harness v4. This is the top-level guide to the program. The full science of this version,
with every source, is in CT54.A6.CombinedSwarms_SCIENCE.md (.html). The build history, for resuming work, is in
CT54.A6.CombinedSwarms.md.
?q=). Some hardware encoders ignore the bit rate they are given and smear the tiny bees.
Every encoder is tried on a real test frame before it is used, so one that claims support and then fails cannot
spoil a take. The encoder used and the bit rate actually reached are shown in the HUD; ?encoder=hw prefers the
hardware encoder.CT54.A6.CombinedSwarms_SCIENCE.md, describes this version only, with no history of
earlier versions.The simulation itself is unchanged (labels only). The state hashes in §5.2 are the same as in CT54.A1–A5.
⏳ This simulation takes minutes to resolve. For the first minute the bees only mill in a loose cloud. The cluster forms over the next one to two minutes and is complete after about 2–3 minutes of simulated time (option 2: 76 % settled at 90 s, 99.9 % at 120 s). + speeds it up.
A browser simulation of a honeybee reproductive swarm: the old queen and several thousand workers have left the
hive. They mill in a cloud, find the queen by her scent and gather around her. There is one index.html and
five options:
| # | Option | What you see | Status in the scientific literature |
|---|---|---|---|
| 1 | Beard | Mild, calm air. The swarm hangs from a thin vine stem under an old arbor as a long, pointed cluster. | Documented |
| 2 | Compact (★ default) | Cool air. The bees pack tight: a shorter, rounder, tightly bound cluster. | Documented |
| 3 | Broad | Hot air. The cluster loosens: short, broad and larger. | Documented |
| 4 | Swaying | Wind. The cluster hangs short and broad and sways in the gusts. | Documented |
| 5 | Hovering ball (experiment) | Still air. The queen hovers in the open, attached to nothing, and the bees keep flying in a dense ball, about 15 in across, around her. | Experiment based on the author's observations — NOT documented in the literature |
A banner above the picture always says which option is running, for example "2 · OPTION 2 OF 5 · COMPACT ★ DEFAULT · DOCUMENTED" or "5 · OPTION 5 OF 5 · HOVERING BALL (EXPERIMENT) · EXPERIMENT — BASED ON THE AUTHOR'S OBSERVATION, NOT DOCUMENTED IN THE LITERATURE".
CT54.A6.CombinedSwarms.zip. Everything is in the folder CT54.A6.CombinedSwarms.index.html. It opens in your browser straight from disk. Use Chrome or Edge to make movies.
No internet is needed: three.js r186, the movie packer and the fonts are bundled.The Option selector, the keys 1–5, the banner, or ? Options (bottom left). Each reloads the page and starts
the chosen option from the beginning. A fresh start (opening index.html) always runs option 2.
| Control | Key | |
|---|---|---|
| Time | Reset · Back · Pause · Forward · Slower · Faster | R · B/← · Space · F/→ · − · + |
| Camera | Drag: orbit · wheel or [ ]: in/out · right-drag or Shift-drag: pan · double-click: re-centre | |
| Camera auto / orbit · orbit spin · aim (queen / centre / tip) | A · O · T | |
| Close-up window (lower right) | P | |
| Options 1–4 | Hangs from: thin vine stem / flat beam (reloads) | |
| Chains inside the shell · grip links · load shading | N · G · K | |
| Option 5 | Move queen: she flies slowly 10 ft to the measuring pole (press again to send her back); works once she hovers, after ~30 s | G |
| Follow: sight / scent — how the ball's bees keep with her (reloads) | L | |
| Look | Shaded / wire · shadows · reflections · outlines · crystal wings | W · Q · X · U · V |
| Displays | Show / hide the read-out displays (off at the start) | D (or H) |
| Other | Scent slice · castes · visible size · auto-zoom · sound | S · C · E · Z · M |
index.html in Chrome or Edge. Leave Movie size on Screen for a movie at your screen's resolution.
Maximise the window first if you want it as large as possible.CT54.A6.CombinedSwarms_movie_option<N>_seed<S>_<date-time>.mp4, then plays in the page. Start a new take
reloads.What to expect. * The movie runs at 30 frames a second at the speed shown on screen when not recording: at ×1, one second of movie is one second of the simulation. * While recording, the screen may run slower than real time (it is drawing and encoding every frame). That is expected and does not affect the movie. A 3-minute take may take longer than 3 minutes to record on a slow computer. * At constant quality the file size depends on the picture: roughly 200–800 MB per minute at a large screen size.
?option=1…5&intro=0 (or beard, compact, broad, windy, hover) · bees=N · seed=N · w=/h= (a fixed
picture and movie size; default = the screen's) · q= (movie quality, 0–51, default 18, lower is sharper) ·
encoder=hw (prefer the hardware encoder) · mbps=N (bit rate when constant quality is not available) ·
moviegain= (movie sound level, 1 = normal) · panels=1 (displays on) · run=0 (open paused) ·
support=branch|beam (1–4) · follow=sight|scent and movespeed=ft/s (5) · shell=0 (1–4: the older hanging model
without the shell).
Seed 3906, default bee counts, measured in Node (the browser gives the same numbers).
Every option starts the same way. For the first ~12–20 s the bees mill in a cloud about 30–40 ft across over the summit; the queen flies among them, calmer than the workers. Then she leaves the cloud.
| Option | Where the queen goes | 60 s | 90 s | 120 s | 150 s: final shape |
|---|---|---|---|---|---|
| 1 Beard | under the vine stem (12 s) | 29 % settled | 99.6 % | 99.9 % | 9.6 × 4.3 in (long × wide): a long, pointed beard |
| 2 Compact | under the stem | 16 % | 76 % | 99.9 % | 6.8 × 4.4 in: shorter and rounder |
| 3 Broad | under the stem | 30 % | 95 % | 100 % | 7.2 × 5.9 in: broad, the largest volume |
| 4 Swaying | under the stem | 19 % | 65 % | 95 % | 4.9 × 5.3 in: wider than long, sways ~0.7 in |
| 5 Hovering ball | a point in the open, 7 ft up, 4 ft in front of the arbor (20–28 s) | 18 % in the ball | 61 % | 96.5 % | ball ≈ 15 in across |
_sim.js), deterministic, no drawing. Options 1–4 are the hanging cluster under four
weathers; option 5's additions (the hovering queen, the flying ball, in-flight scenting, the queen's move, the pole,
the separate queen-pheromone grid) run only when option 5 is chosen.index.html) and one renderer (_main.js): drawing, camera, controls, sound and the movie._main.js, tick() and Rec): one clock for screen and movie (§ What changed, 1); WebCodecs
VideoEncoder (software H.264 at constant quality first, each candidate tried on a test frame) and AudioEncoder
(AAC, else Opus); packed into an MP4 by mp4-muxer 5.2.1 (bundled, MIT licence). Frame i is stamped exactly i/30 s;
each frame gets exactly 1,600 sound samples (48 kHz).The simulation is unchanged, to the bit. With seed 3906 the state hashes are the same as in CT54.A1–A5 and the programs it came from:
| Check (seed 3906) | CT54.A6 | Earlier |
|---|---|---|
| Option 1, 2,000 bees, 30 s | 4fe60707 |
4fe60707 (CT39.C8, CT54.A1–A5) |
| Option 5, 2,000 bees, 40 s | fbbc0818 |
fbbc0818 (CT52.A2, CT54.A1–A5) |
The movie (headless Chromium, software graphics, opened from disk):
* Timing: while recording, the simulation advanced exactly 4 steps (1/30 s) per movie frame: 10 frames = 40 steps
= 0.333 s of simulation, and the MP4 lasts 0.333 s at a constant 30/1 frame rate, with sound of the same length.
(That machine draws only a fraction of a frame per second, so the test is short; the timing does not depend on speed.)
* Size: with no w/h, the picture and the movie came out at the screen size of the shown picture
(device pixels; checked at 1.5× display scaling); Movie size read "Screen — W×H (default)".
* Encoder: that browser has no H.264 encoder, so it fell through to VP9 at constant quality after the test frames;
Chrome and Edge on Windows have software H.264. ffprobe: one video and one audio stream, constant frame rate.
* No console errors.
Not tested here: the H.264 encoders of Chrome and Edge on Windows (not available in the test browser), and speed on a real graphics card.
| File | What it is |
|---|---|
index.html |
The program. Open this. |
CT54.A6.CombinedSwarms_sim.js |
The simulation (deterministic, no drawing) |
CT54.A6.CombinedSwarms_main.js |
Drawing, camera, controls, sound, movie |
CT54.A6.CombinedSwarms_lib/ |
three.js r186 and mp4-muxer 5.2.1 (local), with their licences |
CT54.A6.CombinedSwarms_fonts/ |
Fonts (SIL Open Font Licence) |
CT54.A6.CombinedSwarms_title.webp |
Title art |
CT54.A6.CombinedSwarms_AUDIT.md / .html |
This guide |
CT54.A6.CombinedSwarms_SCIENCE.md / .html |
The science of this version, with all sources |
CT54.A6.CombinedSwarms.md / .md.html |
Context file: build history, for resuming work in a later chat |
(The full list is in SCIENCE §11.) * Seeley, T. D. (2010). Honeybee Democracy. Princeton University Press. * Beekman, M., Fathke, R. L. & Seeley, T. D. (2006). How does an informed minority of scouts guide a honeybee swarm as it flies to its new home? Animal Behaviour 71, 161–171. * Peleg, O., Peters, J. M., Salcedo, M. K. & Mahadevan, L. (2018). Collective mechanical adaptation of honeybee swarms. Nature Physics 14, 1193–1198. * Nguyen, D. M. T. … Peleg, O. (2021). Flow-mediated olfactory communication in honeybee swarms. PNAS 118. * Shishkov, O. et al. (2022). Strength-mass scaling law governs mass distribution inside honey bee swarms. Scientific Reports. * Heinrich, B. (1981). The mechanisms and energetics of honeybee swarm temperature regulation. J. Exp. Biol. 91.