This is a Axelrod-type computer tournament where players play the iterated prisoner's dilemma against each other.
- Spring, 2024: GOB (submitted by Gracelynn Osei-Bosompem)
New strategies can be added as .R
files into the ./strategies
directory.
- The strategies should functions with the same name as the file (e.g., if the file name is
RANDOM.R
, the function's name should beRANDOM
) - The general signature of the function is
f(ego_past, alter_past, ...)
whereego_past
is the history of ego andalter_past
is the history of alter with- cooperation being coded as
1
and defection as0
- Currently, the only additional arguments passed via the
...
in theroundrobin.R
tournament-style are (although other arguments could be added as well)n_rounds
: total moves that are played between the playerscurrent_round
: which move the current one is
Other tournament structures can be added into the ./tournaments
directory (e.g., playing on a grid or network).
the_game
function defines prisoner's dilemmaroundrobin
Running the run.R
file will run the tournament. The current rules are
- each player plays against each other as well as a copy of themselves in a
n_rounds = 50
move iterated prisoners dilemma - the whole tournament is run
n_iter = 5
times to reduce stochastic variability - The payoff structure is:
- mutual cooperation: 3 points
- mutual defection: 1 point,
- temptation to defect: 5 points,
- sucker's payoff: 0
data.table (>= 1.14.9)