Natural selection simulation
A natural selection simulation shows how a population changes over generations when some individuals survive and breed better than others. In our Natural Selection Simulator, every creature has a colour, a speed and a size that its offspring inherit. Predators hunt by sight, food and climate take their toll, and the survivors breed, with the occasional mutation. Change the pressures and watch the population evolve to match.
It opens with mostly pale creatures on dark ground, with plenty of predators, so you can watch the population darken over a few generations, just as peppered moths did when soot darkened tree bark.
Natural Selection Simulator
Set selection pressures and watch a population evolve
How to use the natural selection simulator
- Under Selection pressures, set the Ground colour, the number of Predators, the Climate from hot to cold, the Food supply and the Carrying capacity, from 20 to 120 creatures.
- Under Heredity, set the Mutation chance, the Mutation size and the Starting colour.
- Press play under Run. Each generation lives for a few seconds, then the survivors breed.
- Watch the readouts for the generation and the mean colour, speed and size, and the charts of each trait over the generations.
- After a generation has bred, read the working: survival, the selection differential on colour, the response, and relative fitness.
You can change any pressure while it runs. Practice and help sets questions on the type of selection, the breeder's equation and allele frequencies, with worked solutions.
What drives selection in the simulator
Each pressure favours certain values of a trait, following rules you can predict:
| Pressure | Favours | Why |
|---|---|---|
| Predators, on dark ground | Darker colour | Predators hunt by sight and pick the creature that stands out most |
| Predators, any ground | Higher speed | Fast creatures are caught less often |
| Cold climate | Bigger size | A bigger body loses heat more slowly (Bergmann's rule) |
| Hot climate | Smaller size | A smaller body sheds heat more easily |
| Scarce food | Smaller, slower creatures | Speed and size both cost energy |
Pressures can pull against each other. With predators about and food scarce, speed helps a creature escape but costs it food, so the population settles on a balance. Offspring get roughly their parents' average for each trait, plus a little random variation, and sometimes a mutation, so variation is always there for selection to act on.
Experiments to try
Directional selection: the peppered moth
Leave the ground dark (80%) and the starting colour pale (20%). A pale creature on dark ground is about 8 times as visible as a well-matched one in the simulator's model, so pale creatures are caught first. Over the generations the mean colour climbs towards the ground colour. Now drag the ground colour to pale: the selection reverses and the population lightens again.
No predators, no selection on colour
Set Predators to 0. Colour no longer affects survival, so it stops changing in any one direction and only wanders by chance from one generation to the next. That wandering is genetic drift, and it is stronger in a small population: lower the carrying capacity to 20 to see more of it.
Climate and body size
Set the climate to cold and watch the mean size rise; set it to hot and it falls. Speed and size both cost food, so with scarce food the population gets smaller and slower too.
Mutation
Set the mutation chance to 0 and start everyone pale on dark ground. Selection can only work with the variation the population already has. Turn mutation back up and new variation keeps appearing for selection to act on.
Check your understanding:
The maths of selection
After each generation breeds, the simulator works out these from the creatures' colours:
| Quantity | Formula | Meaning |
|---|---|---|
| Selection differential | S = mean of survivors − mean of everyone | How strongly survival favoured a trait value |
| Response to selection | R = h²S | How far the next generation's mean moves |
| Relative fitness | w = survival ÷ best survival | How well a group did against the best group |
| Selection coefficient | s = 1 − w | How strongly a group is selected against |
Example 1: the breeder's equation
A generation has a mean colour of 0.50 and its survivors a mean of 0.62, so S = 0.12. If colour has a heritability h² of 0.4, the next generation's mean should move by R = 0.4 × 0.12 = 0.048, to 0.548. Only the heritable part of the difference is passed on.
Example 2: relative fitness
If 60% of the best-matched creatures survive and only 30% of the worst-matched, the worst-matched group's relative fitness is w = 0.30 ÷ 0.60 = 0.5, and its selection coefficient is s = 1 − 0.5 = 0.5.
Example 3: selection against a recessive allele
The practice questions also use allele frequencies. If the homozygous recessive aa has a selection coefficient s = 0.4 and the recessive allele has frequency q = 0.5, then in the next generation:
The allele becomes rarer, but slowly, because most copies hide in heterozygotes, which are not selected against. Our Hardy-Weinberg calculator guide covers allele frequencies when there is no selection.
What the simulator does not show
- Traits, not genes. Colour, speed and size are each controlled by many genes, so offspring get a blend of their parents. There are no dominant and recessive alleles to follow.
- One species, no new species. It does not split a population into two species.
- Not an evolving-creatures game. The creatures do not learn or evolve new body plans; three traits change under selection.
Common mistakes
- Thinking individuals evolve. A creature keeps its colour for life. The population changes because survivors pass their traits on.
- Thinking mutations happen because they are needed. Mutations are random. Selection then keeps the useful ones.
- Calling it survival of the strongest. Fitness means surviving and breeding in this environment: here, a well-camouflaged creature is fittest, not a big one.
- Forgetting heritability. Selection only changes the next generation for traits that are inherited.
Practise evolution in a short timed paper
Natural selection comes up in High School Biology and AP Biology practice, and in GCSE Biology Higher and A-level Biology: Year 2 in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. The Genetics and DNA course covers alleles and inheritance.
Common questions
What is natural selection?
Is this an evolution simulator?
What are the three types of selection?
What is a selection pressure?
What is the breeder's equation?
How did the peppered moth show natural selection?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Natural Selection Simulator
Set selection pressures and watch a population evolve
Open the tool - Test it
High School Biology
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper - Test it
AP Biology
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper