ISLAMABAD: Moody people are often baffling to those of us with steadier emotions.

But scientists argue that changing moods – as seen in sulking teenagers, grumpy spouses, or bad-tempered parents - serve an important purpose.

Rather than being a weakness, they are nature's way of helping us adapt to an ever changing world.

Moods swings like sulking may be far more than an expression of our emotional state. They may also have helped us adapt to the changing world around us, say scientists

so when times are good and spirits are high, we take more risks at a time they are likely to be rewarded.

And when times are tough, sulking can help us conserve our energy.

Wearable technology can already track your steps, sleep and heart rate but in the future they could also be used to monitor your mood. 

Google Life Sciences recently hired leading mental health expert Dr Thomas Insel and in a recent interview he discussed plans for sensors 'that give you very objective measures of your behavior.'

These sensors could analyze a person's language for early signs of psychosis, monitor levels of anxiety, or encourage wearers to take clinical tests in order to measure mental health.

Dr Insel was previously director of the National Institute for Mental Health for 13 years. 

Speaking at Chicago Ideas Week, he said: 'Technology can have greater impact on mental healthcare than on the care for heart disease, diabetes, cancer or other diseases.  

'It could transform this area in the next five years.' 

To take a human example, a stock market trader who makes a successful deal becomes more optimistic about the outcome of his next transaction.

He is then likely to take more risks – as he becomes more optimistic things will go in his or her favor.

The increase in risk taking allows him to make maximum gains at a time when risk taking is most likely to pay off.

This holds true when a variety of different events have an underlying connection, the authors argue.

To take an example from the natural world, the authors suggest an animal's mood improves on finding a number of fruits in a tree.

Rather than assessing each tree individually, this good mood helps the animal to look at the big picture – and optimistically make it think fruits are in abundance.

This encourages the animal to climb up the neighbouring branch – where good conditions make it more likely that there will be a tasty fruit available.

It may be increased rainfall or sunshine has caused fruit to become more abundant, the authors suggest.