Skip to content
Omnikalc

Prisoner's dilemma calculator: what payoff should you expect?

Enter the four payoffs, each player's chance of cooperating and the number of rounds to get the expected payoffs and to compare cooperating with defecting.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

%

Value out of range

%

Value out of range

Value out of range

Results

Your expected payoff per round

1.620

The other player's expected payoff per round
3.120
Your expected total over all rounds
16.20
Your payoff per round if you always cooperate
1.200
Your payoff per round if you always defect
2.600
Is it a true prisoner's dilemma?
1
Yes, T > R > P > S and 2R > T + S

Two prisoners are each offered a deal, and the best choice for each seems to be betraying the other, yet both would be better off staying silent. This prisoner’s dilemma calculator takes the four payoffs, each player’s chance of cooperating and the number of rounds to give your expected payoff per round, the other player’s payoff, your expected total, the value of always cooperating or always defecting, and whether the payoffs are a true dilemma.

How the calculation works

  • Your expected payoff = P(both cooperate) × R + P(you cooperate, the other defects) × S + P(you defect, the other cooperates) × T + P(both defect) × P, with each probability the product of the two players’ chances.
  • The other player’s payoff swaps the roles of S and T: they receive T when you cooperate and they defect, and S when you defect while they cooperate.
  • Always cooperate = q × R + (1 − q) × S, and always defect = q × T + (1 − q) × P, where q is the chance that the other player cooperates.
  • A true prisoner’s dilemma needs T > R > P > S, so that defecting is the best reply to anything, and 2R > T + S, so that cooperating is better than taking turns.

Example

With payoffs T = 5, R = 3, P = 1, S = 0, you cooperate 70% of the time and the other player 40%. Your expected payoff per round is 0.28 × 3 + 0.42 × 0 + 0.12 × 5 + 0.18 × 1 = 1.62, and the other player’s is 0.28 × 3 + 0.42 × 5 + 0.12 × 0 + 0.18 × 1 = 3.12. Over 10 rounds you expect 16.2. Against a player who cooperates 40% of the time, always cooperating is worth 0.4 × 3 = 1.2 per round and always defecting is worth 0.4 × 5 + 0.6 × 1 = 2.6. The payoffs form a true dilemma.

Why it matters

The dilemma is the basic model of cooperation in game theory, economics, politics and biology, from price wars to arms races and shared resources. Computing expected payoffs with mixed strategies shows why defecting is tempting and how much a group loses when everyone follows it.

Good to know

The model assumes that players choose independently and that each round is the same, and it ignores memory, reputation and learning, which are central to strategies such as tit for tat in repeated games. Payoffs are treated as utility, and in real life people also care about fairness and the future. The result is an expected value, and actual outcomes vary from round to round.

The expected value calculator weighs outcomes by their probability, and the probability calculator handles the chances that feed into the model.

Frequently asked questions

What is the prisoner's dilemma?

It is a game in which two players each choose to cooperate or to defect. Defecting pays more whatever the other does, yet when both defect they end up worse off than if both had cooperated. The payoffs are named temptation T, reward R, punishment P and sucker S, and a true dilemma has T > R > P > S.

Why is there also the condition 2R > T + S?

In a repeated game, two players could take turns defecting against a cooperating partner and share the temptation and sucker payoffs. If the average of T and S were larger than R, that would beat steady cooperation, and the game would no longer be a dilemma about cooperation. The condition rules this out.

What do the probabilities mean?

Each player is assumed to cooperate in a round with the probability you enter, independently of the other. This describes mixed strategies and also the average of a large group. A player who always cooperates has 100%, and one who always defects has 0%.

What are the classic payoffs?

The standard numbers are T = 5, R = 3, P = 1 and S = 0. Other textbooks use years in prison, in which case the payoffs are negative. The calculator accepts negative payoffs and any real values, and the check tells you whether the order of the four numbers makes a dilemma.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.