To use EVO-2x2, you will have to install NetLogo 5.3.1 (free and open source) and download the model itself. Unzip the downloaded file and click on EVO-2x2.nlogo

EVO-2x2 is a computer simulation modelling framework designed to formally investigate the evolution of strategies in 2-player 2-strategy (2x2) symmetric games under various competing assumptions.

In EVO-2x2, there is a population of *num-players* players. Events occur in discrete time-steps, which can be interpreted as successive generations. At the beginning of every generation every player's payoff (which denotes the player's fitness) is set to zero. Then, every player is paired with another player, according to some customisable procedure (*pairing-settings*), to play a 2-player match.

Each match consists of a number of sequential rounds (*rounds-per-match*). In each round, the two members of the pair play a symmetric 2x2 game once, where each of them can undertake one of two possible actions. These two possible actions are called cooperate (C) and defect (D). The action selected by each of the players determines the magnitude of the payoff that each of them receives in that round (*CC-payoff*, *CD-payoff*, *DC-payoff*, *DD-payoff*). The total payoff that a player obtains in a match is the sum of the payoffs obtained in each of the rounds.

Players differ in the way they play the match, i.e. they generally have different strategies. The strategy of a player is determined by three numbers between 0 and 1:

*PC*: Probability to cooperate in the first round.*PC/C*: Probability to cooperate in round*n*(*n*> 1) given that the other player has cooperated in round*n*- 1.*PC/D*: Probability to cooperate in round*n*(*n*> 1) given that the other player has defected in round*n*- 1.

Once every player has played one –and only one– match (except when the pairing mechanism is round robin, as explained below), two evolutionary forces (i.e. natural selection (*selection-mechanism*) and mutation (*mutation-rate*)) come into play to replace the old generation with a brand new one. Successful players (those with higher payoffs) tend to have more offspring than unsuccessful ones. This marks the end of a generation and the beginning of a new one, and thus the cycle is completed.

The value of every parameter in EVO-2x2 can be modified at run-time, with immediate effect on the model. This enables the user to closely interact with the model by observing the impact of changing various assumptions during the course of one single run.

*num-players*: Number of players in the population. This number is necessarily even for pairing purposes.

*set-initial-players*: This is a binary variable that is either *on* or *off*.

- If
*on*, every player in the initial population will have the same strategy, which is determined using the following parameters:*initial-PC*,*initial-PC/C*, and*initial-PC/D*. - If
*off*, the initial population of strategies will be created at random.

*rounds-per-match*: Number of rounds in a match.

*CC-payoff*: Payoff obtained by a player who cooperates when the other player cooperates too.
*CD-payoff*: Payoff obtained by a player who cooperates when the other player defects.
*DC-payoff*: Payoff obtained by a player who defects when the other player cooperates.
*DD-payoff*: Payoff obtained by a player who defects when the other player also defects.

This parameter (*pairing-settings*) determines the algorithm that should be used to form pairs of players. There are three different options:

*random pairings*: Pairs are made at random, without any bias. Every player plays one and only one match in a generation.*round robin*: Every player is paired with every other player once, so every player plays exactly (*num-players*– 1) matches per generation.*children together*: Players are paired preferably with their siblings (and at random among siblings). Once all the possible pairs between siblings have been made, the rest of the players are paired at random. Every player plays one and only one match in a generation.

*selection-mechanism*: This parameter determines the algorithm used to create the new generation. There are four possible options:

*roulette wheel*: This procedure involves conducting*num-players*replications, which form the new generation. In each replication, players from the old generation are given a probability of being chosen to be replicated that is proportional to their total payoff (which denotes their fitness).*Moran process*: In each time-step (i.e. generation), one player is chosen for replication with a probability proportional to its fitness. The offspring replaces a randomly chosen player (possibly its parent). Payoffs are set to zero at the beginning of every time-step.*winners take all*: This method selects the player(s) with the highest total payoff (i.e. the "winners"). Then, for*num-players*times, a random player within this "winners set" is chosen to be replicated. The*num-players*replications constitute the new generation.*tournament*: This method involves selecting two agents from the population at random and replicating the one with the higher payoff for the next generation. In case of tie, one of them is selected at random. This process is repeated*num-players*times. The*num-players*replications form the new generation.

*mutation-rate*: This is the probability that any newly created player is a mutant. A mutant is a player whose strategy (the 3-tuple formed by *PC*, *PC/C*, and *PC/D*) has been determined at random.

EVO-2x2 provides various displays. Some of these displays are time-series plots showing the historical evolution of the value of a particular variable throughout generations (e.g. frequency of outcomes and population average values of *fitness*, *PC*, *PC/C*, and *PC/D*), whereas others refer only to the last generation (e.g. population distributions of *fitness*, *PC*, *PC/C*, and *PC/D*).

The large square roughly in the middle of the screen is the 2D view. Players are represented in it according to two of the three values that define their strategy (i.e. *PC*, *PC/C*, and *PC/D*). The two represented variables are *PC/C* (horizontal axis) and *PC/D* (vertical axis). The cells in the background are coloured in shades of blue according to the number of players that have spent some time on them. Each player that has visited a certain part of the strategy space leaves a mark that is used to create this density plot. The more players who have stayed for longer in a certain area, the darker its shade of blue.

**EVO-2x2** is a computer simulation modelling framework designed to formally investigate the evolution of strategies in 2-player 2-strategy (2x2) symmetric games under various competing assumptions.

Copyright (C) 2006 Luis R. Izquierdo & Segismundo S. Izquierdo

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You can download a copy of the GNU General Public License by clicking here; you can also get a printed copy writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Contact information:

Luis R. Izquierdo

University of Burgos, Spain.

e-mail: lrizquierdo@ubu.es

This program has been designed and implemented by Luis R. Izquierdo & Segismundo S. Izquierdo.