Prisoner's Dilemma Visualized
The prisoner's dilemma is a popular example of game theory. If you don't know it yet, it's hard to understand this visualization. Check out an introduction first, like the formidable game of trust by Nicky Case or the original book The Evolution of Cooperation by Robert Axelrod.
A class of short-memory strategies called zero-determinant first described by Press & Dyson in 2012 has given the game renewed attention, all of which is wrapped up very nicely in an article by Brian Hayes for the American Scientist. This site visualizes the result matrix of these new strategies against old classics in what is called stochastic iterated prisoner's dilemma, an endless series of games. You can change the input strategies at the bottom or visualize your own result matrix.
No | Strategy | ⌀ Get | ⌀ Give | Ratio | Wins |
---|
Every row in this textbox represents one player with a short-memory strategy for stochastic iterated prisoner's dilemma and is separated in 5 "columns" by commas like in a CSV file. The first column is the name of the strategy while the other four represent likelihoods (value 0-1) of cooperation depending on the last encounter: cc, cd, dc, dd. First if both players cooperated last move (cc), second if the player was betrayed (=defected) last move (cd), third if the player betrayed his opponent last move (dc) and fourth if both players betrayed each other (dd). Thus a player with the strategy 1/2, 1/2, 1/2, 1/2 choses completely randomly.
Depending on the average of these four likelihoods a strategy can be described as generous (average > 1/2 meaning it's willing to cooperate even if it was betrayed) or selfish (average < 1/2 meaning it's willing to defect even if it wasn't betrayed), which is reflected by the players' colors in the chord diagram. The chord's color indicates the winner, if it's light grey it's a tie.
Play around and see how the removal or duplication of players changes the ranking! Or add a new player, like a masochist, who incentivizes being defected: "Masochist, 0, 1, 0, 1"
Standard payoff matrix / Traditional payoff matrix (negative values indicate years in prison)
> > >Calculated result matrix (basis for visualization)
Get (rows) / Give (columns) |
Additional literature
- First description of ZDGTFT-2: Extortion and cooperation in the Prisoner’s Dilemma, Stewart and Plotkin, 2012
- Nice discussion: Zero-Determinant Strategies in the Iterated Prisoner’s Dilemma, Mike Shulman, 2012
- Interactive round for round exploration of zero-determinant strategies: Press-Dyson Interactive (currently down but archived here)
This textbox gives you the opportunity to enter and visualize your own result matrix. Every row in this textbox represents one player and is separated in multiple "columns" by commas like in a CSV file. For n rows there have to be n+1 colums because every player has to have a name and one payoff value for the encounters with every player including himself. The example dataset is from the original computer tournement of Robert Axelrod from 1980 (paywall).