🐝 Designing Rigorous Field Trials for Apiary Research (2D)
A top-down apiary grid on a field with a hidden forage gradient: assign colonies to treatment and control under completely randomized, randomized-block or haphazard designs, and watch the confounding index and mean gradient gap respond as you change the design.
This 2D companion drives the same randomization mechanic as the 3D field trial through a flat, top-down apiary map: the field's hidden forage gradient is painted directly onto the grid, colonies are drawn as hive markers colored by treatment or control, and row-block boundary lines appear when a randomized-block design is active — so the effect of each allocation scheme on confounding is visible at a glance instead of requiring an orbiting camera.
🔬 What It Demonstrates
Completely randomized and randomized-block designs keep the correlation between treatment assignment and the environmental gradient near zero; a haphazard design that follows the gradient produces a confounded comparison, visible as a large confounding index and gradient gap.
🎮 How to Use
Pick a grid size and allocation design, set the treatment share, then re-randomize. Watch the confounding index and mean gradient gap respond, and toggle the gradient or block-boundary overlays to see why blocking helps.
💡 Did You Know?
Randomized block designs, introduced by Ronald Fisher for agricultural field trials in the 1920s, remain the standard way apiary researchers control for uneven forage, wind and sun exposure across an apiary site.
2D top-down field-trial lab: a deterministic forage gradient is painted across the field, colonies are assigned to treatment/control under CRD, RCB or haphazard rules using a seeded PRNG, and the confounding index is the live Pearson correlation between assignment and gradient value — the same formulas as the 3D version.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install