The Santa Ana winds were already blowing hard when I ran the first worm simulation. I’m no hacker, but it was easy enough: Open a Terminal shell, paste some commands from GitHub, watch characters cascade down the screen. Just like in the movies. I was scanning the passing code for recognizable words—neuron, synapse—when a friend came to pick me up for dinner. “One sec,” I yelled from my office. “I’m just running a worm on my computer.”
At the Korean restaurant, the energy was manic; the wind was bending palm trees at the waist and sending shopping carts skating across the parking lot. The atmosphere felt heightened and unreal, like a podcast at double speed. You’re doing, what, a cybercrime? my friend asked. Over the din, I tried to explain: No, not a worm like Stuxnet. A worm like Richard Scarry.
By the time I got home it was dark, and the first sparks had already landed in Altadena. On my laptop, waiting for me in a volumetric pixel box, was the worm. Pointed at each end, it floated in a mist of particles, eerily stick-straight and motionless. It was, of course, not alive. Still, it looked deader than dead to me. “Bravo,” said Stephen Larson, when I reached him later that night. “You have achieved the ‘hello world’ state of the simulation.”
Larson is a cofounder of OpenWorm, an open source software effort that has been trying, since 2011, to build a computer simulation of a microscopic nematode called Caenorhabditis elegans. His goal is nothing less than a digital twin of the real worm, accurate down to the molecule. If OpenWorm can manage this, it would be the first virtual animal—and an embodiment of all our knowledge not only about C. elegans, which is one of the most-studied animals in science, but about how brains interact with the world to produce behavior: the “holy grail,” as OpenWorm puts it, of systems biology.
Unfortunately, they haven’t managed it. The simulation on my laptop takes data culled from experiments done with living worms and translates it into a computational framework called c302, which then drives the simulated musculature of a C. elegans worm in a fluid dynamic environment—all in all, a simulation of how a worm squiggles forward in a flat plate of goo. It takes about 10 hours of compute time to generate five seconds of this behavior.
So much can happen in 10 hours. An ember can travel on the wind, down from the foothills and into the sleeping city. That night, on Larson’s advice, I tweaked the time parameters of the simulation, pushing beyond “hello world” and deeper into the worm’s uncanny valley. The next morning, I woke to an eerie orange haze, and when I pulled open my laptop, bleary-eyed, two things made my heart skip: Los Angeles was on fire. And my worm had moved.
At this point, you may be asking yourself a very reasonable question. Back at the Korean place, between bites of banchan, my friend had asked it too. The question is this: Uhh … why? Why, in the face of everything our precarious green world endures, of all the problems out there to solve, would anyone spend 13 years trying to code a microscopic worm into existence?
By way of an answer, I’ll offer one of the physicist Richard Feynman’s most famous dictums: What I cannot create, I do not understand. For much of its history, biology has been a reductionist science, driven by the principle that the best way to understand the mind-boggling complexity of living things is to dissect them into their constituent parts—organs, cells, proteins, molecules. But life isn’t a clockwork; it’s a dynamic system, and unexpected things emerge from the interactions between all those little parts. To truly understand life, you can’t just break it down. You have to be able to put it back together, too.
The C. elegans nematode is a tiny worm, barely as long as a hair is wide, with less than a thousand cells in its body. Of those, only 302 are neurons—about as small as a brain can get. “I remember, when my first child was born, how proud I was when they reached the age they could count to 302,” said Netta Cohen, a computational neuroscientist who runs a worm lab at the University of Leeds. But there’s no shame in smallness, Cohen emphasized: C. elegans does a lot with a little. Unlike its more unpleasant cousins, it’s not a parasite, outsourcing its survival needs to bigger organisms. Instead, it’s what biologists call a “free-living” animal. “It can reproduce, it can eat, it can forage, it can escape,” Cohen said. “It’s born and it develops, and it ages and it dies—all in a millimeter.”
Worm people like Cohen are quick to tell you that no fewer than four Nobel Prizes have been awarded for work on C. elegans, which was the first animal to have both its genome sequenced and its neurons mapped. But there’s a difference between schematics and an operating manual. “We know the wiring; we don’t know the dynamics,” Cohen said. “You would think that’s an ideal problem for a physicist or a computer scientist or a mathematician to solve.”
They’ve certainly tried. C. elegans’ first simulator was Sydney Brenner, who elevated the lowly worm from compost pile to scientific superstardom with his landmark 1986 paper “The Structure of the Nervous System of the Nematode Caenorhabditis elegans,” reverently known in worm circles as “The Mind of a Worm.” In a lab in Cambridge, England, Brenner’s team spent 13 years painstakingly slicing worms and photographing them through an electron microscope, relying on a first-generation minicomputer—the kind programmed with punched-paper tape—to reconstitute their data into a rudimentary map of the worm’s nervous system.
Every 10 or 20 years since, computer scientists have attempted to expand on Brenner’s work. But biology tends to quickly humble the computer people. In 2003, the computer scientist David Harel pronounced the simulation of C. elegans a “grand challenge” for biology, a field that he considered overdue for an “extremely significant transition from analysis to synthesis.” Although Harel was surely right about that, he never managed to model more than the worm’s vulva—true story.
For her part, Cohen has spent the better part of 20 years publishing breakthrough computational models that account for the sinusoidal squirm of C. elegans as it inches forward through different viscosities. But how the worm moves backward is an entirely different, unsolved problem—and don’t even ask about how a worm moves up and down, or, for that matter, why. All of the data we have about C. elegans behavior comes from worms in flat agar plates. For all we know, they might do things completely differently in the wild. “Why not?” Cohen said with a laugh. “It’s biology.”
When OpenWorm announced its intentions in 2011, Stephen Larson, an engineer who had “found religion” in open source, believed that if he could just convene a group of dedicated computational researchers to take a crack at biology, they might make meaningful progress on a simulation. Thirteen years later, he’s more contrite. “The project might be a cathedral,” Larson told me. “If I don’t have the ability to finish it, then at least other people can see it and build on it.”
This could be burnout talking; spearheading an open source project on a shoestring, for any amount of time, can sap even the most dedicated idealist. It could be the deceptive complexity of C. elegans’ brain, which continues to defy easy capture. It could also just be bad timing.
OpenWorm doesn’t do its own research. Instead, the project’s cohort of volunteers culls from the C. elegans literature, integrating into their simulation whatever data they can find. This means they’re reliant on worm labs like Cohen’s, which have been slow to produce the kind of inputs that are really useful for a computational effort. But over the past decade or so, experimentalists have powered up microscopes and refined genetic techniques, producing more and better recordings of the worm’s brain as it goes about its business. At the same time, machine-learning tools have emerged to make sense of all that data, and computational power is through the roof. The convergence makes Larson hopeful. “When you’re in a time of almost exponential technological expansion, something that sounds crazy is maybe doable,” he said.
I asked Cohen, who serves on OpenWorm’s scientific advisory panel, if it is, in fact, doable. “Well, let’s start from the premise that it is,” she said. “What do we need to do?” Cohen is one of 37 coauthors on a recent opinion paper outlining a new plan: Use genetic imaging technology to activate each neuron in the worm’s nervous system one by one, measuring its effect on the other 301. Repeated hundreds of thousands of times in parallel experiments, this methodical process should hoover up enough data to give the computational folks, finally, something to work with—enough, even, to “reverse engineer” the worm completely.
It’s an ambitious proposal, one that will require an unprecedented level of collaboration between some 20 different worm labs. Gal Haspel, a computational neuroscientist at the New Jersey Institute of Technology and the lead author on the reverse engineering paper, estimates that pulling it off may take up to 10 years, cost tens of millions of dollars, and require something in the neighborhood of 100,000 to 200,000 real-life worms. In the process, it will generate more data about C. elegans than has been collected in all of science to date. And what, in the end, will the reverse engineers have to show for it? “All these people and all these computers,” Haspel said. “And we’ll end up doing what one little animal can do right now.”
He’s being wry. Haspel also compared the project to a NASA moonshot: It’s the kind of undertaking that drives technology forward, pushing engineers to build better tools and scientists to work together. The worm simulation is an opportunity, Haspel believes, for a new kind of science, one driven by automation, big data, and machine learning. And although the end product is only a worm, and an expensive, inefficient one at that—in a sense the world’s most sophisticated Tamagotchi—it can be a stepping stone toward understanding more complex nervous systems and eventually, someday, the human mind.
Last summer, a crypto developer posted an animated GIF on X of a virtual C. elegans worm bonking around an onscreen window. The animation was generated using the same code I ran on my own laptop, which is freely available on OpenWorm’s GitHub. “If the worm matrix runs on my M1 Mac,” he pronounced, “what are the chances we are actually in base reality?” Maybe we’re the worms, he meant—and, on a cosmic MacBook on some higher plane of reality, someone’s running us. The post went viral; Elon Musk, of course, liked it.
When I mentioned the worm matrix to OpenWorm’s project director, Padraig Gleeson, a computational neuroscientist at University College London, he visibly winced. “Some people come to this because they want philosophical discussions about this type of thing. That’s fine,” he said. “My priority is that it’d be very nice to actually look at the biology.”
Gleeson is the Woz to Larson’s Jobs—he’s less interested in building the Überworm than he is in a platform that bundles smaller, more granular models of C. elegans’ biological machinery. Computational modeling is common practice in biology; it’s an inexpensive way to encode and test theories as “thought experiments” before breaking out the agar plates and worm food. Usually, biological models concern some small aspect of the organism being studied—the handful of neurons, say, driving forward locomotion. When it comes to modeling, “we don’t want the map to be as good as the territory. That would defeat the purpose,” explained Eduardo Izquierdo, a computational neuroscientist at the Rose-Hulman Institute of Technology who focuses on worm modeling. “We’re looking for something to help us think through things.”
Nobody would confuse a biological model with the real thing. But a full-on simulation opens a very different can of worms. To borrow Izquierdo’s reference, it is a map as good as the territory—and as such, it invites new speculation about the nature of that territory, to say nothing of life itself. If a model helps scientists answer questions, a simulation raises them. Like, what separates a virtual worm from its living kin, if the two are identical down to the molecule?
The way Larson sees it, a fully faithful worm simulation will be a category-expanding event: Rather than invalidating our current understanding of life, it might broaden it. “If we want to say that aliveness can only be satisfied by systems of physical molecules that physically exist with mass in the planet, something in a computer that doesn’t have physical molecules cannot be alive,” he said. “But if we expand our definition of aliveness to instead be more about information, then perhaps there is a version of aliveness that you could apply to a simulated animal. And then the question is, does it matter?”
I think it matters. Life is information, but it’s something more, too—something we feel most strongly when it’s gone. I wonder if, in this light, Feynman’s dictum shouldn’t be amended. It’s not that creation breeds understanding, exactly. It’s that only by attempting to re-create life can we come to understand how irreplaceable it is.
Of course, I say this because I’m surrounded by destruction. The air is toxic now, and flakes of white ash have eddied into every crevice of the house. At the edge of the evacuation zone, close enough to smell the smoke, I’m keeping myself distracted by cooking up more and more C. elegans proto-simulations. Watching them, I can’t help but marvel at how easy it is to destroy life, and how difficult it is to create it. All it takes is a single spark to torch centuries of growth overnight—but to prompt one sluggish inch forward from a virtual worm? That’s the work of decades, and it may never be finished.
Let us know what you think about this article. Submit a letter to the editor at mail@wired.com.