Interactive tool

Allele Divergence Explorer (Phylogeny Foundations)

Phylogenetic trees summarize millions of years of divergence, but the engine of that divergence is allele-frequency change within populations. This panel models the mechanism directly: set starting allele frequencies and fitnesses for diverging populations and watch selection push their frequencies apart generation by generation. The growing genetic distance you create here is exactly what tree-building methods later detect as branch length - selection and drift supply the differences, phylogenies record them.

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 allele frequency p0 and fitness values, then run the simulation for many generations.

  2. Observe how the allele frequency trajectory diverges from its starting point over time.

  3. Change the fitness values to model a population under stronger versus weaker selection and compare the trajectories.

  4. Connect the result to phylogenies: sustained divergence like this, accumulated over long timescales, is what tree branches summarize.

What you will learn

  • Explain that allele-frequency divergence within populations underlies phylogenetic divergence.
  • Describe how directional selection increases genetic distance between populations.
  • Distinguish the mechanism of divergence (selection/drift) from its summary (a tree).
  • Interpret what long versus short phylogenetic branches imply about accumulated change.