Scientists have created a virtual model of the brain capable of daydreaming.

The goal of the study was to better understand why certain portions of the brain work together when a person's mind wanders or is idle. Knowing this, according to the researchers, will one day help doctors better diagnose and treat brain injuries.

"We can give our model lesions like those we see in stroke or brain cancer, disabling groups of virtual cells to see how brain function is affected," senior author Dr. Maurizio Corbetta, a professor of neurology, said in a press release. "We can also test ways to push the patterns of activity back to normal."

The computer model is based on the dynamics of brain cells and the many connections those cells make with their neighbors and with cells in other regions of the brain. It was developed and tested by an international team of scientists, including the Washington University School of Medicine where Corbetta teaches.

Scientists first recognized in the late 1990s and early 2000s that the brain stays busy even when it's not engaged in mental tasks. Since then, researchers have identified several "resting state" brain networks, or groups of different brain regions, that have activity levels that rise and fall in sync when the brain is at rest. In addition, they have linked disruptions in networks associated with brain injury and disease to cognitive problems in memory, attention, movement and speech.

This new model was developed specifically to help scientists learn how the brain's anatomical structure contributes to the creation and maintenance of resting state networks. Once complete, the researchers began with a process for simulating small groups of neurons, including factors that decrease or increase the likelihood that a group of cells will send a signal.

"In a way, we treated small regions of the brain like cognitive units: not as individual cells but as groups of cells," said Gustavo Deco, professor and head of the Computational Neuroscience Group in Barcelona. "The activity of these cognitive units sends out excitatory signals to the other units through anatomical connections. This makes the connected units more or less likely to synchronize their signals."

Based on data from brain scans, researchers assembled 66 cognitive units in each hemisphere, and interconnected them in anatomical patterns similar to the connections present in the brain.

Next, they let it run, slowly changing the coupling, or the strength of the connections between units. Sure enough, at a specific coupling value the interconnections between units sending impulses soon began to create coordinated patterns of activity.

"Even though we started the cognitive units with random low activity levels, the connections allowed the units to synchronize," Deco said. "The spatial pattern of synchronization that we eventually observed approximates very well - about 70 percent - to the patterns we see in scans of resting human brains."

Though the model to simulate 20 minutes of brain activity took a cluster of powerful computers 26 hours of constant running, the scientists were ultimately able to simplify the mathematics to make it possible to run the model on a typical computer.

"This simpler whole brain model allows us to test a number of different hypotheses on how the structural connections generate dynamics of brain function at rest and during tasks, and how brain damage affects brain dynamics and cognitive function," Corbetta said.