Home▸Genetics & Evolution▸Allele-Frequency Dynamics: Selection, Dominance & Drift (2D)

Allele-Frequency Dynamics: Selection, Dominance & Drift (2D)

2D population-genetics lab: real discrete-generation selection recursion on a two-allele locus with adjustable selection coefficient, dominance and finite-population genetic drift, plotting allele frequency and Hardy-Weinberg genotype ratios over generations.

Genetics & Evolution2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-evolutionary-biology-biology ↗ Open standalone

This 2D companion replaces the 3D version's animated fitness-landscape population with the actual mathematics underneath it: a single two-allele locus evolved generation by generation under the real discrete-generation selection recursion p' = (p²w_AA + pq·w_Aa)/w̄, with independently adjustable selection coefficient s and dominance h so you can drive directional selection, recessive sweeps, stable heterozygote-advantage equilibria and unstable underdominance thresholds — the textbook population-genetics regimes — and an optional Wright–Fisher binomial-sampling step each generation that shows genetic drift overpowering weak selection in small populations.

⚙ Under the hood

2D population-genetics lab with the real discrete-generation selection recursion, adjustable selection coefficient, dominance and population size, and optional Wright-Fisher genetic drift, plotting allele frequency and Hardy-Weinberg genotype ratios over generations.

population geneticsallele frequencynatural selectionhardy-weinberggenetic driftheterozygote advantage

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)