Life's First Program

Evolution solved program synthesis long before DeepMind did. The algorithm is the same.

Program Synthesis · Biocomputing · Neuroscience · AI
The Blind Programmer: How a Four-Billion-Year-Old Algorithm Taught a Machine to Code
Before the first animal crawled out of the sea, life had already solved program synthesis. Every cell generates candidates, filters failures, and keeps what works. DeepMind's AlphaCode just rediscovered the oldest algorithm on Earth.
2026

In a pond outside Medford, Massachusetts, the cells are doing math. Not equations in any textbook sense, but computation at a scale that dwarfs anything happening in the server rooms a few buildings away at Tufts University. Each cell in a developing tadpole consults chemical and electrical signals from its neighbors, casts a vote about what it should become, fires off proposals for which way to migrate, and, if its guess turns out to be wrong, dies quietly while another cell takes its place.

Multiply this across hundreds of thousands of cells over a few hours of development and you get a swimming animal with two working eyes, a beating heart, and a spinal cord. Repeat across four billion years and you get every living thing that has ever existed on Earth. Michael Levin, who runs the Allen Discovery Center at Tufts, has spent his career trying to understand how this biological computation works. His collaborator Josh Bongard, a computer scientist at the University of Vermont, puts the result plainly: "Cells have 4.5 billion years of experience learning how to recover from unexpected things like damage." Together, Levin and Bongard grew clusters of frog skin cells into forms suggested by a computer algorithm, then watched those clusters swim, push debris into organized piles, and gather loose stem cells into copies of themselves. Nobody programmed any of it. "We didn't say 'make a xenobot that can recover from damage,'" Bongard said. "They just do."

What the swimming Xenobot, the developing tadpole, the immune system recognizing a never-before-seen pathogen, and the cortex of a child learning a new word all have in common is a single very old computational pattern. Throw an outrageous number of guesses at the world, then let some unforgiving filter decide which ones survive. Biologists call it variation and natural selection. Neuroscientists call it overproduction and pruning. Engineers, when they are paying attention, call it generate and test. Whatever the label, this is the only general-purpose algorithm that has demonstrably built minds, bodies, and entire ecosystems from raw chemistry. In 2022, a team at Google DeepMind used it to teach a transformer neural network how to write competitive computer programs.

01 The generate-and-filter loop
The algorithm at the heart of life, mind, and AlphaCode: generate many candidates, test them against reality, keep only what works, then repeat. Biology has been running this loop for four billion years.
Generate Produce many candidates Filter Test and discard failures Survive Keep what works many few repeat across generations
Filter (selection pressure)
Survive (what works)
I. A million wrong programs

Program synthesis is one of computer science's oldest and most frustrated ambitions. Give a machine a description of what you want; receive back code that does it. For decades the dream kept colliding with an inescapable wall: there are simply too many possible programs to search through. AlphaCode did not try to escape that wall. It leaned into it.

The system, described in a landmark paper on the cover of Science in December 2022, was built around an encoder-decoder neural network with up to 41.4 billion parameters, pretrained on 715 gigabytes of human source code from GitHub and fine-tuned on a curated dataset of competitive programming problems. For a typical problem, involving manipulating strings, navigating grids, or counting valid configurations under tight constraints, AlphaCode did not try to write one brilliant solution. It generated up to one million candidate programs. Then it threw most of them away.

The first filter was simple: any program that failed the example test cases attached to the problem was immediately discarded, eliminating roughly 99 percent of the samples. The survivors were then clustered by the outputs they produced when run on a battery of synthetic inputs. Finally, AlphaCode submitted at most ten programs drawn from the largest clusters. On ten recent Codeforces contests, where tens of thousands of human programmers compete for ranking, AlphaCode finished in the top 54.3 percent of participants. "AlphaCode managed to perform at the level of a promising new competitor," said Mike Mirzayanov, the founder of Codeforces. Lead researcher Yujia Li was direct about the philosophy: "The whole process is automatic, without human selection of the best samples." The model did not have taste. The pipeline did.

In December 2023, DeepMind unveiled AlphaCode 2 alongside its Gemini language model family. The new version added a learned scoring model, a second neural network trained to predict how likely each candidate was to be correct. The pipeline remained structurally identical, but every stage was sharper. AlphaCode 2 reached the 85th percentile on Codeforces on average, and above the 99.5th percentile on its two best contests. More strikingly, it reached AlphaCode's original solve rate using roughly 100 samples instead of a million, a 10,000-fold gain in efficiency in a single generation. The system had developed better taste at the proposal stage. It still generates and filters. It just wastes far fewer attempts in the dead branches of possibility space.

02 AlphaCode's pipeline
One million programs generated. Ninety-nine percent discarded by test case filtering. Survivors clustered by behavioral signature. Up to ten programs submitted. The funnel is the method.
1. Sample Up to 1,000,000 candidate programs generated from the problem statement wide 2. Test case filter 99% discarded — roughly 10,000 programs survive narrowing 3. Cluster by behavior Group survivors by output on synthetic test inputs focused 4. Submit Up to 10 programs from largest clusters
Filter stage (99% discarded)
Behavioral clustering
Final submission
II. Arrival of the fittest

Hugo de Vries, the Dutch botanist who helped rediscover Mendel's laws at the turn of the twentieth century, identified the deepest puzzle in evolutionary theory long before anyone had the tools to crack it. Natural selection, he observed, can explain the survival of the fittest. It cannot explain the arrival of the fittest. Selection is editorial: it can choose, prune, and kill. It cannot, by itself, author the candidate sentence in the first place. So where does biological novelty come from?

The Swiss evolutionary biologist Andreas Wagner has pursued this question for two decades. In his 2014 book Arrival of the Fittest, Wagner argues that life solves the authorship problem through a hidden architectural feature he calls genotype networks: vast meshes of distinct DNA sequences that all happen to produce the same working phenotype. For any functional protein or metabolism, you can step from one genetic sequence to another, changing single DNA letters at a time, and walk surprisingly far through sequence space without breaking the thing the gene builds. A population drifting through these neutral mutations is constantly sampling new neighborhoods of possibility, each one just a step away from an innovation that selection might then preserve.

Richard Dawkins reached for an adjacent intuition in 1986 in The Blind Watchmaker, distinguishing single-step selection from cumulative selection. A monkey randomly hitting typewriter keys will almost never produce a meaningful sentence. A monkey whose nearly-right phrases are preserved and refined will converge on meaning very quickly. Cumulative selection builds complexity. Single-step selection cannot. AlphaCode's architecture is cumulative selection on silicon: the transformer generates plausible-looking code because it has learned the folk grammar of human programming, and the filters preserve only the programs that actually run correctly.

The theoretical biologist Stuart Kauffman put a number on the scale of the problem. A protein of just one hundred amino acids, chosen from the standard alphabet of twenty, can take any of ten to the power of 130 possible sequences. The estimated number of hydrogen atoms in the observable universe is about ten to the power of 80. No evolutionary search covers that space exhaustively. What evolution does instead is feel its way along what Kauffman calls the adjacent possible: the solutions reachable in exactly one step from where life currently stands. Each new solution opens its own doors. The search dilates as it proceeds. This is also what AlphaCode does. Its million samples are not a random sweep of all possible programs. They are a sweep through the adjacent possible of things that look like the kinds of programs human programmers write.

03 Evolution's search space
Genotype networks let life drift through neutral mutations while remaining functionally viable — and always one step away from an innovation. AlphaCode explores program space the same way: staying close to what works, trusting the filter to find what is better.
The space of all possible DNA sequences — too vast to search exhaustively Genotype network — sequences that produce a working protein new Innovation one step away neutral drift through the network AlphaCode explores program space the same way: near valid solutions, one step from better ones
Working sequences (genotype network)
Innovation — reachable at the edge
III. A parliament of guesses

