Getting to the bottom of understanding how our brains work is a fascinating challenge for scientists, and new research promises to shed more light on the inner workings of our minds - through a complex mathematics model. Scientists in the UK say they've constructed "the first biologically realistic mathematical model" that matches the way the brain makes complex decisions.

Not only can this model predict behaviour, it's also capable of predicting actual neural activity too. It simulates the way the human mind goes through the decision-making process, as well as the ways in which we learn from our mistakes and adapt for the future. The team's findings could eventually help us in better understanding a multitude of conditions, from obsessive compulsive disorder to Parkinson's disease.

"Constructing these sorts of models is difficult because the model has to plan for all possible decisions at any given point in the process, and computations have to be performed in a biologically plausible manner," said one of the team, Johannes Friedrich from Columbia University. "But it's an important part of figuring out how the brain works, since the ability to make decisions is such a core competence for both humans and animals."

Friedrich and his colleagues focused their research on goal-based decisions (such as reacting to a closed road on your daily commute) to habit-based decisions (commuting to work as normal with no interruptions). While plenty of research has been done on habit-based decisions, goal-based decisions are harder to study because there are so many variables that need to be weighed up.

The intricate mathematical algorithm written by the researchers was compared to experimental data and accurately captured behavioural choice probabilities as well as predicting choice reversal (a hallmark of complex decision-making). The model shows how a network of neurons, when connected in a certain way, identifies the best decision in any given situation, as well as the future cumulative reward.

Significantly, the model also demonstrates how synapses can adapt and reshape themselves depending on what has or hasn't worked in the past - this is the same behaviour we see in humans and animals every day. The researchers found that in goal-based decision-making, synapses connecting the neurons together 'embed' the knowledge of how situations follow on from one another, depending on the actions chosen and the immediate rewards.

"What I also find exciting is that figuring out how the brain may be doing it has already suggested us new algorithms that could be used in computers to solve similar tasks," said one of the researchers, Máté Lengyel.

The team's findings have been published in the Journal of Neuroscience.