In the 1940s, the Nobel prize–winning neurobiologist Roger Sperry performed some of the most important brain surgeries in the history of science. His patients were newts.

Sperry started by gently prying out newts’ eyes with a jeweler’s forceps. He rotated them 180 degrees and then pressed them back into their sockets. The newts had two days to recover before Sperry started the second half of the procedure. He sliced into the roof of each newt’s mouth and made a slit in the sheath surrounding the optic nerve, which relays signals from the eyes to the brain. He drew out the nerve, cut it in two, and tucked the two ragged ends back into their sheath.

If Sperry had performed this gruesome surgery on a person, his patient would have been left permanently blind. But newts have a remarkable capacity to regrow nerves. A month later Sperry’s subjects could see again.

Their vision, he wrote, “was not a blurred confusion.” When he dangled a lure in front of one of the newts, the creature responded with a quick lunge. It was a peculiar sort of lunge, though: The animal looked up when the lure was held below and down when it was dangled overhead. Sperry had turned the newt’s world upside down.

The experiment revealed that nerve cells, or neurons, possess a tremendous capacity for wiring themselves. Neurons grow branches known as dendrites for receiving signals, and sprout long outgrowths called axons to relay the signals to other neurons. Axons in particular can travel spectacular distances to reach astonishingly precise targets. They can snake through the brain’s dense thicket, pushing past billions of other neurons, in order to form tight connections, or synapses, with just the right partners.

The neurons in the eyes of Sperry’s newts regrew their axons, eventually linking up to neurons in the vision-processing region of the brain. Evidently the axons from the eyes were able to find the same parts of the brain that they had been linked to before the surgery. The only difference was that the post-operation eyes delivered inverted images, because the eyes had been rotated but the neuronal connections that they made unfolded as normal﻿.

Six decades of research have made clear that Sperry’s newts were not unusual. All animals have nervous systems that wire themselves together with great precision. In humans this process starts in the womb, when the first neurons begin to develop. Their axons can go great distances, the longest ones extending all the way from the toes to the base of the spine. Even after our brains have developed, some neurons continue to wire themselves: Nerves heal from small injuries, and axons make new connections as we develop new skills.

When neurons fail to wire correctly, our bodies and brains go awry in many ways. About one in a thousand babies is born with a disorder called Duane syndrome, in which the nerves controlling the eye muscles send some of their axons to the wrong destinations. Axons that are supposed to grow into the muscle on the eye’s inner edge may end up on the outer edge instead. When people with this syndrome try to turn an eye inward, they send a message to the muscle on the inside edge to contract. But the same message also goes to the muscle on the outside edge. Both muscles pull at the same time, yanking the whole eye back into its socket.

Inside the brain, the results of bad wiring can be even more devastating. Normally, 200 million axons cross from each hemisphere of the brain to the opposite side. In a disorder called agenesis of the corpus callosum (agenesis meaning “lack of development”), many axons cannot find their way out of their own hemisphere. Instead, their axons curl together into large bundles. People with this form of agenesis have trouble moving information from one hemisphere to the other. They end up with a lot of autism-like symptoms: They have a hard time understanding figurative language and inferring what other people are thinking, for example.

To better treat wiring disorders, scientists are trying to understand how neurons form circuits. But almost 70 years after Sperry’s newt surgery, the wiring question remains one of the deepest mysteries in neuro­science. One reason why is that the wiring problem is actually a series of problems, each of which our neurons may solve in several ways.

The first order of business for new nerve cells is finding where, among the 100 billion neurons of the nervous system, their partners are waiting. They do so by following a chemical trail. The tip of the axon, called a growth cone, senses chemicals drifting by. Responding to these cues, the axon grows like a vine toward attractive chemicals and away from repellent ones. The chemical cocktail has a different flavor from one part of the body (or brain) to the next.

The nervous system further directs these wandering axons by placing guide cells along their path. Some guide cells release navigational chemicals. Others become part of the path itself, as migrating axons grab the cells and climb them like ropes. Guide cells even babysit axons that arrive at a destination early, before a partner cell is available to connect. Without a viable partner the axon would die; the guide cells form temporary synapses with the axons until the intended target is found.

The final stage of neural wiring is in many ways the most enigmatic. When an axon reaches the correct part of the brain, it needs to choose among the many neurons there. A few tricks that aid the process have been uncovered by University of Tokyo neuroscientist Akinao Nose, who has studied fly embryos. For a fly to be able to control its body, each muscle segment must be wired to a particular motor neuron﻿. Nose wondered: How does the M12 neuron attach to the M12 muscle segment but not, say, to M13 next door?

In a paper published last year, Nose reported that the muscle cells advertise their differences. The muscle cells in the M13 segment are covered with a protein called Toll. M12 muscle cells are Toll-free. Nose hypothesized that the Toll proteins on M13 cells provide a signal that tells the M12 neuron to stay away. As a test, he and his colleagues modified the cells in the M12 muscle segment so that they manufactured Toll. Sure enough, the M12 neuron made fewer synapses on the Toll-studded M12 segment. When Nose shut down the Toll gene in M13 muscle cells, the M12 neuron started wiring itself to those cells instead.

Other signals prevent neurons from attaching to themselves. UCLA neuroscientist Larry Zipursky discovered this self-avoidance mechanism by studying a fly gene called DSCAM1. When Zipursky shut down the gene, axon branches in individual neurons all took the same path. With the gene turned on, the axons took different paths toward other neurons. Apparently, DSCAM1 enabled neurons to distinguish their own axon branches from those of other neurons. Zipursky found that each neuron reads only certain portions of the DSCAM1 gene, producing specific proteins as a result. Since different neurons ignore different parts of the gene, DSCAM1 can produce more than 19,000 different proteins. With each neuron containing dozens of such proteins, the set of identity markers is essentially unique﻿.

The team determined that DSCAM1 proteins on the surfaces of two axons will latch together if they match up—that is, if they are two parts of the same cell. The branches then undergo a chemical reaction that causes them to pull apart.

In the wake of Zipursky’s discovery, scientists are beginning to search for analogous identity proteins in humans and other mammals. A strong candidate is a group of proteins called proto­cadherins. Like DSCAM1, these molecules sit on the surface of mammal neurons. Mammals carry dozens of protocadherin genes. When protocadherin proteins are expressed variably, there can be at least 12,000 combinations, or tags, in all.

When scientists genetically engineer mice without the genes, the animals end up with a range of neurological disorders. In the most severe cases, so many neurons die that the mice fetuses don’t survive till birth. Other protocadherin mutations are milder but just as intriguing. For instance, axons lose their way from the mouse’s nose to the brain. For now, though, such anomalies remain no more than tantalizing clues. Scientists have yet to prove that protocadherins help mammal neurons avoid self-wiring.

Back when Roger Sperry first twisted newt eyes and discovered how precisely neurons could wire themselves, he struggled to make sense of what he discovered. He decided that neurons had to be able to recognize their partners. “The cells and fibers of the brain and [spinal] cord must carry some kind of individual identification tags,” he wrote in 1963. Sperry could tell that the idea had serious problems: “The scheme requires literally millions, and possibly billions, of chemically differentiated neuron types.”

As it turns out, neurons do seem to have identification tags, but the job they perform is the precise opposite of what Sperry imagined: avoiding the wrong connections rather than seeking out the right ones. The latest research suggests that the strategy the neurons use is also not nearly as sophisticated as Sperry hypothesized. Biology is remarkably economical, it seems. A collection of shortcuts turns the challenge of wiring 100 trillion connections into a job so simple that even a bunch of wandering cells can do it﻿.