Each of 240 organisms carries one continuous trait z (e.g. beak depth), drawn on the horizontal axis. A fitness landscape W(z) — the sum of one or two Gaussian resource peaks — assigns every individual a survival/reproduction weight. Parents are chosen by fitness-proportionate ("roulette wheel") selection, and each offspring's trait regresses toward the population mean by the heritability h², plus a mutation draw:
W(z) = exp(-(z-p₁)²/2σ²) + exp(-(z-p₂)²/2σ²)
offspring.z = z̄ + h²·(parent.z - z̄) + N(0, μ)
R (response) = h²·S, S = selection differential
That last line is the quantitative-genetics breeder's equation: the population's per-generation shift in mean trait (R) equals heritability times the selection differential (S) — how far the fitness-weighted mean sits from the raw population mean. When the two resource peaks sit close together, they merge into one optimum and the population is pulled toward it — stabilizing selection, low variance, one species. Pull the peaks apart and the valley between them becomes a fitness trough: individuals near z̄ do worse than those at either peak, variance rises, and the trait distribution splits into two persistent modes — disruptive selection driving sympatric speciation (the mechanism behind Darwin's finches' beak-size divergence, modelled after Dieckmann & Doebeli's evolutionary-branching theory).
- Peak separation — distance between the two resource optima; 0 = single peak (stabilizing), large = deep valley (disruptive, splits the population).
- Mutation rate — standard deviation of the random trait change each generation; the raw material selection acts on.
- Heritability h² — fraction of a parent's trait deviation passed to offspring; higher h² means selection's response (R = h²S) is faster and stronger.
- Species detected — counts distinct modes in the trait histogram (a valley between two peaks holding under 40% of the smaller peak's count counts as two species).