EVO-2x2

This applet requires Java 1.4.1 or higher. You may obtain the latest Java plugin from Sun's Java site.


created with NetLogo
view/download model file: EVO-2x2.nlogo

OVERVIEW OF THE MODEL

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:

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.

PARAMETERS

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.

Population parameters

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

infinite-strategies?: This is a binary variable that is either on or off.
  • If on, the set of possible values of the variables PC, PC/C, and PC/D is any (floating-point) number between 0 and 1.
  • If off, the set of possible values of PC, PC/C, and PC/D is determined by the value of num-strategies. num-strategies is the number of different values that each of these variables (PC, PC/C, and PC/D) can take. The actual possible values are i/(num-strategies-1) for i = 0, 1, ... , num-strategies-1.
  • 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 and Payoffs

    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.

    Pairing settings

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

    Evolutionary forces

    selection-mechanism: This parameter determines the algorithm used to create the new generation. There are four possible options: 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.

    DISPLAYS

    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.