It’s question that has been puzzling neuroscientists for nearly a century: How do patterns of activity in neurons generate behavior? In other words, how does nerve activity in living things, from insects and snails to humans, result in their coordinated movements?

Thanks to work by a team of researchers that included Carey Priebe, a professor in the Department of Applied Mathematics and Statistics, the answer is closer than ever before.

Working with researchers at the Howard Hughes Medical Institute and Duke University, and using genetic tools, optogenetics and machine learning algorithms, Priebe and the team identified the brain neurons that result in every kind of movement made by fruit fly larvae. This, experts say, opens the possibility that scientists will eventually be able to build a similar neuron-behavior “atlas” in humans, connecting nerve activation not only with movements, but also with emotions and even thoughts.

The team targeted specific neurons in the nervous systems of more than 1,000 different genetic lines of fruit flies and then stimulated them, recording the behavior that resulted. The behavior was documented by thousands of hours of video, showing how almost 40,000 larvae wiggling, hunching and backing up, among other movements. This produced a very large data set to be tackled by Priebe, who used specially developed software to parse the enormous amount of data and sort it into 29 distinct behaviors. The result? A guide linking neurons with every movement larvae make.

The study was published in the April print edition of the journal, Science. A perspective piece on the research, published in the same edition, called the study “a technical, multidisciplinary tour de force.”