Skip to content
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.
/ prisoners Public archive

Simulation of the Iterated Prisoner's Dilemma with several potential strategies

Notifications You must be signed in to change notification settings

tigressine/prisoners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

prisoners

This project simulated the Iterated Prisoner's Dilemma from Richard Dawkins's book The Selfish Gene. It was produced in a day on a whim, and therefore is not particularly polished. It's still fun though!

The simulator has several behavioral strategies, all located in the strategies.py file. Included strategies are as follows:

  • Random
  • Always Cooperate
  • Always Defect
  • Tit For Tat
  • Grudger
  • Exploiter
  • Burn The Bridge

Descriptions for each strategy can be found in the strategies file.

usage

To use, download with git and run the run.sh script. Use these commands:

git clone https://www.github.com/tgsachse/prisoners
cd prisoners
./run.sh

If you would like to adjust any of the simulation parameters, edit the constants located at the bottom of the game.py file.

About

Simulation of the Iterated Prisoner's Dilemma with several potential strategies

Topics

Resources

Stars

Watchers

Forks