Researchers have come a step closer to gaining complete control over a mind, even if that mind is smaller than a grain of sand. A team at Harvard University has built a computerized system to manipulate worms—making them start and stop, giving them the sensation of being touched, and even prompting them to lay eggs—­by stimulating their neurons individually with laser light, all while the worms are swimming freely in a petri dish. The technology may help neuroscientists for the first time gain a complete understanding of the workings of an animal’s nervous system.

The worm in question, Caenorhabditis elegans, is one of the most extensively studied organisms in biology: investigators have completely mapped and classified its cells, including its 302 neurons and the 5,000 or so connections among them. But science still does not know exactly “how neurons work together in a network,” says Andrew Leifer, a graduate student in biophysics at Harvard. For example, how does the worm coordinate its 100 or so muscles to relax and contract in a wave pattern as it swims?

To find out, Leifer and his collaborators genetically engineered the one-millimeter-long nematode worm to make particular cells in its body sensitive to light, a technique developed in recent years called optogenetics. Because the worm’s body is transparent, sharply focused lasers, pointed with an accuracy of 30 microns, could turn on or suppress individual neurons with no need for electrodes or other invasive methods. Leifer placed a microscope on a custom-built stage to track the worm as it swam around in a d­ish. He also wrote software that analyzed the microscope’s images to locate the target neurons, then pointed and fired the lasers accordingly. The journal Nature Methods published the results on its Web site (Scientific American is part of Nature Publishing Group).

Other teams have used optogenetics to control individual neurons on immobilized worms. But to understand the organism’s physiology, Leifer says, it is necessary to manipulate it as it swims freely. He and his co-workers were able to show, for example, that during swimming, motor signals move down the body through muscle cells themselves as well as through nerve connections.

Leifer thinks the technique could someday help scientists create complete simulations of the organism’s behavior. “We hope to be able to make a computational model of the entire nervous system,” he says. In a way, that would be like “uploading a mind,” though a rudimentary one.