Natural Selection Lab: Alleles Across Generations
Change genotype fitness and starting allele frequency to follow selection with random mating in an illustrative population.
Free, with no sign-up.
For High school students and adults reviewing the topic.
About 10 minutes.
How does it work?
- Change the controls or open a named preset. Read the outputs, then check a challenge.
What will you get?
Compare the model’s outputs and check two challenges.
What does the model assume?
- This deterministic model follows alleles A and a in a large diploid population with random mating, no mutation, no migration, and no genetic drift.
- Each cycle starts with offspring frequencies p², 2p(1 − p), and (1 − p)². Selection weights these by the relative fitnesses of AA, Aa, and aa, then normalizes surviving contributions.
- The next allele frequency is [p²wAA + p(1 − p)wAa] divided by the mean fitness. Random mating forms the next generation from this frequency.
- Final genotype outputs describe offspring before selection. Fitness is relative reproductive contribution, not a measure of strength or moral value. Fitnesses stay constant.
- At least one present genotype must have positive fitness. Otherwise no population reproduces and the controls produce no result.
- The crossing output is the first generation strictly above the selected frequency, including generation zero. If it is not reached within the chosen interval, no generation is reported.
Which setup would you like to try?
What can you change?
Range: 0 to 1 .
Range: 0 to 2 .
Range: 0 to 2 .
Range: 0 to 2 .
Range: 1 to 100 .
Range: 0 to 1 .
What does the model predict?
| Quantity | Value | Unit |
|---|---|---|
| Final frequency of A | 0.9022 | |
| Final offspring frequency of AA | 0.8139 | |
| Final offspring frequency of Aa | 0.1765 | |
| Final offspring frequency of aa | 0.0096 | |
| First generation above the target | 3 |
A starts at 0.4 and ends at 0.9022 after 20 generations.
Solid line: allele frequency. Dashed line: frequency to exceed.
| Generation | Frequency of A |
|---|---|
| 0 | 0.4 |
| 1 | 0.487805 |
| 2 | 0.561452 |
| 3 | 0.621186 |
| 4 | 0.669201 |
| 5 | 0.707935 |
| 6 | 0.739475 |
| 7 | 0.765451 |
| 8 | 0.787102 |
| 9 | 0.805353 |
| 10 | 0.820904 |
| 11 | 0.834284 |
| 12 | 0.845899 |
| 13 | 0.856064 |
| 14 | 0.865024 |
| 15 | 0.872976 |
| 16 | 0.880076 |
| 17 | 0.886451 |
| 18 | 0.892203 |
| 19 | 0.897417 |
| 20 | 0.902164 |
Can you reach these targets?
Start A at 0.40. Set each genotype’s relative fitness to 1 so its frequency stays 0.40 for 20 generations.
- Target: Starting frequency of A = 0.4 ; tolerance 0 .
- Target: Relative fitness of AA = 1 ; tolerance 0 .
- Target: Relative fitness of Aa = 1 ; tolerance 0 .
- Target: Relative fitness of aa = 1 ; tolerance 0 .
- Target: Generations = 20 ; tolerance 0 .
- Target: Final frequency of A = 0.4 ; tolerance 0.000001 .
Start A at 0.50. With fitnesses 1 for AA and Aa, remove the reproductive contribution of aa. Find A’s frequency after one generation.
- Target: Starting frequency of A = 0.5 ; tolerance 0 .
- Target: Relative fitness of AA = 1 ; tolerance 0 .
- Target: Relative fitness of Aa = 1 ; tolerance 0 .
- Target: Relative fitness of aa = 0 ; tolerance 0 .
- Target: Generations = 1 ; tolerance 0 .
- Target: Final frequency of A = 0.6666666666666666 ; tolerance 0.000001 .