New Issue: Orbital Catastrophe Ahead? Read Now

Scientists Make ‘Cyborg Worms’ with a Brain Guided by AI

AI and tiny worms team up to get to treats

Illustration of a finger that looks like a worm, looking at a red apple

Thomas Fuchs

Join Our Community of Science Lovers!

Scientists have given artificial intelligence a direct line into the nervous systems of millimeter-long worms, letting it guide the creatures to a tasty target—and demonstrating intriguing brain-AI collaboration. They trained the AI with a methodology called deep-reinforcement learning; the same is used to help AI players learn to master games such as Go. An artificial neural network, software roughly modeled on biological brains, analyzes strings of actions and outcomes, extracting strategies for an AI “agent” to interact with its environment and achieve a goal.

In the study, published in Nature Machine Intelligence, researchers trained an AI agent to direct one-millimeter-long Caenorhabditis elegans worms toward tasty patches of Escherichia coli in a four-centimeter dish. A nearby camera recorded the location and orientation of every worm’s head and body; three times per second the agent received this information for the previous 15 frames, giving it a sense of the past and present at each moment. The agent could also turn on or off a light aimed at the dish. The worms were optogenetically engineered so certain neurons would become active or inactive in response to the light, sometimes prompting movement.

The research team tested six genetic lines in which the number of light-sensitive neurons ranged from one to all 302 the worms possessed. Stimulation had a different effect in each line, making the worm turn, for instance, or preventing it from turning. The scientists first collected training data by flashing lights randomly at the worms for five hours, then fed the data to the AI agent to find patterns before setting the agent loose.


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


With five of the six lines, including the line where all neurons responded to light, the agent learned to direct the worm to the target faster than if the worm had been left alone or the light had flashed randomly. What’s more, the agent and the worm cooperated: if the agent steered the worm straight toward a target but there were small obstacles in the path, the worm would crawl around them.

T. Thang Vo-Doan, an engineer at the University of Queensland in Australia, who has independently worked on cyborg insects, praised the work for its simple setup—reinforcement learning is flexible, and AI based on it can figure out how to perform complex tasks. According to Harvard University biophysicist Chenguang Li, the paper’s lead author, “one can easily see how it might be extended to harder problems.” Her team is now exploring whether their method can improve electrical deep-brain stimulation to treat Parkinson’s disease in humans by adjusting the voltage used and its timing. One day reinforcement learning plus implants might even give us new skills, Li says—artificial and real neural nets united.

Subscribe to Support Independent Journalism

Great science journalism requires human expertise, time, effort and creativity. And it costs money. That’s why I and the journalists here at Scientific American hope you’ll join our community.

When you subscribe, you are supporting staff and freelance journalists who are passionate about telling science stories that are true, important and compelling. Our editors and reporters are often experts in their fields, which means they understand the nuances of big discoveries and can untangle the breakthroughs from the hype. With a subscription, you are also supporting rigorous fact-checking to ensure the words we publish are precise and accurate. And you’re supporting original illustrations, graphics and photos that bring you closer to an advanced laboratory, an ice sheet in Antarctica or a space mission in orbit. You’re helping us craft other types of high-quality journalism as well: Our newsletters are carefully written, edited and curated by staffers you have or will come to know and love. Our Science Quickly podcast is based on original reporting, collaboration with editors and scientists and exacting production.

Subscriptions keep this engine running so we can continue to deliver thoughtful, rigorous and independent science journalism to you. In an era of viral misinformation, this work is crucial. If you value what we do, I hope you’ll consider joining us as a subscriber

Thank you,

Jeanna Bryner, Editor in Chief, Scientific American

Subscribe