Some moths blend into the bark and some don't β and that tiny difference decides who grows up to have babies. Run it over generations, and a whole population quietly changes colour.
Start hereLiving things with traits that help them survive tend to have more babies β so those helpful traits get more common with every generation. That slow, patient sorting is natural selection, and it's the engine behind evolution.
A trait is just a feature a living thing has β its colour, its speed, the shape of its beak. Some traits make it a little easier to stay alive and raise young in a particular place. Those traits ride along into the next generation, because the creatures carrying them are the ones that lived long enough to pass them on. Nobody is steering. There's no plan and no goal β only the same gentle nudge happening over and over, until a whole population looks different from how it began. The rest of this page is one long, close-up look at that nudge in action.
Pick any group of living things β moths on a tree, kids in your class, puppies in one litter β and look closely. They belong to the same kind, the same species (one group whose members can have young together), but they are not identical copies. Some are taller, some faster, some a shade darker. This everyday range of small differences inside one group is called variation, and it's the raw material everything on this page is built from. Without variation there'd be nothing to choose between, and natural selection would have nothing to work with.
Most variation comes from genes β the set of instructions a living thing inherits from its parents β shuffled into a slightly new mix each time a baby is born. That's why you might have your mum's eyes but not her nose. For our moths, the difference that matters is simple: some hatch out pale and speckled, and some hatch out dark. Same moth, same species, just a different shade β decided the moment they're born.
Here's the part to hold onto, because the whole page leans on it: a moth doesn't get to pick. It can't study the tree, decide that dark looks safer today, and change to match. It is born one colour and stays that colour for its entire life. The only thing that can change is which colours are common in the crowd β and that's exactly the change we're about to watch happen.
Natural selection isn't one dramatic event β it's a loop that turns quietly, generation after generation, in the same four beats. Tap Next beat to step through one turn of the loop on a sooty tree.
That's the whole machine. Variation gives you a range to choose from; survival does the choosing, because the better-hidden moths are a little more likely to live; the survivors reproduce and hand their colour to their babies; and so the helpful trait spreads until it's almost everywhere. Run that loop enough times and a population can end up looking completely different from how it started β not because anyone planned it, but because the same quiet sorting happened over and over and over.
If natural selection had a mascot, it would be the peppered moth β a real insect from Britain that scientists have watched for generations, and the example your IB teacher will almost certainly reach for. By day it rests on tree trunks, holding very still, trying not to become a bird's breakfast. Its only defence is camouflage: blending into the background so well that a hungry bird's eye slides right past it.
The moth comes in two main shades. The pale, speckled form looks like it was dusted with salt and pepper β perfect for hiding on a clean, light tree trunk freckled with grey lichen (a crusty, pale growth that coats healthy bark). The dark form is almost sooty black β which, on a pale trunk, sticks out like a smudge of ink on a white page.
For a long time, the pale moths had it easy. Most trees were light, so pale moths blended in while dark ones were quickly spotted and eaten β and the population stayed mostly pale. Then came the Industrial Revolution. Factories burned coal and poured smoke into the air, and soot settled over the towns. It darkened the tree trunks and killed off the pale lichen, leaving the bark sooty and black. Suddenly the game flipped: now it was the dark moths who blended in and the pale ones who stood out. Over many generations, in the smokiest areas, dark moths went from rare to common. Later, when cleaner-air laws cut the pollution and the bark lightened again, the pale moths made a comeback. The moths themselves never changed colour β the mix did, twice, each time following the bark.
Here's a tree trunk dotted with peppered moths β half pale, half dark. Drag the slider to set how sooty the bark is. Then press Run a generation: a bird hunts the trunk, the easiest-to-spot moths are caught, the survivors have babies, and a new generation takes their place. Watch the bar β keep clicking, and one colour will pull ahead.
Try the extremes. Slide the bark all the way to sooty and run a handful of generations: the pale moths keep getting picked off, the dark ones keep surviving and having dark babies, and the dark slice of the bar climbs until it nearly fills it. Now hit reset, slide the bark to clean, and run it again β this time the pale moths take over. Same moths, same rules; only the background changed.
Now notice what the slider does not do. When you drag the bark from pale to sooty, the moths already on the trunk don't change colour β a pale moth stays pale. All the slider changes is who the bird can spot easily. The colour shift only happens when generations pass and new moths replace the old. That gap β between a single moth never changing and the whole population changing a lot β is the most important idea in this entire topic.
There is no permanently best moth. On pale bark, pale wins; on sooty bark, dark wins. Change the environment, and you change which trait is the helpful one.
This is one of the most surprising things about natural selection: it has no fixed goal. It isn't trying to make moths darker, or better, or more advanced β it just rewards whatever happens to fit right now. A trait that's a lifesaver in one place can be a disaster in another. Dark wings are brilliant on a sooty trunk and terrible on a pale one. The bird doesn't care what colour you are; it only cares whether it can see you.
It also means selection can run in reverse. When the air cleaned up and the bark lightened again, the very same pressure that had pushed the moths dark now pushed them back toward pale. Nothing about the moths' "aim" changed β the world simply shifted underneath them, and the population followed. Living things are forever being re-sorted to fit a moving target, which is why we say a species is adapted to its environment: shaped, over many generations, to fit the place it actually lives.
This is the trap almost everyone falls into, and it's worth slowing down for, because getting it right is the whole difference between understanding evolution and just half-remembering it. It feels natural to imagine the moths noticing the sooty trees and deciding to darken β the way you'd grab a darker jacket to blend into a night-time crowd. But that is not what happens, and it can't be.
Each moth notices the new dark bark and turns darker during its own life so it can hide better.
Every moth keeps its colour for life. Dark ones simply survive more on dark bark, so each new generation holds a few more of them.
Picture a giant jar of marbles, half white and half black, and a hand that reaches in and is just a little more likely to pull out β and remove β the white ones. No marble ever changes colour. But scoop after scoop, the jar drifts darker, simply because the white ones keep leaving. The moths work exactly like that jar. The bird's eye is the hand; surviving and having babies is what keeps a colour in the jar. The population shifts; no individual ever does.
This mix-up even has a history in science. The wrong idea β that a creature reshapes itself during its life to suit its surroundings and then passes that change on β was an early guess that turned out not to fit the evidence. The right idea β that variation is already there, and the environment quietly selects which versions get to carry on β is natural selection, first explained by Charles Darwin. The whole difference is where the change lives: not inside one moth's lifetime, but across the whole crowd, over many lifetimes.
The peppered moth is just the clearest window onto a process running all around you, all the time. The cast changes, but the four beats are always the same: there's variation, something makes survival a little harder for one version, the survivors breed, and the helpful trait spreads. Here are a few more places the same loop is quietly turning.
If predators tend to catch the slowest in a herd, the speediest are the ones that survive and have young β so, generation by generation, the prey get faster, and their hunters are pushed to keep up.
Animals that blend into their surroundings get spotted less, so good camouflage is rewarded again and again β which is why so many creatures end up the exact colours and patterns of the places they live.
When the easiest food to reach suits a certain shape of beak, the birds with that shape feed better and raise more chicks β and the population's beaks slowly drift toward the shape that works.
Hit a swarm of tiny living things with something that kills most of them, and the rare few that happen to survive are the ones that breed β so the next batch is harder to kill. It's natural selection, sped up.
That last one is why this is more than a nature-documentary curiosity. The same process that paints moths to match bark is what makes some germs harder to treat and some pests harder to control β natural selection working on a timescale short enough to matter to us. Understanding the loop is the first step to staying one move ahead of it.
Three quick ones. Tap an answer β you'll find out why straight away, so a wrong guess just teaches you something.
A clean, pale forest slowly gets covered in soot until the bark is sooty and dark. After many generations, the moth population becomes mostlyβ¦
On the sooty bark, how does an individual pale moth survive the day?
Why did pale moths become common again once the air got cleaner?
In any crowd, individuals differ β some moths pale, some dark. Nobody chooses; they're born that way.
Whatever fits the surroundings survives and breeds more. On sooty bark the dark moths hide best, so dark wins.
Helpful traits get passed on, so they spread over generations. No single moth changes β the whole population does.