If you’re an optimist, you probably believe that humanity is inherently cooperative and willing to sacrifice for the greater good of all. If you’re a pessimist, chances are you believe that, in the end, people will always do what is in their own interests.

But if you’re Martin Nowak, you believe that the truth is: It’s a matter of context.

A professor of mathematics and of biology and director of the Program for Evolutionary Dynamics, Nowak is the senior author of a new study that finds, across repeated interactions, the environment that individuals find themselves in can affect whether they act as partners or rivals. The study is described in a recently published paper in the journal Nature Human Behavior.

“Direct reciprocity is one of the main theories to explain cooperation among humans,” Nowak said. “It’s been studied for at least 50 or 60 years, but work over the last six years has allowed for a completely new look at this idea.

“What we’re studying here is the emergence of so-called partner and rival strategies,” he continued. “If you consider all strategies of direct reciprocity, a very small subset of them are either partners or rivals, but evolution always leads to one or the other.”

To understand how different strategies can emerge, Nowak and colleagues Christian Hilbe and Krishnendu Chatterjee, both from the Institute of Science and Technology in Austria, began with a classic paradigm from game theory, namely the prisoner’s dilemma.

The game works like this: When faced with the chance to interact, two individuals must decide whether to cooperate or defect. If both cooperate, both receive a reward. If one person defects while the other chooses to cooperate, the defector collects a larger reward, while the other person gets nothing. If both defect, both receive a reward, albeit one that is smaller than the reward for cooperation. If players behave in a purely logical fashion, the best strategy is to defect, because it is in their self-interest to try to maximize their reward.

“If you play the game once, there’s no easy way to reach cooperation, because people, if they’re rational, will always defect,” Nowak said. “But if you play the game multiple times, there is a possibility of cooperation. If you defect against me in the first round, then I might defect against you in the next round, so you might realize that it’s better to cooperate.”

While that realization might seem to push players toward cooperation, the partner strategy is not one where players simply cooperate all the time, Nowak said.

“It’s more complicated than just cooperating,” Nowak said. “If I am playing a partner strategy, I will always start with cooperation, and as long as you cooperate, I will always cooperate. But the question is: What do I do if you start to defect?”

People playing a partner strategy can’t simply keep cooperating. If they did, it would be easy for other players to exploit them. While partners may retaliate by defecting, they are also willing to return to cooperation in later rounds, Nowak said.

“If I’m playing a partner strategy, the best thing for you to do is cooperate with me all the time,” Nowak said. “If you deviate from that, you could get more than me, but you cannot get more than the payoff you would get for cooperating.”

The rival strategy, by comparison, is all about putting yourself first.

“If I play a rival strategy, I never allow that you have more than me,” Nowak said. “That’s unacceptable … so you start with defection, and you always defect if the other player defects.

“The interesting observation is that natural selection always chooses either partners or rivals,” Nowak said. “If it chooses partners, the system naturally moves to cooperation. If it chooses rivals, it goes to defection, and is doomed. An approach like ‘America First’ embodies a rival strategy which guarantees the demise of cooperation.”

In addition to shedding light on how cooperation might evolve in a society, Nowak believes the study offers an instructive example of how to foster cooperation among individuals.

“With the partner strategy, I have to accept that sometimes I’m in a relationship where the other person gets more than me,” he said. “But I can nevertheless provide an incentive structure where the best thing the other person can do is to cooperate with me.

“So the best I can do in this world is to play a strategy such that the other person gets the maximum payoff if they always cooperate,” he continued. “That strategy does not prevent a situation where the other person, to some extent, exploits me. But if they exploit me, they get a lower payoff than if they fully cooperated.”

This research was supported with funding from the European Research Council, Graph Games, the Austrian Science Fund, Rigorous Systems Engineering/Systematic Methods in Systems Engineering, the Office of Naval Research, and the John Templeton Foundation.