In the late 1970s, the immunologist and Nobel laureate Gerald Edelman noticed something strange about the brain. It was doing the same thing the immune system does. Mammalian embryos produce roughly twice as many neurons as the adult brain will ever keep. Synapses sprout in even more extravagant excess. The neurons that survive are those whose firing patterns resonate usefully with their neighbors. The rest are pruned away through a process that is, in its logic, indistinguishable from natural selection acting on a population of organisms. Edelman called the framework Neural Darwinism. The brain, he argued, is not programmed from above. It is bred from within.

Karl Friston, the University College London neuroscientist whose free energy principle has become one of the most ambitious theoretical frameworks in cognitive science, takes this logic even further. The brain's entire job, he argues, is to generate hypotheses about the causes of its sensory input and then minimize the prediction error between those hypotheses and what its sensors report. "Perhaps the neatest and most intuitive name is self-evidencing," he told National Science Review in a 2024 interview. "Self-evidencing refers to the imperative, for perception, cognition and action, to maximize evidence for the brain's generative model of the sensed world." Hypotheses are the generation step. Prediction error is the filter. The cortex is generate-and-test, recursively applied across dozens of hierarchical layers.

Jeff Hawkins, the engineer who cofounded Palm Computing before turning his attention to neuroscience, pushed this picture to one of its more surprising conclusions. In his 2021 book A Thousand Brains, Hawkins proposes that the human neocortex is composed of roughly 150,000 near-identical processing units called cortical columns. Each column constructs its own complete model of whatever object or concept it is processing. When you pick up a coffee mug, the columns devoted to your fingertips are not contributing fragments to a single unified algorithm. Each is generating its own hypothesis about what the object is, and the cortex resolves the disagreement by something close to a democratic vote. "Your brain's knowledge is distributed across thousands of nearly identical information processing units," Hawkins writes. The mind is a parliament of guesses, with a veto held by reality. What Hawkins describes in the cortex is what AlphaCode is doing on a cluster of servers: generate many independent hypotheses, cluster them by apparent agreement, let the filter decide.

04 The brain's parallel hypothesis machine
Neurons overproduce, synapses prune by experience, surviving cortical columns vote on an answer. The same three-step loop runs in every developing nervous system — and mirrors AlphaCode's clustering pipeline.
OVERPRODUCTION PRUNING CONVERGENCE Many neurons formed by genetics and noise Unused synapses pruned by experience Columns vote Answer Surviving columns reach consensus Mirrors AlphaCode's pipeline Overproduction = 1M samples · Pruning = test filter · Convergence = cluster and vote
Active neurons / surviving candidates
Converged answer
IV. The body as software

Michael Levin does not like the old hardware-software metaphor for biology. He finds it too rigid, too committed to the idea that a genome is a fixed instruction set and a body is the program it runs. The reality, he argues, is far stranger and more interesting. Levin's lab has shown that the electrical signals passing between cells, the bioelectric layer that sits beneath the genome and above individual cell behavior, act as a kind of distributed memory that tells tissues what body shape to build. His team can edit this bioelectric layer to make flatworms regenerate two heads instead of one, or to cause tadpoles to grow extra limbs in unexpected locations. The genome provides the components. The bioelectric field provides the goal. The cells use a local generate-and-check process to reach it.

"Making a frog is the default behavior of this hardware," Levin has said in several public lectures, "but the software that runs on this hardware is actually much more flexible." The Xenobot experiments demonstrated this directly. Frog skin cells removed from their default developmental context, shaped by an evolutionary algorithm running on a supercomputer, and placed in a petri dish did not simply die or revert to random motion. They discovered new behaviors, including kinematic self-replication: gathering loose stem cells in the environment into piles that developed into mobile clusters resembling the parent Xenobots. No programmer wrote those behaviors. The evolutionary algorithm that suggested the body shapes had no knowledge of replication. The cells were simply doing what cells do, proposing local solutions to local problems, and the environment was filtering for whatever happened to work.

Levin uses the term cognitive light cone to describe the largest goal in space and time that a given biological system can represent and pursue. A single bacterium has a tiny cognitive light cone. A multicellular organism has a much larger one. Evolution, he argues, is fundamentally in the business of expanding cognitive light cones, scaling the size and complexity of the problems that living agents can take on. AlphaCode's pipeline can be read in exactly these terms. Each iteration expanded its cognitive light cone: larger problems, more complex constraints, longer time horizons for planning the structure of a solution. AlphaCode 2, reaching the 85th percentile on Codeforces, is operating with a dramatically larger light cone than its predecessor, not because the algorithm changed but because the proposal distribution got better taste, and the filter got sharper.

Biological computation research

Xenobots — living machines grown from frog stem cells and shaped by an evolutionary algorithm — swim, gather material, and self-replicate without any programmed instruction. Their behavior emerges from the same generate-and-filter loop that runs AlphaCode. Levin Lab / Tufts University.

V. Teaching machines to have taste

If the convergence between biological computation and AlphaCode is striking, it is because both arrived at the same principle by the same route: the failure of every alternative. At MIT, Joshua Tenenbaum has spent two decades arguing that human cognition is best understood as Bayesian program induction, the inference of small, structured programs that explain observed data. In 2015, working with Brenden Lake and Ruslan Salakhutdinov, he showed in Science that a system representing handwritten characters as programs could match human performance on one-shot learning, where the learner sees a new symbol once and must recognize others immediately. The key was generation under a strong prior, followed by selection under the observed data. A few years later, Kevin Ellis introduced DreamCoder: a system that writes programs to solve problems, abstracts the recurring chunks into reusable primitives, and grows a small domain-specific language that makes future searches easier. The neural network proposes. The interpreter filters. The library accumulates taste.

François Chollet, who created the Keras framework and designed the Abstraction and Reasoning Corpus, has been arguing this point publicly for years. ARC consists of small visual puzzles that any six-year-old can solve and that no large language model, operating alone without a search process, consistently solves. Chollet's diagnosis is that intelligence is not pattern-matching over a large training set. It is the ability to construct, on the fly, a small program capturing the rule governing a never-before-seen task. "It is meant to be difficult," he wrote when he launched the benchmark, "but I know for a fact that it is partially approachable today using program synthesis." He left Google in late 2024 to found a company explicitly built around this approach. The 2024 ARC Prize competition vindicated the diagnosis: the state of the art climbed from 33 percent to 55.5 percent in a single year, driven entirely by systems that combine neural generation with explicit program search and test-time verification.

Melanie Mitchell, the Santa Fe Institute computer scientist who has written about AI brittleness for three decades, frames the remaining difficulty plainly: "Solving the brittleness problem will require meaning. These systems don't understand, in any humanlike sense, the data that they're dealing with." A generate-and-filter pipeline with no sense of what constitutes a plausible proposal will produce a million wrong programs and one accidental right one. Pushing more taste into the proposal stage itself is the central engineering challenge of the decade, and the next generation of neurosymbolic systems is converging on exactly this from multiple directions at once.

VI. The verifier is the missing ingredient

Software engineers have been quietly rediscovering the same principle from the other direction for twenty years, without always recognizing what they were doing. The QuickCheck library, born in Haskell in the early 2000s and since ported to virtually every major programming language, asks developers to specify properties their code should satisfy and then automatically generates random inputs to hunt for counterexamples. Coverage-guided fuzzers like American Fuzzy Lop find security vulnerabilities in mature, well-reviewed codebases by mutating input data and watching what causes the program to crash. Both are generate-and-filter at the level of testing rather than code generation. Both have found critical bugs that years of human review missed, because the generation process is not limited by human assumptions about what an interesting input looks like.

The lesson AlphaCode adds to this tradition is that the same logic applies at the level of the code itself. Generate many candidate implementations. Filter by correctness. The practical question is always the same: what is your filter, and how much do you trust it? DeepMind has been candid about the limits of what they have built. "Our system requires a lot of trial and error, and remains too costly to operate at scale," the AlphaCode 2 authors acknowledged. "Further, it relies heavily on being able to filter out obviously bad code samples." The system works because there exists a reliable oracle, the competitive programming judge, that evaluates a candidate program in milliseconds and returns an unambiguous verdict. Outside that narrow setting, in real-world development where correctness criteria are ambiguous and requirements change, the oracle is harder to find.

