HomeMolecular BiologyAdaptive Landscape & de Finetti Diagram — 2D Heterozygote Advantage

Adaptive Landscape & de Finetti Diagram — 2D Heterozygote Advantage

Interactive 2D companion to the Wright-Fisher heterozygote-advantage sim: watch mean population fitness as a rolling-ball landscape, track genotype frequencies on a de Finetti triangle against the Hardy-Weinberg parabola, and compare a stochastic q(t) trajectory to the deterministic curve and equilibrium.

Molecular Biology2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-population-genetics-biology ↗ Open standalone

This 2D companion to the Balancing Selection 3D sim swaps the population-as-spheres rendering for the two visualizations population geneticists actually reach for when reasoning about overdominance. A rolling-ball adaptive landscape shows mean population fitness w̄ as an exact analytic function of allele frequency, peaking precisely at the equilibrium q* = s₁/(s₁+s₂) — selection is literally a ball rolling uphill on this curve. A de Finetti triangle plots the population's genotype frequencies directly in barycentric coordinates against the Hardy-Weinberg parabola, so genetic drift is visible as scatter of the population's point away from that curve rather than as noisy individual sprites. A third panel runs 20 independent replicate populations forward under the same discrete Wright-Fisher recursion (selection then finite-population binomial sampling) to show, numerically, how much a small population's trajectory can wander from the deterministic no-drift curve before both settle near the same equilibrium.

⚙ Under the hood

A 2D companion to the Wright-Fisher heterozygote-advantage sim: mean fitness rendered as a rolling-ball adaptive landscape that peaks exactly at the analytic equilibrium q*, a de Finetti triangle plotting real sampled genotype frequencies against the Hardy-Weinberg parabola, and a q(t) chart comparing the stochastic trajectory to the deterministic curve and a 20-population drift-spread band.

population geneticsnatural selectionheterozygote advantagegenetic driftWright-Fisher modelallele frequencyadaptive landscapede Finetti diagram

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

What did you find?

Add reproduction steps (optional)