Simulation lab

Peppered Moth Industrial Melanism Lab

In industrial England, the peppered moth (Biston betularia) existed in two forms: the pale, speckled typica form that camouflaged perfectly against lichen-covered birch bark, and the rare dark carbonaria form. As factory soot blackened the trees, birds could suddenly spot pale moths easily while dark moths vanished against the grime. In this lab, allele A represents the melanism allele. Set its starting frequency low, give dark genotypes high fitness on soot-darkened bark, and watch industrial melanism unfold generation by generation.

Natural Selection Simulator

Watch allele frequencies change under selection, generation by generation.

Fitness = relative reproductive success (1.0 = baseline). Try w_aa = 0 to model a lethal recessive allele.

-0.060.160.390.610.841.10.0012.024.036.048.060.0GenerationAllele frequency
p (allele A)q (allele a) (dashed)
Final p: 0.9987Final q: 0.0013No fixation within 60 generations
Generation-by-generation table
Genpqw̄ (mean fitness)
00.10000.9000—
60.43810.56190.7954
120.73800.26200.9226
180.87590.12410.9681
240.93830.06170.9852
300.96830.03170.9927
360.98350.01650.9963
420.99130.00870.9980
480.99540.00460.9990
540.99760.00240.9995
600.99870.00130.9997
The model (simplified educational model)

Each generation: p′ = (p²·wAA + pq·wAa) / w̄, where w̄ = p²·wAA + 2pq·wAa + q²·waais mean fitness. This is a deterministic model — it ignores genetic drift, mutation and migration, so real small populations will bounce around these curves.

How to use it

  1. Set the starting frequency of A (p0) to 0.05: the dark allele is rare before industrialization.

  2. Model soot-darkened bark with wAA = 1.0, wAa = 1.0, waa = 0.6 (melanism is dominant, so carriers survive better) and 150 generations.

  3. Watch the p (allele A) curve climb, and note the generation at which the readout reports fixation.

  4. Now model the clean-air era: set wAA = 0.8, wAa = 0.8, waa = 1.0 and watch the dark allele decline as pale moths are favored again.

  5. Open the generation-by-generation table and find how the mean fitness (w-bar) rises as the population adapts to each environment.

About this model

This panel treats melanism as a single diallelic locus with constant fitnesses, which simplifies the real genetics of carbonaria. It ignores genetic drift, mutation and migration, and summarizes the whole bird-predation process into three fitness numbers. Real predation is frequency-dependent in ways this model cannot show: birds form search images, so a rare morph may gain extra protection that constant fitness values miss.

What you will learn

  • Explain how differential survival by camouflage changes allele frequencies over generations.
  • Translate a real predation pressure into relative fitness coefficients wAA, wAa and waa.
  • Explain why the melanic allele spread during industrialization and declined after clean-air laws.
  • Interpret the fixation readout and the mean-fitness column as evidence of adaptation.