When Olympic swimmer Michael Phelps steps onto a starting block a few days from now, a Stanford scientist named Krishna Shenoy will be asking himself a question: "What's going on in Michael Phelps' brain?"

Specifically, Shenoy would like to know what's happening in an area called the premotor cortex. This area doesn't directly tell muscles what to do. But it's the place where the brain gears up for something the body is about to do, like swimming.

In recent years, scientists who study the premotor cortex have found evidence that what it does can be quite complex. And a study just published in the journal Science suggests this part of the brain is involved in planning and strategy, and may even reflect a person's personality.

The premotor cortex isn't important for involuntary movements, like what we do when we accidentally touch a hot stove, Shenoy says. But it's critical for voluntary movements, especially complicated ones like the moving of your arms and legs in a way that carries you swiftly through the water, he says.

To learn more about how the brain prepares for this sort of movement, scientists at Washington University in St. Louis did an experiment involving two monkeys playing a virtual reality game.

The goal was to reach out and touch a virtual target, says Daniel Moran, one of the authors of the study. But in order to earn a reward, he says, the monkeys had to wait for a moment after they saw the target but before they started reaching for it.

What's going on in their premotor cortex at that moment is probably similar to what's happening in Michael Phelps' brain just before he hears the starting buzzer, Shenoy says.

It's also related to what happens in the brains of athletes who consciously visualize a great performance as a way to prepare for an event, says Donald Crammond of the University of Pittsburgh Medical Center.

Scientists can only speculate about what's happening to individual brain cells in people. But Moran and his colleague Thomas Pearce were able to monitor the activity of brain cells in the two monkeys.

And what those brain cells did changed dramatically depending on whether the virtual reality game offered the monkeys an unobstructed path to the target, or placed an obstacle in their way, which required them to think of a way to reach around the obstacle.

When the monkeys saw an obstacle, their brain cells began to keep track of much more information, Moran says. Instead of just remembering simple things like which direction to reach, the cells got involved in higher level questions like what the larger goal was and which strategy was most likely to achieve that goal.

"The more difficult it got, the more information the neurons would encode," Moran says.

That was one important finding. But the study also suggested something remarkable: activity in the premotor cortex reflected each monkey's personality.

While training the monkeys, it became clear that one was impulsive and a bit hyperactive, Pearce says, while the other was more patient and deliberate. And during the experiment, activity in their brain cells was consistent with those traits, he says.

"The patient monkey waited until all the information was known to him in order to form a plan," Pearce says. "The impatient monkey on the other hand planned on moving straight to the target as soon as the target showed up on the screen and only later would change his plan if the obstacle got in the way."

It may seem odd to think that brain cells involved in extending an arm could reveal something about an individual's personality. But that's not a crazy idea, says Shenoy. The brain often uses the same approach for high-level tasks as for simple ones, he says

"So the strategy you might adopt in reaching may be somehow reflective of the strategy you might adopt when making an investment or choosing a purchase or deciding whom to marry?"

Copyright 2016 NPR. To see more, visit http://www.npr.org/.