Are you envious of other people's success, homes, or spouses? Turns out you might have the most common personality type. According to a new study, nearly 90 percent of the population can be divided into one of four basic personality types: optimistic, pessimistic, envious, and trusting. The largest group is envious, with 30 percent, while the other groups each are 20 percent, at least according to a computer algorithm.

For the study, researchers assigned 541 participants to partners in order to decide random payoffs in the face of a particular social dilemma, Science Daily reported. For example, in one scenario, the goal is to hunt an animal. Together, two are able to hunt deer, while only one person can hunt rabbits if left alone. According to the behavior theory adopted for the games, the envious person hunts rabbits knowing they will either be equal to or better than the other hunter. An optimist hunts the deer, focusing on the big reward. Pessimists also will hunt the rabbits because they are almost guaranteed to catch something, and the trusting group will hunt deer because they will work together with the other hunter to catch it.

Following the experiment, researchers created a computer algorithm to distinguish people into different groups based on their responses to the dilemmas. As for the remaining 10 percent, the algorithm was unable to classify these participants to a particular group based on their actions. This type of investigation into human behavior is part of game theory, a branch of math which looks at conflict and cooperation when people have to make decisions around certain problems,

"The results go against certain theories; the one which states that humans act purely rationally for example, and, therefore, they should be taken into consideration in redesigning social and economic policies, as well as those involved in cooperation," said Yamir Moreno, an author of the study.

The Barcelona City Council and the Barcelona Citizen Science Office organized an experiment — which the study is based off — through a local festival featuring different games, Science Daily reported.

“One of main principles of this study is the fact that the experiment has been developed in such a way to encourage the participation of citizens within the framework of one of the city's public activities,” Josep Perellό, coordinator of the Barcelona Citizen Science Office and researcher for the study, told Science daily.

After the results were collected from the algorithm, Perellό says they were shared with the participants for them to become “active participants in the research.” The study was conducted by researchers at Universidad Carlos III de Madrid and published in the journal Science Advances.

Read More: How Long Will I Live? Personality Type Influences Physical Health, Life Span

Poncela-Casasnovas J, Gutiérrez-Roig M, Gracia-Lázaro C, Vicens J, Gόmez-Gardeñes J, Perelló J, Moreno Y, Duch J, Sánchez A. Science Mag. 2016.