Description
Prisoner's dilemma
(The iterated prisoners' dilemma).
Here, we are looking for the best strategies in the iterated prisoner's dilemma. The world consists of some number of beings. Each being uses one and the same strategy during its existance. Each season each being competes with one other being during some random number of iterations (rounds). After season some amount of worst beings die. They are replaced with equal number of new beings which (if no mutations) inherit strategies of the best beings. Turnover rate means a fraction of beings replaced after season. Mutation rate means a fraction of new beings which receive other strategy than inherited from the best beings.
Main code is in ga-jquery.js file. To add new strategies you have to edit strategies.js file. In strategies object, each key is the name of strategy and corresponds to function which must return 1 (cooperate) or 0 (defect). This.memory refers to the memory of being. Memory is array of previous decisions of opponent. Index 0 points on the most fresh decision.
Settings
Editor
Simulation
Statistics
Lefthand column shows the pairs of beings and their results: points and amounts of each outcome appearance (DD, DC, CD, CC). Middle column shows the number of points each being has. Righthand column shows the number of beings for each strategy.