Uni-Sine
Biology
+25XP
BiologyEcology and evolution

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.

Try it

Natural Selection Simulator

Set selection pressures and watch a population evolve

Go to its page

How to use the natural selection simulator

  1. 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.
  2. Under Heredity, set the Mutation chance, the Mutation size and the Starting colour.
  3. Press play under Run. Each generation lives for a few seconds, then the survivors breed.
  4. Watch the readouts for the generation and the mean colour, speed and size, and the charts of each trait over the generations.
  5. 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:

PressureFavoursWhy
Predators, on dark groundDarker colourPredators hunt by sight and pick the creature that stands out most
Predators, any groundHigher speedFast creatures are caught less often
Cold climateBigger sizeA bigger body loses heat more slowly (Bergmann's rule)
Hot climateSmaller sizeA smaller body sheds heat more easily
Scarce foodSmaller, slower creaturesSpeed 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:

practice
Pick an answer, then check it.
In the simulator, the ground is dark and predators hunt by sight. What happens to the mean colour over many generations?

The maths of selection

After each generation breeds, the simulator works out these from the creatures' colours:

QuantityFormulaMeaning
Selection differentialS = mean of survivors − mean of everyoneHow strongly survival favoured a trait value
Response to selectionR = h²SHow far the next generation's mean moves
Relative fitnessw = survival ÷ best survivalHow well a group did against the best group
Selection coefficients = 1 − wHow 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:

q' = \frac{q(1 - sq)}{1 - sq^2} = \frac{0.5(1 - 0.2)}{1 - 0.1} = 0.444

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?
The process where individuals with traits better suited to their environment survive and reproduce more, so those inherited traits become more common over generations.
Is this an evolution simulator?
Yes, for evolution by natural selection: a population's colour, speed and size change over generations as predators, climate and food select among heritable variation.
What are the three types of selection?
Directional selection favours one extreme, stabilising selection favours the middle, and disruptive selection favours both extremes.
What is a selection pressure?
Anything in the environment that affects which individuals survive and breed, such as predators, climate, disease or food supply.
What is the breeder's equation?
R = h²S. The response to selection R equals the heritability h² times the selection differential S.
How did the peppered moth show natural selection?
When soot darkened tree bark, dark moths were eaten less by birds than pale ones, so dark moths became more common. The simulator shows the same effect with dark ground.

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
Read next
Biology · Ecology and evolutionPopulation growth calculator: exponential and logisticWork out exponential and logistic population growth: N after a time, doubling time, growth rate and carrying capacity, with a simulation and examples.