Hacking Your MindDraft · Dec 1, 2026

Chapter 2How evolution writes code

A writer with no author

The last chapter said your gauges were built by evolution. That's a strange sentence if you look at it. Evolution isn't a person. It has no hands, no plan, and no idea you exist. So how does it build anything?

The alien knows how it works because it knows what carbon gets up to on a planet like Earth. It links into long chains, the chains copy themselves, and the copies come out a little different each time. That's it. That's the whole recipe, and it built your crush, your temper, and the knot in your stomach before a test. Learn it now, because every prediction in this book runs on it.

Here's the whole recipe. It has three ingredients.

One: things vary. No two moths, wolves, or people are exactly alike. Some are a little faster, a little darker, a little more nervous.

Two: some of that variation gets passed down. Kids resemble their parents. The instructions for building a body are carried in genes, and parents hand copies of their genes to their offspring.

Three: some variants leave more offspring than others. Not every creature that's born survives, and not every survivor has young. Whatever helped the winners win is more common in the next generation.

That's it. Run those three things for a long time and you get eyes, wings, and fear of heights. Nobody has to be in charge.

Moths again

We left a moth circling a porch light. Here's a different moth with better luck.

In England two hundred years ago, peppered moths were pale and speckled. They spent the day resting on pale, lichen-covered tree bark, where birds had trouble seeing them. Once in a while a dark one was born. It stood out like a coffee stain on a white shirt, and a bird ate it.

Then came the factories. Coal smoke killed the lichen and coated the trees in soot. Now the pale moths were the ones that stood out, and the rare dark ones were hidden. Birds did the rest. Within about fifty years, nearly all the peppered moths around the city of Manchester were dark.

No moth decided to change. No moth changed at all. Each one was born pale or dark and stayed that way. What changed was which ones got eaten before they could breed.

Then England cleaned up its air, the lichen grew back, and the pale moths came back with it.

Notice all three ingredients. Moths varied in color. Color was inherited. And one color left more offspring than the other, depending on the trees. Scientists call the third ingredient natural selection. The environment does the selecting, by killing some and sparing others, with no opinion about any of it.

The only score that counts

You've heard "survival of the fittest." Most people hear "fittest" and picture the biggest, fastest, or toughest. That's wrong, and the mistake matters.

In biology, fitness means one thing: how many of your offspring survive to have offspring of their own. It's a head count of descendants. Nothing else is on the scoreboard.

A huge, healthy animal that lives to a ripe old age and leaves no young has a fitness of zero. A scrawny one that dies early but leaves six surviving young wins. Survival only matters to evolution because dead things can't reproduce. Staying alive is the qualifying round. Reproduction is what wins the game.

This is why staying alive was only half of what your ancestors had to do. It's also why so many of your loudest gauges have nothing to do with danger and everything to do with other people: who likes you, who's on your side, who you want, and who wants you.

No plan, no foresight

Evolution can't look ahead. It can only keep whatever worked a little better last generation. That has consequences.

It builds on what's already there. An engineer could start over with a clean sheet. Evolution never can. That's why you can choke to death on a grape. Your food pipe and your air pipe cross, because that's how the plumbing was laid out in a fish-like ancestor that didn't breathe air, and every generation since has had to work with it.

It settles for good enough. A gauge doesn't have to be perfect. It has to beat the alternatives that happened to exist.

It's always a step behind. Selection tunes a creature to the world its ancestors lived in, which may not be the world it's born into. Ask the moth at the porch light.

It never stopped. People sometimes talk as if human evolution finished in the Stone Age. It didn't. Most mammals lose the ability to digest milk once they're weaned, and so did most of our ancestors. Then some people started herding cattle, goats, and camels, only a few thousand years ago. Among herders, anyone who could keep digesting milk as an adult had a rich food source the others didn't. That ability spread fast, and it arose separately in Europe and in East Africa. Something people invented (in this case, keeping animals for their milk) changed which genes won. Remember that. It comes back later in a big way.

What actually gets copied

Here is the kind of puzzle that bothered Darwin and wasn't well understood until 100 years after he wrote On the Origin of Species.

A ground squirrel spots a coyote. It stands up and screams an alarm. The other squirrels dive for their holes. The one that screamed has just told the coyote exactly where it is, and squirrels that call really do get caught more often.

Huh? If evolution rewards whoever leaves the most offspring, how did selection build a squirrel that risks its neck for the neighbors? The quiet squirrel should win every time.

The old answer was "for the good of the species." You'll still hear that one. It's wrong. Selection can't see species. A squirrel that sacrificed itself for squirrels in general would be out-bred by selfish squirrels in a few generations.

The real answer came in the 1960s from a shy English biologist named William Hamilton. You don't pass on your body. Your body dies. What gets passed on is copies of your genes. And you aren't the only one carrying copies of your genes. Your relatives carry them too. A full brother or sister shares about half of the genes that vary from person to person. A cousin, about an eighth.

So a gene that makes you help your relatives can spread, because it is helping copies of itself that happen to be riding around in other bodies. There's an old joke among biologists: I would lay down my life for two brothers or eight cousins.

Now look at the squirrels again. A biologist named Paul Sherman spent years watching who actually calls. It's mostly the females. In that species, females stay near where they were born, surrounded by daughters, sisters, and nieces. Males wander off to live among strangers, and males mostly keep quiet. The squirrel isn't screaming for the species. She's screaming for her family.

