Skip to content

JamosW/prisoners_dilemma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Iterated Prisoners Dillemma in R

A prisoners dillemma simulation in R using R Shiny. This Shiny app is an extensible reproduction of the computer tournaments ran by Robert Axelrod as outlined in his book The Evolution of Cooperation. It primarily serves as a visualization tool and something to just have a little fun with.

In life there are many instances of prisoners dilemma's that one will encounter, examples include

  1. Finding and maintaining a romantic partner in your life
  2. Steroids use in sports
  3. The job market

How to escape the prisoners dilemma

  1. Threaten the other player wtih a punishment for not playing in your favor
  2. Make a promise/commitment to the other player prior to the game
  3. Telling the other player what your future choice will be
  4. Run away

How to promote cooperation

These are direct quotes from the book (chapter 7):

  1. Enlarge the shadow of the future
  • Mutual cooperation can be stable if the future is sufficiently important relative to the present. This is because the players can each use an implicit threat of retaliation against the other's defection-if the interaction will last long enough to make the threat effective.
  1. Change the payoff
  • Large changes in the payoff structure can transform the interaction so that it is no longer even a Prisoner's Dilemma.
  1. Teach people to care about each other
  • An excellent way to promote cooperation in a society is to teach people to care about the welfare of others.
  1. Teach reciprocity
  • TIT FOR TAT may be an effective strategy for an egoist to use, but is it a moral strategy for a person or a country to follow?
  1. Improve recognition abilities
  • The ability to recognize the other player from past interactions, and to remember the relevant features of those interactions, is necessary to sustain cooperation.

Test out the app here

About

A prisoners dillemma simulation in R using R Shiny

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages