The machines trying to write their own code may have the most to learn from biology.
In the winter of 1972, in a smoke-filled office on the ninth floor of MIT's Tech Square, a graduate student named Gerald Jay Sussman was teaching a computer to fail. The machine was wrestling with a problem in what researchers called the blocks world, a toy environment where colored rectangles could be stacked and rearranged. Most planning systems of the era would solve the first goal, then promptly destroy it while pursuing the second, looping forever. Sussman's program did something stranger. It would devise a plan, watch it break, examine the wreckage, and revise.
He named the system HACKER. In the culture of the MIT Artificial Intelligence Laboratory, to hack something meant to understand it deeply enough to fix it, to turn a mistake into a lesson. Each time the system stumbled, it filed away a small reusable lesson into a growing library of procedural knowledge. Its successes built on one another. By the time the thesis was published as a book in 1975, the field had a new template: a program that learned to write programs by accumulating a personal library of skills.
Half a century later, a system called DreamCoder, presented in June 2021 at the ACM Programming Language Design and Implementation conference by Kevin Ellis, then at MIT and now at Cornell, along with a team that included Armando Solar-Lezama and cognitive scientist Joshua Tenenbaum, did something that would have seemed impossibly ambitious to Sussman's generation. Starting from a tiny vocabulary of basic operations, it rediscovered the foundations of functional programming. It derived Newton's law of gravitation from a raw dataset, with no prior knowledge of physics. Given a corpus of drawings produced by a turtle-graphics program called LOGO, it independently invented the concept of radial symmetry. It did all of this by alternating between two phases the authors called wake and sleep.
Between HACKER and DreamCoder lies the entire history of program synthesis, a fifty-year argument about how a machine can learn to write its own software. It is a history shaped by two warring traditions. The symbolic camp saw programming as an exercise in logic and proof. The neural camp saw it as a matter of pattern and statistical prediction. Each has run into its own walls. And in laboratories at Tufts University, Cambridge, and University College London, biologists studying how cells, embryos, and nervous systems compute are making the case that the only path through those walls runs through their territory.
The symbolic dream began in earnest in 1969, when Cordell Green at Stanford framed program synthesis as a theorem-proving task. To write a program, prove mathematically that an output satisfying your requirements exists, then read the program off from the proof. Zohar Manna and Richard Waldinger at SRI picked up the thread and did not let it go for the next two decades. Their 1980 paper in the ACM Transactions on Programming Languages carried the title "A Deductive Approach to Program Synthesis" and became a foundational text. Give them a precise specification, and they would derive a recursive algorithm through formal manipulation: sorting routines, binary search, unification algorithms. The work was rigorous. The programs were certifiably correct.
The limitation was fundamental. It almost never scaled. The deductive approach lived permanently in the shadow of what computer scientists call combinatorial explosion. A specification of any real-world complexity admits an astronomical number of possible proof attempts. Symbolic synthesizers of the 1980s could derive elegant five-line algorithms but choked on anything resembling industrial software. Stephen Muggleton's Inductive Logic Programming added an empirical flavor in the 1990s, learning logical rules from examples, but the curse remained. Search spaces are vast, and pure logic, however beautiful, has no instinct for which path is worth pursuing.
The next breakthrough came not from a theorem prover but from a Microsoft Research scientist sitting on a plane. In December 2009, Sumit Gulwani found himself next to a businesswoman who asked him to help merge two name columns in Excel. "I had to admit to her that I knew next to nothing about Excel," Gulwani later recalled. He went home and built FlashFill. The feature shipped in Excel 2013 and is now used by hundreds of millions of people who have no idea there is a program synthesizer running beneath it. The technical idea was to define a small, carefully chosen language of string transformations and search it using version-space algebra, a technique for efficiently pruning programs that are inconsistent with the examples you have shown the system. Programming by example, an idea that had floated in academic limbo since the 1970s, was suddenly inside every Excel spreadsheet on Earth.
Around the same time, Armando Solar-Lezama, completing his doctoral work at Berkeley, took a different angle. His system, called Sketch, treated synthesis as filling in the blanks of a partial program a human had already outlined. The programmer supplied the algorithmic insight; the machine found the fiddly details that would make the program correct. "Before we started this project," Solar-Lezama later said, "there was very little attention paid to program synthesis, even in the research community. There was hostility toward these kinds of ideas. People thought of program synthesis as this unobtainable goal." Sketch, FlashFill, and the community of constraint-based synthesis that grew up around them showed that synthesis worked beautifully when you constrained it to a carefully chosen slice of reality. But the slice was always narrow. Symbolic synthesizers were brittle and had no common sense. They could not generalize across domains the way a human programmer learns Python after years of writing Java.
When deep learning broke open computer vision and natural language processing after 2012, program synthesis felt the tremor a few years later. The first serious attempt to wed neural networks to program induction was DeepCoder, published in 2017 by researchers at Microsoft Research Cambridge. The approach was straightforward: given input-output examples, train a neural network to predict which functions are likely to appear in the solution, then use those predictions to guide a classical search. The team reported an order-of-magnitude speedup over baseline solvers, and the press declared that AI was about to put programmers out of work. It did not. DeepCoder solved problems comparable to the easiest items on programming-competition websites.
A few months later, another Microsoft Research team published RobustFill, an attention-based neural network that reached 92 percent accuracy on a real FlashFill benchmark, compared to 34 percent for the previous best neural approach. Then came the transformer revolution. By 2021, OpenAI's Codex was generating plausible Python from plain English. By early 2022, DeepMind's AlphaCode, trained on 41 billion parameters, ranked within the top 54 percent of human competitors across programming contests. Two years later, AlphaProof combined a Gemini-derived language model with a reinforcement learning engine and reached silver-medal performance at the International Mathematical Olympiad. For a few years, it genuinely seemed like the symbolic camp had lost the argument.
The problems surfaced gradually. Large language models, asked to perform multi-step algorithmic reasoning, hallucinate. They produce code that compiles but silently violates its own requirements. They fail catastrophically on inputs that drift even modestly outside their training distribution. They have no notion of correctness in the mathematical sense. The security engineer who watched GitHub Copilot suggest a textbook buffer overflow, the mathematician who saw a confident language model prove a false theorem with articulate gibberish: each was running into the same wall from a different direction. Gary Marcus, the NYU cognitive scientist who has spent two decades arguing that AI needs something beyond pattern matching, put the diagnosis plainly: "We cannot construct rich cognitive models in an adequate, automated way without the triumvirate of hybrid architecture, rich prior knowledge, and sophisticated techniques for reasoning." Symbolic systems give you correctness guarantees but no intuition. Neural systems give you intuition but no guarantees. To write programs that actually work, you seem to need both.
DreamCoder is the most serious attempt so far to occupy the space between those two walls. The system takes as input a collection of problems, each described by examples, and over time produces a library of learned abstractions alongside a neural network that has learned how to search efficiently within that library. Each improves the other over time.
In the wake phase, DreamCoder tries to solve problems using its current library and a neural search policy. In a phase called abstraction sleep, it examines the programs it has discovered and identifies common patterns, subexpressions that appear repeatedly across different solutions, and factors those patterns out as new named library routines. Think of it as the system noticing that it keeps writing the same paragraph in different essays, and deciding to give that paragraph a name. In the dreaming sleep phase, the neural network is retrained on a mix of actually solved problems and synthetic fantasies sampled from the current library, so that it can recognize patterns that produce useful programs.
What the system actually produces is worth pausing on. In list processing, DreamCoder starts from the most basic operations and builds upward: it learns to filter a list, then uses filter to learn how to find the maximum, then uses maximum to learn the nth-largest element, then uses that to learn how to sort. The library deepens layer by compositional layer, like geological strata, each resting on the one below. Fed sixty physical relationships expressed as raw data, the system derives vector algebra and inverse-square laws. Given turtle-graphics tasks, it independently arrives at the concept of radial symmetry. Each library is a kind of fossilized record of what the system has come to understand. This is the library that writes itself, the very thing Sussman was reaching for in 1972 when HACKER's critics filed away their tiny lessons.
But for all its elegance, DreamCoder is still confined to carefully chosen toy domains, and the learning takes on the order of a CPU-month per domain. Its authors are explicit that the system does not generate its own problems, does not exercise anything resembling curiosity, and lacks embodied experience. It is, they note, a curriculum learner without a curriculum. What such a system might be missing becomes clearer when you look somewhere very different from MIT's computer science building.
In a laboratory at Tufts University, a biologist named Michael Levin spends his days videotaping flatworms and frog embryos and arguing, with mounting experimental evidence, that they are running the most sophisticated program synthesis algorithm in the known universe. His central claim, developed across fifteen years of papers in journals including Cell and Nature Communications, is that biological development is not the execution of a hard-coded DNA program but a goal-directed computation performed by networks of cells using bioelectric signals. "DNA simply encodes specific proteins," he wrote in a 2018 paper. "There is no direct encoding of anatomical structure." Instead, cells communicate through ion-channel dynamics and structures called gap junctions that form what Levin describes as a primitive cognitive medium.
Cut a planarian flatworm in half and the rear segment will regrow a head, complete with a functioning brain. The instructions for that head are not written in any single cell's genome. They are computed, in real time, by the collective. Levin's most striking experiments have shown that this collective can be reprogrammed. By altering the bioelectric pattern across a cell network, his laboratory has produced flatworms with two heads that breed true across generations, frog embryos with functional eyes growing from their tails that nonetheless wire themselves correctly into the central nervous system, and, in 2020 with collaborators at the University of Vermont, the xenobots, computer-designed organisms built from frog stem cells that can swim, push small pellets, and even replicate themselves by corralling loose cells into offspring.
Dennis Bray, the Cambridge cell biologist, made a related case in his 2009 book Wetware: A Computer in Every Living Cell. Bray traces how individual cells, which lack any nervous system, nonetheless hunt chemical gradients, sense mechanical pressure, and modulate their internal state through molecular circuits that perform logical operations. "The internal chemistry of living cells is a form of computation," he writes. "Cells are built out of molecular circuits that perform logical operations, as electronic devices do, but with unique properties." Those unique properties include a self-repairing redundancy that no human-built circuit approaches. The argument traces back to 1994, when Leonard Adleman used the polymerase chain reaction, the same biochemical machinery that copies DNA, to solve a combinatorial puzzle in parallel across trillions of molecules simultaneously, launching the field of DNA computing.
A planarian flatworm regenerating after decapitation: the head will regrow in approximately two weeks. Michael Levin's laboratory at Tufts University has demonstrated that the blueprint for this regrowth is stored in bioelectric patterns across the body tissue, not in the DNA of any individual cell.
Stuart Kauffman, the theoretical biologist whose career has been defined by a single unsettling observation about complexity, offers what may be the deepest parallel between biology and program synthesis. Working at the University of Chicago in the 1970s, Kauffman became interested in how a self-sustaining chemical metabolism could arise spontaneously, how life could boot itself up from scratch with no external programmer. His answer was the autocatalytic set. In a sufficiently rich chemical soup, some subset of molecules will collectively catalyze each other's formation: molecule A helps make B, B helps make C, C helps make A. Once such a loop closes, the set becomes self-sustaining.
Wim Hordijk and Mike Steel, working with Kauffman in later decades, formalized these as RAF networks and subsequently identified small-molecule autocatalytic sets in the metabolic networks of all 6,700 prokaryotes they examined. Life, on this view, is a bootstrapping library of chemical functions that learned to write itself before any nervous system existed. The resonance with DreamCoder's library-building loop is difficult to ignore. In both cases, a compositional vocabulary emerges not from top-down design but from a self-reinforcing process in which existing elements combine to produce new elements that, in turn, expand the vocabulary.
Karl Friston's free energy principle, developed at University College London since 2005, adds another layer. Friston proposes that every biological system capable of persisting in a changing environment must, in a precise mathematical sense, minimize the difference between its internal model of the world and the sensory data it receives. The brain does this through a process called predictive coding: higher brain regions send predictions downward through the cortical hierarchy; lower regions send prediction errors upward. The brain is, at every moment, running a probabilistic program that is continuously updating itself to reduce surprise. Joshua Tenenbaum at MIT made a closely related argument in a 2011 Science paper, proposing that human inductive leaps from sparse data are best modeled as Bayesian inference over compositional, programlike representations. A child who hears a dozen examples of a new word and generalizes correctly to dozens of novel cases is, in his framing, running a probabilistic search over a space of structured concepts.
The biological evidence for compositional, library-style computation extends, strikingly, into the mechanics of movement itself. Beginning in the early 1990s, the neuroscientist Emilio Bizzi and his colleagues at MIT began systematically stimulating the spinal cords of frogs at different sites and measuring the resulting force fields at the hindlimb. What they found was unexpected. Each stimulation site produced a specific, reproducible force pattern. When two sites were stimulated simultaneously, the resulting force field was, to remarkable approximation, the vector sum of the two individual fields. The spinal cord appeared to store a small library of force-field primitives, and complex movements appeared to be composed by combining them.
A 2019 study in PNAS from Simon Giszter's laboratory showed that the same set of motor primitives was conserved across rats reared in radically different conditions. Rats that had never used their hind legs produced the same primitive library as those raised normally. Biology, when it builds motor skills, builds them the same way DreamCoder builds list operations: out of a small library of reusable, recombinant primitives, fixed early and reused for life.
The biological evidence does not endorse either pole of the AI debate. It is corrosive to both. Pure symbolic synthesis, the approach championed by Manna, Waldinger, and their descendants, requires clean, complete specifications. It asks the world to be legible. Biology works in the opposite regime. Cells repair themselves under conditions that evolution never tested, using bioelectric patterns whose semantics no biologist has fully decoded. The specification for a salamander's regrown limb is a target morphology distributed across residual tissue; the search is performed by gradient descent on bioelectric error signals running over gap-junction networks. There is logic in this process, but it is approximate, embodied, and noisy in ways that no proof-theoretic synthesizer can handle.
Pure neural synthesis, the tradition embodied by AlphaCode, Copilot, and their successors, requires vast quantities of data and trusts gradient descent to produce competence. Biology is parsimonious to a fault. A toddler hears a dozen examples of a new word and generalizes it correctly across an enormous range of novel instances. An octopus, whose nervous system shares no common ancestor with ours for hundreds of millions of years, solves problems that its species has never encountered. The motor primitives in a rat's spinal cord are fixed by day five after birth. Biological learning generalizes from few examples by composing existing skills, not by interpolating across millions of training instances.
What biology actually does, on the evidence accumulating across Levin's lab at Tufts, Bizzi's work at MIT, Friston's theoretical framework at UCL, and Kauffman's autocatalytic models, is something closer to what DreamCoder gestures toward. It maintains a hierarchical, compositional library of compressed abstractions that can be recombined to handle novel situations, and it uses fast pattern-recognition systems, including neural circuits, bioelectric networks, and immune memory, to guide the search through that library efficiently. The library is symbolic: its elements are discrete, reusable units with identifiable function. The search is neural: approximate, parallel, and learned from experience. Neither would be sufficient on its own. Together, in the right architecture, they apparently produce the extraordinary range of biological competence that surrounds us.
Solar-Lezama frames the engineering challenge directly. Deep learning, he has said, has been game-changing because it lets synthesis bridge the formal world, where programs must be exactly right, and the informal world of natural language and rough sketches. "Software, by nature, is verifiable, concrete, and has a lot less tolerance for noise and errors, whereas natural language is nuanced and more imprecise. One of the things we are really interested in is how to get programming systems that can bridge these different modes of reasoning." The bridge, if the biological analogy holds, requires exactly what DreamCoder attempts and what biology has already achieved: a library rich enough to compose solutions to problems that were never anticipated, and a search process fast enough to find the right composition in time to be useful.
The view from 2026 is an unusual one. The program synthesis community began, in the early 1970s, with the goal of automating software engineering. It discovered along the way that the problem was harder than it appeared, because programs exist at the intersection of two worlds that resist each other: the world of formal logic, where correctness is verifiable, and the world of human intention, where specifications are always incomplete. The symbolic camp built beautiful, brittle systems for the first world. The neural camp built fluent, unreliable systems for the second. DreamCoder found a way to let the two grow each other, like a learner who builds vocabulary and grammar together, each enabling the other.
At the same time, in flatworm tanks and synthetic biology laboratories and cortical imaging suites, biologists were finding that the problem had already been solved, many times, by many different substrates, over billions of years. The flatworm regrows its head. The infant learns its first word. The spinal cord assembles a running gait from force-field primitives. The autocatalytic metabolism bootstraps itself from chemistry. None of these systems was designed by anyone. All of them learned to write their own software.
The question is no longer whether machines will ever do it. The question is whether we are humble enough to learn from the systems that already do, and patient enough to build the architectures that would let them teach us. Sussman, now in his late seventies, still works at MIT. The question he cared about in 1972, how does a system acquire skill through experience and reflection, is the same question the field is still asking. The blocks world is long gone. The question is not.
Key references: Ellis, Wong, Nye et al., "DreamCoder: Bootstrapping Inductive Program Synthesis with Wake-Sleep Library Learning" (PLDI, 2021); Sussman, A Computational Model of Skill Acquisition (MIT Press, 1975); Manna and Waldinger, "A Deductive Approach to Program Synthesis" (ACM TOPLAS, 1980); Gulwani, "Automating String Processing in Spreadsheets Using Input-Output Examples" (POPL, 2011); Solar-Lezama, Program Synthesis by Sketching (UC Berkeley, 2008); Balog et al., "DeepCoder: Learning to Write Programs" (ICLR, 2017); Levin and Martyniuk, "The Bioelectric Code" (BioSystems, 2018); Bray, Wetware: A Computer in Every Living Cell (Yale University Press, 2009); Kauffman, The Origins of Order (Oxford University Press, 1993); Friston, "The Free-Energy Principle" (Nature Reviews Neuroscience, 2010); Tenenbaum et al., "How to Grow a Mind" (Science, 2011); Bizzi et al., "Linear Combinations of Primitives in Vertebrate Motor Control" (PNAS, 1994); Adleman, "Molecular Computation of Solutions to Combinatorial Problems" (Science, 1994).
Daice Labs Inc.
Brookline, MA, USA
Roll the "daice"–exploration & programmable adaptation.