Genetics and environment
Events
The Big Five fire automatically at their real dates (ticks on the timeline). A manual event kills the chosen percentage of individuals, favouring those closest to the shifted optimum, then the environment relaxes back.
Experiment: does R = h²S predict the response?
Question: when only the top fraction p of a population is allowed to breed, how closely does the measured change in the mean of the next generation match the breeder's equation prediction h²S, and how does the answer depend on heritability and sample size?
The science
What this simulation models
Four heritable traits (body size, speed, camouflage colour, limb/fin development) evolve in four habitat patches along a shore gradient, from deep sea to land edge. Each generation, individuals survive with a probability set by how well their traits match their patch's optimum; survivors breed, the next generation inherits the parental average plus new variation, and a little migration links neighbouring patches. When neighbouring patches drift far enough apart for long enough, the lineage splits and the phylogeny grows a branch.
Breeder's equation and the infinitesimal model
Phenotype z = g + e, with additive genetic value g and environmental deviation e. Heritability h² = VA/VP. The response to selection in one generation is
R = h² · S, S = mean(z of parents) - mean(z of population)
Offspring genetic value = midparent value + a segregation term with variance VA/2, which keeps VA constant under random mating. Truncation selection keeping the top fraction p of a normal trait gives the selection intensity
S = i σP, i = φ(xp)/p, xp = Φ-1(1-p)
Selection also removes variance (the Bulmer effect), so over several generations the realised heritability sum(R)/sum(S) comes out slightly below the nominal h². The Experiment tab measures all of this.
Fitness landscape and selection in the live population
Each trait has a Gaussian fitness peak (Lande 1976): w(z) = exp(-(z - θ)² / 2ω²) per trait, multiplied over traits. Survival probability is w divided by the best w in the patch (relative fitness: space and food are limited). For a normally distributed trait the survivors' mean shifts by exactly
S = VP (θ - z̄) / (ω² + VP)
and the app checks this number against the simulated survivors. Predators are drawn as abstract hunters: an animal that fails the survival draw is chased and then dissolves into sparkles. Nothing is shown being harmed; the simulation tracks survival only.
Speciation by isolation
Patches are separated by ridges; the ridge height maps to the migration rate. Adjacent patches have different optima, so even with some gene flow their means diverge (parapatric or ecological speciation). The standardised distance D = sqrt(sum over traits of ((mean1 - mean2)/σ)²) must stay above the chosen threshold for three generations; the lineage then splits in two, and migration between the new lineages stops (reproductive isolation). Real speciation is slower and more varied: allopatry, polyploidy, sexual selection and hybrid zones are not modelled.
Mass extinctions: the Big Five
End-Ordovician (445 Ma, about 85% of species), Late Devonian (372 Ma, about 75%), End-Permian (252 Ma, about 96%), End-Triassic (201 Ma, about 80%), End-Cretaceous (66 Ma, about 76%). In the model an event kills the stated fraction of individuals, weighted toward animals closest to a shifted optimum (small size, faster maturity, darker colour after an impact winter), so survivors differ systematically from the pre-event population (the Lilliput effect). Real losses are measured in species, not individuals, and the causes (volcanism, anoxia, glaciation, impact) acted unevenly. The run never lets the whole toy world die out.
What is real and what is a stand-in
- The body plans come from the fossil record: trilobite-grade arthropods and Anomalocaris-like predators (Cambrian), armoured jawless fishes (Ordovician-Devonian), Tiktaalik-like fin-limbs (Late Devonian), sail-backed early synapsids (Permian), shrew-like early mammaliaforms (Triassic onward). Their dates are scripted by the timeline; they are not evolved by the simulation.
- What the simulation evolves is the quantitative variation inside each era (size, speed, colour, limb length), plus the branching of lineages.
- One generation = 1 Myr here (slider). Real generation times are years, so real evolution takes 105-106 generations per Myr and happens far more slowly per generation; the toy time scale keeps changes visible.
- Predators and the 4 patches are abstractions. Genetics is additive and has no linkage, epistasis or pleiotropy. Generations do not overlap.
Independent numerical checks built in
1. Truncation selection: the simulated S is compared with the textbook value iσP from the normal distribution, and the measured R with h²S, over many replicates. 2. Gaussian selection: the simulated survivors' shift is compared with VP(θ - z̄)/(ω² + VP). 3. Multi-generation realised heritability vs the nominal value. All run in your browser with a seeded random generator.
Models and textures: generated in Blender 5.2 (Cycles-baked PBR, Draco GLB). Rendering: Three.js r160. Not a taxonomic reconstruction: creatures are stylised.