The Fruit Fly Experiment
or, the summer my kids and I bred a faster fly without meaning to
Want to skip ahead to the tank? Jump to the experiment ↓
I want to tell you about an experiment I ran at home, with my kids, using tree frogs and a jar of wingless fruit flies. It was a science-fair-level affair — no funding, no real instruments, a few plastic containers on a shelf. We never even finished writing it up; life happened, the fair came and went, and the flies went back to being flies. But what we watched over those few weeks is the cleanest demonstration of natural selection I have ever had my hands on, and it taught me something the textbook version had never quite landed: you do not get to choose what creatures are selected for. The world chooses that. And it tends to choose something you might never have guessed and in part might even be thought of as probabilistic.
Here is the setup. You can buy fruit flies that cannot fly — a flightless strain, vestigial little wing-stubs, bred for exactly this kind of thing because they do not escape the moment you open the lid. Highly desirable when your lab is also your kitchen. Drop a few tree frogs in a tank with a population of them and you have a tiny, brutal little world: predators hunting, prey caught in the environment, and no exit. We split the flies into two lines. One line, the control, lived a quiet life and never met a frog. The other line, the experimental one, spent twenty-four hours in the tank with the frogs each generation. Whatever flies were still alive at the end of that day — the survivors — were gathered up and given time to breed. Their kids got the same twenty-four hours with the frogs about a week later. We ran the experiment for about six generations.
If you had asked me on day one what would happen, I might have guessed that the flies would get smaller over time compared to the control group, since they would have been harder for the frogs to find and eat. Or maybe they would figure out how to blend in or hide somehow. But I really had no idea what, if anything, we would or even could observe. The point of the experiment was to just "let's see what happens when..." and the kids were the scientific observers.
Two things happened, one expected-in-hindsight and one that was a legitimate surprise.
The first observation: the experimental flies got bigger. Visibly so — by the later generations you could tell the two lines apart by eye, the frog-tank survivors noticeably heftier than their sheltered cousins. I have to be honest about the limits here: we had no scale fine enough to weigh a fruit fly. We looked for one, but it would have been too expensive for a science fair project. That being said, the size difference was real enough to see in side-by-side photos, but it was observed, not measured. Call it what it is — a strong impression, not a number. (More on why bigger flies showed up at all in a moment, because we did not select for size either, though perhaps the frogs did for some reason.)
The bigger surprise — the actual finding, the thing the kids could see and count — was about climbing. Here is the behavior: tap the container sharply on the table and every fly drops to the bottom of the container. Then they climb. Up the smooth plastic walls, away from the food on the floor — it is a deep, ancient reflex flies have, climbing away from down, and biologists have a name for it, negative geotaxis. We started timing how fast the flies climbed the walls after a tap, counting them off video frame by frame. And generation over generation, the experimental flies got faster at it. By generation six the survivors climbed the walls roughly twice as fast as where we started — a difference so large that my six- and seven-year-olds could call it from across the room. The control line, meanwhile, climbed at the same lazy pace it always had. No frogs, no change.
Sit with how strange that is for a second. We did not breed for climbing. Nobody in that kitchen ever looked at a fly and thought ooh, good climber, you get to reproduce. We did exactly one thing: we let the frogs eat whoever they ate, and we bred the rest. The frogs did the choosing. And it turned out that in a tank with a couple of tree frogs and no wings, the thing that kept you alive was getting up the wall and away from the floor faster than the fly next to you. Climbing speed was "fitness". The environment had written a fitness function none of us would have put on a menu, and selection found it anyway — with no foresight, no plan, and no idea it was doing anything at all.
So why did the flies get bigger, if all the frogs cared about was climbing? This is the part I love, because it is a second lesson hiding inside the first. Traits are not stored in tidy, separate boxes. The genes that make a fly a vigorous climber overlap with the genes that make a fly large and well-built; pull hard on one and the other comes dragging along, like lifting one link of a chain and finding the next link rises with it. Geneticists call this a correlated response — you select for A, and B changes too, for free, because A and B were never fully independent to begin with.
The most famous case is Dmitri Belyaev's silver foxes, in Siberia. Starting in 1959 his team bred foxes for one thing only: tameness — would the animal tolerate a human hand. Nothing else. And within a few decades the tame line started turning up with floppy ears, curly tails, piebald white-patched coats, shorter snouts, even dog-like barks — a whole costume of changes nobody had selected for, riding along on the genes for a calmer temperament. (Recent researchers argue the famous "domestication syndrome" framing is messier than the tidy version — the founder foxes were already farm-raised, not truly wild — so hold the details loosely; the core correlated-response phenomenon is solid and old.) Alas, in one way the experiment was a failure as fox fur was the whole point of raising foxes back then. Little did they know the descendants of the little devils would someday sell for thousands of dollars as fixed pets. Our flies were a humble and faster version of the same thing: we leaned on climbing, and size came along for the ride. We just happened to be watching the side effect as closely as the main event.
And lest you think this only works on a kitchen counter: the formal version is one of the classic experiments in behavior genetics. Starting around 1960, Jerry Hirsch and Leonore Erlenmeyer-Kimling took ordinary fruit flies and selected them, generation after generation, purely on which way they turned in a maze — up against gravity or down with it. The lines split cleanly: a "high" line that climbed and a "low" line that sank, a heritable behavior pulled apart by nothing but who got to breed — and, in the careful write-ups, correlated responses in other traits tagging along, exactly as the chain-link idea predicts. My kids and I had stumbled into a sixty-year-old result with frogs and a phone camera. Of course, we didn't know any of this until Claude pointed it out in writing this up.
The Experiment
Below is the tank, rebuilt so you can run it yourself — the part I could not hand my kids, which is the ability to do it over and watch the curve form. On the left is the experimental tank: tap it and the flies drop, then they climb, and the frog takes the ones still low on the wall when the day ends. Survivors breed; their kids face the frog. On the right, the part we could only squint at in real life: the population’s average climbing speed, size, and strength plotted generation by generation, with a faint control line for comparison.
Before you press play, do the thing I got wrong. Place a bet: which of the three traits will the frog drive up? It opens paused — press the play triangle in the middle of the tank (or Begin below it) and watch the generations tick by. Click the tank again to pause.
Things to try:
Just press Begin and watch all six generations. The amber climbing line climbs and keeps climbing — about double by generation six, the real result. Now look at the grey strength line: it barely moves. The frog never “sees” strength, so selection has no grip on it. The winner was the trait tied to staying off the floor.
Place a bet on Size or Strength first, then run it. You will lose — and that is the whole point. Climbing wins no matter what you guessed, because the tank, not you, decides what counts.
Watch the green size line. It rises too — not as steeply as climbing, but unmistakably. Nobody selected for size. It rode up the chain alongside climbing, a correlated response, the same way tameness dragged floppy ears into Belyaev’s foxes. Our real flies got visibly bigger for exactly this reason.
Turn off the control line, run it, then turn it back on and read where the dashed line sits: flat. Same flies, same six generations, no frog — and no direction. The control is the experiment’s honesty check. Without it, you could never tell selection from a lucky drift.
Crank the frog’s appetite to the top and run a fresh culture. The climbing line leaps up fast — and the taken counter shows the price: most of each generation eaten to move the average that far. Adaptation this quick is paid for in everything that did not climb fast enough to breed.
Pull variation down near its floor and run it. The climb still rises, but it stalls sooner and lower — the frog can only ever pick from the differences that already exist in the jar. Selection sorts variation; it cannot invent it. With nothing to choose between, even a hungry frog gets you nowhere.
The neat classroom examples — the peppered moth going dark, the finch beak getting deeper — can leave you with a tidy, slightly misleading picture, as if the environment poses a sensible question (what color is the tree? how hard is the seed?) and evolution returns the sensible answer. Our flies refused to be tidy. The “question” the tank asked was not a question any of us thought to write down. It was just a frog and a smooth wall and a day, and the answer that came back — climb faster — was a behavior, not a color or a size, the kind of thing you would never have predicted from a menu of plausible traits.
Another important thing to consider is that if we repeated the experiment, there is no guarantee of the same outcome. For one, the experiment was limited by the fact that we were working with the genes that were there to begin with. Six generations wasn't enough to play much with random mutation, plus you don't want radiation in your kitchen. We suspected that there was an upper speed limit these flies could attain given their genetic inheritance. We weren't going to breed little cheetahs, no matter how long we played at it without mutation.
This is the lesson I keep returning to, and it is bigger than flies and frogs. We have a deep habit of assuming that whatever a system is “trying” to optimize is something legible — something we could name in advance if we just thought hard enough. But selection does not optimize the trait you have in mind. It optimizes whatever happens to keep a thing reproducing in the actual world it is in, and that target is written by the environment, discovered after the fact through experience, and frequently sideways to anything you would have bet on. You can hand the same population to two different worlds and get two different creatures, neither of which you could have ordered off a catalog. The fox breeders wanted calm red foxes and got floppy ears. The honest move is to stop assuming you know the fitness function, and go look at who actually survived.
And because this site keeps its promise to itself: the same blind machinery that gave my kids a faster fly is not, in general, on anyone’s side. It is the same loop that breeds antibiotic resistance into the bacteria in a sick child, that hardens a pest against the spray meant to kill it, that turns a cancer into a population of cells selected to ignore the body they live in. The frog tank is charming because the stakes are a science fair. The mechanism underneath it has no stakes it cares about at all. It does not reward the good climber because climbing is good; it just removes the ones who climbed too slow, over and over, until only fast climbers are left. The universe permits that engine to run on flies, on microbes, on us. It does not promise you will like what it finds. What we point the engine at — and whether we point it at all — is the part it leaves to us.
As humanity, we are running a similar experiment. Take a bunch of apes evolved in the savannahs of Africa, add agriculture, writing, religion and government. Let societies compete for ten thousand years, and finally throw in some climate change, a bit of industrial revolution and artificial intelligence as the cherry on top. How will this memetic supersonic exponential tidal wave end up affecting humanity? What fitness function do we need to survive into the future? What attributes will we find useful as we travel into our unknown future? Will our ability to reproduce eventually require technological solutions in the face of a diverging chemical background of our own creation? Will that technology even be enough given the experiments we're conducting with our one and only commons? Or will we only exist as the mole people of Mars living deep underground to protect us from the mad radiation at the surface? We're all just flies and if we're lucky enough to not end up as part of the 99.9% of every species on earth, extinct, then maybe we'll know at that point what played the part of the frogs. The only way to see how it plays out is to play it out.
We never did get to the science fair. But I have told this story many times, because of the face the kids made when they accidentally noticed after about four generations that they were getting noticeably faster. The moment when a third grader understands, in her hands and not from a book, that nobody had to be in charge for the flies to change. That is the whole of it. Frogs, an aquarium, a day and a week to repopulate, repeated. The choosing happens whether or not anyone chooses.
- This is a personal account of a home (science-fair-level) experiment by one of the site’s authors, Kelly Anderson. The headline result — a roughly two-fold rise in wall-climbing speed over ~6 generations of frog predation — was counted off video; the correlated size increase was observed, not weighed. The simulation reproduces the shape of the result (climbing rises, size follows, strength and the unselected control stay flat); it is a teaching cartoon, not the original data.
- Hirsch, J. & Erlenmeyer-Kimling, L. — selection for geotaxis (climbing direction) in Drosophila melanogaster, beginning ~1960, splitting “high” (climb-up) and “low” (sink-down) lines from a single population. See “Selection for geotaxis in Drosophila melanogaster: heritability, degree of dominance, and correlated responses to selection,” Behavior Genetics (realized heritability ~0.13; correlated responses reported). PubMed 814890.
- Negative geotaxis / the Drosophila climbing assay — the standard “tap the vial, time the climb” locomotion test, in use for 60+ years. JoVE: Fly Climbing Assay; review of age-related climbing decline, Gargano et al., PMC2591094.
- Belyaev’s silver-fox experiment (Novosibirsk, from 1959): selection for tameness alone, with correlated changes — floppy ears, curled tails, piebald coats. Overview: Domesticated silver fox (Wikipedia); Dugatkin, Evolution: Education and Outreach (2018). The honest caveat that the “domestication syndrome” framing is contested: Lord et al., Trends in Ecology & Evolution (2020).
- Correlated response to selection (one trait dragging another) — a standard result in quantitative genetics; primer at Genetic correlation (Wikipedia).
- The companion page on natural selection without a selector: Survivors Reproduce; and the visible, intentional version a reader already believes: Unnatural Selection. To watch selection design something live in a minute, Bones That Want to Run.