Each amber sphere is one bee at a single colour locus with two alleles: A
(dominant, bright amber) and a (recessive, dark "cordovan"). Every simulated
generation, the colony's next allele frequency is resampled the way real finite
populations actually reproduce — through random sampling of gametes, not a fixed formula.
That randomness is genetic drift, and it is strongest in small colonies.
With no drift, no migration and random mating, genotype proportions settle at
p² (AA), 2pq (Aa) and q² (aa) and stay there forever —
the Hardy-Weinberg equilibrium. This simulator breaks each of those assumptions on demand
so you can see exactly which one is responsible when the colony drifts away from it.
Real honey bee subspecies conservation programmes (for example protecting the native dark bee Apis mellifera mellifera from hybridisation) track allele frequencies at marker loci exactly like this, because uncontrolled gene flow from imported queens is the biggest threat to a subspecies' distinct gene pool — while too little gene flow in an isolated, shrinking population raises inbreeding and can cause the diploid-male problem in honey bees' haplodiploid sex-determination system.
A 3D colony of instanced bees, each carrying two alleles at a single colour locus, whose allele frequency drifts, migrates and inbreeds generation after generation right in front of you.
Every generation resamples the population's alleles the way real finite colonies reproduce, showing genetic drift, migration-driven gene flow and inbreeding-driven deviation from Hardy-Weinberg proportions as separate, tunable forces.
Set colony size, starting allele frequency, migration rate and inbreeding coefficient, then press Run. Watch the bees' colours shift and the allele-frequency trend line drift, spike or stabilise above the hive.
Small, isolated apiary populations can fix or lose an allele purely by chance within a few dozen generations — the same drift dynamic conservation programmes must fight to keep rare honey bee subspecies genetically distinct.