Epistasis: Gene Interaction Ratios (2D)

This 2D companion to the epistasis Punnett-square simulator keeps the same underlying genetics — a dihybrid cross, AaBb × AaBb, governed by Mendel's Law of Independent Assortment — but replaces the static 16-cell grid with a live physical simulation: a Galton board that drops one simulated offspring at a time. Each ball flips four genuine fair coins as it falls, one per parental gamete allele, and lands in one of 16 bins according to the genotype those coins produced. Switching the cross type recolors the 16 bins into the classic epistasis patterns — no epistasis (9:3:3:1), recessive epistasis (9:3:4), dominant epistasis (12:3:1), duplicate recessive/complementary gene action (9:7), duplicate dominant epistasis (15:1), dominant-and-recessive epistasis (13:3) and polymeric gene interaction (9:6:1) — without touching the physical sampling. Unlike the 3D model's exact enumeration, every ratio, χ² statistic and top-class probability shown here is measured live from real random sampling, so it fluctuates with small samples and settles down as more offspring are simulated, exactly like real breeding data.