Humans have big brains because we are judgmental of others, scientists say.

Researchers at the Cardiff University say that constant comparison between ourselves and other people and deciding whether or not to cooperate with them has worked the brain hard and expanded its size.

According to the research team, which includes evolutionary psychologist Robin Dunbar from the University of Oxford, those who prefer to help out others who are at least as successful as themselves evolve more.

"Our results suggest that the evolution of cooperation, which is key to a prosperous society, is intrinsically linked to the idea of social comparison - constantly sizing each up and making decisions as to whether we want to help them or not," Roger Whitaker, professor at Cardiff University's School of Computer Science and Informatics and lead author of the study, said in a press release.

In the study, which was published in Scientific Reports, the researchers used computer modeling to run simulations or "donation games" where participants had to decide whether or not to donate to another player, based on how they judged their reputation.

The researchers found that people were more likely to be generous to those with reputations as good as their own, or those who are better than themselves. If a person was judged as generous, participants tend to give more to that person.

Humans have the largest cerebral cortex among all mammals relative to the brain size. The cerebral cortex houses the cerebral hemispheres, which are responsible for functions such as memory, thinking and communications.

According to the scientists, being judgmental to other people when it comes to generosity has been influential to human survival, and that the complexity of this behavior has been such a difficult task that it causes the brain's size to expand over many generations.

"According to the social brain hypothesis, the disproportionately large brain size in humans exists as a consequence of humans evolving in large and complex social groups," Dunbar said in a statement.

"Our new research reinforces this hypothesis and offers an insight into the way cooperation and reward may have been instrumental in driving brain evolution, suggesting that the challenge of assessing others could have contributed to the large brain size in humans."

The research team said that the findings could have implications in the development of artificially intelligent and autonomous machines that need to interact with other robots, as these machines should "self-manage their behavior but at the same time cooperate with others in their environment," Whitaker said.