Scientists call this kin selection. Here's the prediction it hands the alien: humans will have strong, automatic feelings about family. They'll sacrifice for a sister what they wouldn't for a stranger. A parent will run into a burning building. An insult to your mother will land differently than an insult to you. Every culture on Earth keeps track of who is related to whom, and cares a great deal.

It also means there has always been more than one way to get your genes into the future. An aunt or uncle who helps raise nieces and nephews is doing it. So is a grandmother. Humans have been raising kids as a team for a very long time, and people who never had children of their own have always been part of the team.

One caution before somebody gets the wrong idea. Nobody does math before hugging their brother. The squirrel doesn't know what a gene is. Selection built the feeling, and the feeling is all you ever notice. Love for your family is real love. Knowing where it came from doesn't make it fake, any more than knowing how your eye works makes the sunset fake.

The peacock problem

Darwin had a second headache, and he put it in a letter to a friend: "The sight of a feather in a peacock's tail, whenever I gaze at it, makes me sick!"

You can see why. A peacock's tail is a disaster for survival. It's heavy, it's expensive to grow, it's hard to fly with, and it's a neon sign for tigers. Natural selection should have gotten rid of it long ago.

This one Darwin figured out in his lifetime. His answer was that survival isn't the final round. Reproduction is. A male who survives very well, but never mates, leaves nothing. A male with a ridiculous tail who dies young, after fathering a dozen chicks, wins. If peahens prefer big peacock tails, big tails multiply, tigers or no tigers.

He called this sexual selection, and it comes in two kinds.

Fighting. Members of one sex compete with each other for mates. Male elephant seals weigh three or four times what females do, and they batter each other bloody on the beach. On a crowded beach, a handful of males do nearly all the mating, and most males do none. That's what built the size. Antlers, horns, and tusks mostly come from the same contest.

Choosing. Members of one sex pick, and the other sex evolves whatever the choosers like. That's the peacock. It's also the bowerbird, a plain-looking bird from Australia and New Guinea. The male builds a little structure out of sticks and decorates it with blue things: berries, feathers, bottle caps. Females tour the neighborhood and inspect the work. He doesn't live in it. Its only job is to impress her.

Notice who usually fights and who usually chooses. In most mammals and birds, males compete and females pick. There's a reason for that, there are species where it runs the other way, and the reason turns out to explain a lot about people. That's coming (see Eggs, Sperm, and Who Pays, Ch. 5).

For now, here's what the alien writes in its notebook. Humans are a species that reproduces sexually, so humans will have been shaped by both kinds of sexual selection. They will care, a lot, about how they look to possible mates. They will compete with rivals, sometimes in ways that put them in danger. They will show off. And they will have strong opinions about who is and isn't attractive, opinions that feel like simple facts about the other person.

Some scientists go further and argue that humor, music, and art were shaped partly as displays, like the bowerbird's bower. Others think that's a stretch. It's a live argument, and we'll come back to it.

A good story is not good enough

You now know enough to be dangerous. Anybody can look at a human habit and invent a story about why cavemen needed it. People do this at parties. Scientists call these just-so stories, and a notion that relies on them deserves to be laughed at.

The cure is to be stricter, not to give up. A real explanation has to do two things a just-so story doesn't.

It has to point to design. You already have the clue: complicated machinery, many parts, all working together to do one job well. One odd habit isn't design. An eye is.

It has to make a prediction that could turn out wrong. Then somebody has to go check.

Here's an example of it done right. Many women get sick to their stomachs early in pregnancy. For a long time doctors treated it as a glitch. In the 1990s a biologist named Margie Profet proposed that it was designed: a gauge that protects the baby from toxins in food during the weeks its organs are forming, when a small dose of the wrong thing can do the most damage.

That's a good story, but it's not good enough on its own. What makes it science is what it predicts. If she's right, the sickness should peak during exactly those weeks and fade after. The foods that turn a pregnant woman's stomach should be the ones most likely to carry toxins or germs, like meat and bitter, strong-tasting plants, not bread or rice. And women who get sick should lose fewer pregnancies than women who don't.

Researchers checked all three against thousands of pregnancies. All three held up. Not every scientist is fully convinced, and that's fine. The point is that the idea stuck its neck out to be tested.

Keep that standard in your head for the rest of this book, and use it on me. When I tell you a feeling was designed, ask: where's the machinery, and what does that predict?

Four mistakes almost everybody makes

"Evolution wants..." It doesn't want anything. I'll say gauges were "built for" things because it's shorter. Every time, it means: ancestors who had this left more descendants than those who didn't.

"For the good of the species." Selection works on genes and the individuals carrying them. Nothing evolves to help its species.

"More evolved." Nothing alive today is more evolved than anything else. A bacterium has been evolving exactly as long as you have. Evolution isn't a ladder with us on top.

"We came from chimps." We didn't. Chimps are our cousins. We share an ancestor with them that lived several million years ago and was neither a chimp nor a human. That's the next chapter.

Try this

Pick one thing people do everywhere: dancing, gossip, being afraid of the dark, liking babies' faces. Invent a just-so story for why it evolved. Then do the hard part. Write down one thing your story predicts that you could actually check, and one result that would prove you wrong. If you can't think of either, you have a story and not an explanation.

The honest verdict: Evolution is a writer with no author, no plan, and one rule, which is that whatever leaves more copies gets kept. That one rule built your eyes, your fear, your loyalty to your family, and your interest in being wanted. Anyone who tells you why a feeling evolved owes you the evidence, including me.