eipd
simulate the ecological iterated Prisoner's Dilemma
eipd -help
or
eipd [-steps integer] [-rounds integer] [-seed integer]
[-CC double] [-CD double] [-DC double] [-DD double]
[-Iallc double] [-Itft double] [-Irand double]
[-Ipav double] [-Ialld double] [-rcp double]
[-noise double]
Simulates the ecological iterated Prisoner's Dilemma over time according to the specified parameters. At every time step the population of each strategy is calculated as a function of the expected scores earned against all strategies weighted by the populations of the opponents. Possible strategies include “Always-Cooperate,” “Always-Defect,” “Random,” “Pavlov,” and “Tit-for-Tat.”
The ecological iterated Prisoner's Dilemma is simulated over time according to the specified parameters. At every time step the population of each strategy is calculated as a function of the expected scores earned against all strategies weighted by the populations of the opponents. Possible strategies include 'Always Cooperate,' 'Always Defect,'
Payoffs
The payoff matrix for the Prisoner's Dilemma game is usually expressed as: Player B's Move +-----------+-----------+ Player A's Move | cooperate | defect | +-----------+-----------+-----------+ | cooperate | CC, CC | CD, DC | +-----------+-----------+-----------+ | defect | DC, CD | DD, DD | +-----------+-----------+-----------+
where the table entries are (A's payoff, B's payoff) and CC, CD, DC, and DD are the reward, sucker, temptation, and punish payoffs, respectively. For each of these four outcomes you will probably want the payoffs to reflect the relationships:
(DC > CC > DD > CD) and ((CD + DC) / 2 < CC).
Miscellany
random noise (via the -noise option) manifests itself as a cell making a randomly selected move in a single round. In this case, both the cell whose action was altered as well as that cell's opponents "remember" what the random move was on the next round.
During each time step, every strategy plays against every other strategy as well as against itself.
The initial population levels for all strategies will be normalized, so the scaling of the option values is irrelevant.
Bugs
No sanity checks are performed to make sure that any of the options make sense.
Options
-steps | Number of steps to simulate. | 100000 |
-rounds | Number of rounds per step. | 10 |
-seed | Random seed for initial state. | 0 |
-CC | Reward Payoff. | 3.0 |
-CD | Sucker Payoff. | 0.0 |
-DC | Temptation Payoff. | 5.0 |
-DD | Punish Payoff. | 1.0 |
-Iallc | Initial population of All-C. | 0.2 |
-Itft | Initial population of TFT. | 0.2 |
-Irand | Initial population of Random. | 0.2 |
-Ipav | Initial population of Pavlov. | 0.2 |
-Ialld | Initial population of All-D. | 0.2 |
-rcp | Probability of C for Random strategy. | 0.5 |
-noise | Probability of noise. | 0.0 |