Demis Hassabis, the DeepMind cofounder who shared the 2024 Nobel Prize in Chemistry for the AlphaFold protein-structure work, has framed the human-machine relationship in these systems as fundamentally collaborative. The future of programming, he has suggested, will look like a dialogue: AI models that help engineers reason about problem structure, propose candidate designs, implement them, and flag uncertainty, while humans supply the higher-level judgment about what correctness means. The verifier in that picture might be a human reviewer, a formal type system, a test suite, or a learned correctness model. It does not matter which, as long as there is one that can be trusted. Every successful generate-and-filter system in nature and in computation shares exactly that feature: an honest filter that cannot be fooled.

VII. The watchmaker is still blind

The most important thing about the convergence between AlphaCode's architecture and four billion years of biological computation is that neither was designed to converge on the other. Evolution stumbled onto generate-and-filter because nothing else scales across geological time. The developing brain settled on overproduction-and-pruning because nothing else reliably builds a working nervous system from noisy genetic instructions. AlphaCode's engineers arrived at massive sampling and test-based filtering because nothing else consistently produces a working program for an unfamiliar problem. The principle is older than any of its implementations, and it is beginning to look like one of those rare ideas that actually deserves to be called fundamental.

The next generation of systems, built around program synthesis and neurosymbolic architectures, will be better at all three stages of the loop. Better priors, shaped by richer feedback. Better generation, guided by learned taste that pushes proposals toward valid regions of program space before the interpreter ever runs. Better filters, perhaps formal verifiers or learned correctness models, that can evaluate not just whether a program runs but whether it captures the right structure of reasoning for a class of problems. What they will not do is escape the algorithm. The adjacent possible, in biology and in computation, is always the same shape: a combinatorial landscape too vast to search exhaustively, with clusters of working solutions connected by neutral paths, and an honest environment waiting to decide which proposals deserve to survive.

The cells in the pond outside Medford do not know they are performing program synthesis. The cortical columns under your skull do not know they are running parallel hypothesis generation. AlphaCode does not know that its million wrong programs are the nutrient broth from which its handful of correct ones emerge. None of it requires comprehension. It requires only what evolution has always required: a rich enough source of variation to cover the territory, a prior good enough to concentrate that variation where answers tend to live, and a filter honest enough to select only the ones that actually work. The watchmaker is still blind. The watches keep getting better.

05 One algorithm, three implementations
Evolution, brain, and AlphaCode all run the same three-step loop at different speeds and scales. The principle predates every implementation. Same logic, same outcome: complexity emerging from selection.
Evolution 4 billion years old Brain 500 million years old AlphaCode 3 years old Generate Random mutations Generate Neuron overproduction Generate 1M program samples Filter Natural selection Filter Synaptic pruning Filter Test case rejection Survive Fit organisms reproduce Survive Strong circuits persist Survive Correct programs submitted Same principle — different substrate, same outcome: complexity from selection
Filter (selection pressure)
Survive (what endures)
Brain implementation

Key references: Li, Y. et al., "Competition-Level Code Generation with AlphaCode," Science 378, December 2022. AlphaCode 2 Technical Report, Google DeepMind, December 2023. Wagner, A., Arrival of the Fittest: How Nature Innovates, Current Books, 2014. Hawkins, J., A Thousand Brains: A New Theory of Intelligence, Basic Books, 2021. Lake, B. et al., "Human-level concept learning through probabilistic program induction," Science 350, 2015. Ellis, K. et al., "DreamCoder: Bootstrapping Inductive Program Synthesis with Wake-Sleep Library Learning," PLDI 2021. Friston, K., interview, National Science Review, 2024. Dawkins, R., The Blind Watchmaker, W. W. Norton, 1986. Bongard, J. and Levin, M. et al., Xenobot research, PNAS, 2020. Edelman, G., Neural Darwinism: The Theory of Neuronal Group Selection, Basic Books, 1987. Chollet, F., "On the Measure of Intelligence," arXiv, 2019. ARC Prize 2024 Technical Report, arcprize.org.