Part I · Chapter 3

Selection in Action

Time to run the whole engine. Breed a population of small creatures under a hungry predator and a climate you control, change their world in the middle of a run, and watch their traits shift generation by generation, with no instruction anywhere in the code to "adapt".

Before the middle of the 1800s, British collectors knew the peppered moth as a pale insect speckled with black, a good match for the lichen-covered bark where it rests by day. Then coal smoke blackened the trees around industrial cities and killed off many of the pale lichens. A dark form of the moth, first recorded in the mid-1800s, became more and more common in those areas, until it made up the large majority of peppered moths there. In the second half of the twentieth century, after clean-air laws, the bark grew lighter again, and the dark form declined.

The story is famous because it shows the three ingredients of Chapter 1 working in a human lifetime, and because people checked it carefully. In the 1950s Bernard Kettlewell released marked moths of both forms into a polluted wood and a clean one, and recaptured more of whichever form matched the local trees. Later biologists criticised parts of his method: moths were released in large numbers and placed on trunks by hand, which may not be where they would choose to settle. So Michael Majerus ran a large experiment over several years in which moths picked their own resting places, and he recorded what birds ate. His results, published after his death, supported the conclusion that bird predation was a major reason for the rise and fall of the dark form. In 2016 geneticists traced the dark colour to a single mutation: a stretch of "jumping" DNA inserted into a gene called cortex.

Below you can build a world like that and run it yourself.

The Breeding Ground

Each creature carries three inherited traits: its shade (pale to dark), its body size and the length of its antennae. Every generation, three things happen, and nothing else:

  1. A predator hunts by sight. The more a creature's shade differs from the ground, the more likely it is to be caught. Even a perfect match has a small chance of bad luck.
  2. The climate takes its toll. In this world we set one rule: big bodies keep heat better in the cold, small bodies shed it better in the heat. (That is a real physical tendency: as an animal gets bigger, its volume, which makes heat, grows faster than its skin, which loses it.) The further a creature's size is from the best size for the current temperature, the more likely it is to die.
  3. The survivors breed. Each newborn takes each trait from one of two random surviving parents, and each trait may mutate by a small random step, up or down with equal chance. The survivors together can raise at most three young each on average (a toy number), so a population hit hard takes a few generations to recover.

Antennae do nothing at all in this world. No rule mentions them. Keep an eye on them anyway.

Interactive 3.1The Breeding Ground
Let it run, then drag the ground or temperature mid-run
 
what the environment favours now population average caught or killed this generation newborn with a fresh mutation in the shown trait population size
The shade average climbs toward the ground because pale creatures on dark ground are caught more often; nothing tells it where to go. The well-matched creatures are hard to see on the field, which is exactly why they survive. Watch the mutation counter in the readout: new mutations go up and down in roughly equal numbers all run long. The direction comes from who survives, not from the mutations.

Things to try

The engine in one line

Mutation proposes changes in every direction; the environment decides which proposals get passed on. The push toward a better fit comes entirely from the second step.

Selection can only sort what is there

Notice how much depends on variation. When the population is spread across many shades, selection has plenty to choose from and the average moves quickly. When everyone is nearly alike, the predator catches almost at random among them and the average barely moves, however poorly the population fits. Selection does not invent the fitting creature; it can only change the proportions of creatures that already exist.

That is why the supply of new mutations matters, and why a sudden, drastic change can be fatal. If the world shifts further than the existing variation reaches, the population shrinks generation after generation. Either a lucky few close enough to the new optimum carry it through and it bounces back, which biologists call evolutionary rescue, or it dies out. Real species face exactly this race when their habitats change quickly.

Good now, bad later

Run the experiment with the ground flipped and look at it from the creatures' side. The dark shade that was the best thing to have, generations ago, is now the worst. Nothing about the dark creatures changed. The world did. A trait is only "better" relative to a particular place and time, and the process cannot look ahead to prepare for the next change. Chapter 4 makes this the centre of what "fitness" means.

Common misconception

"The creatures adapted because they needed to." In the simulation nobody needed, wanted or tried anything. Mutation did not lean toward the ground colour; you can see that in the up-and-down counts. Each generation, the ones that happened to fit slightly better left slightly more young. "Adaptation" is the name for the result, not a force that aims at it.

One generation, slowed down

The Breeding Ground moves fast. Here is a single generation with twelve creatures, one step at a time, so you can see each of the three rules do its job.

Interactive 3.2One Generation, Slowed Down
Press Next step to walk through a generation; keep going for more
 
Step 2 is chancy: pale creatures are much more likely to be caught, but sometimes a dark one is unlucky and a pale one escapes. Step 3 adds mutations marked + (a little darker) or − (a little paler), in both directions. More often than not the average shifts a little toward the ground, but fairly often it slips back. Over many generations, the small consistent bias wins.
Intuition check

Try a prediction. In the Breeding Ground, let the population match the dark ground, then set Mutation rate to 0% and let it run another hundred generations. Now drag the ground to pale. What happens?

Intuition check

In the Breeding Ground, no rule mentions antennae. Why does their average length wander up and down anyway?

What you now see

  • With variation, inheritance and differential survival in place, a population's traits track its environment, with no goal written anywhere.
  • In this world mutations go up and down equally often. In real organisms they need not be balanced, but they do not lean towards what would help. The direction of adaptive change comes from selection.
  • Selection only sorts the variation that exists. Too little variation, or too sudden a change, and the population stalls or dies out.
  • "Better" is relative to the current world: flip the environment and yesterday's winners lose.
  • Traits that nothing selects still wander by chance.