Turtle Tournaments

Adaptation Lab

Adaptation.nlogo is an elaboration of Climbing Mount Enlightenment. In this example turtles play games with other turtles. Every turtle uses a strategy of the form:

If my opponent's moves on our last N games were X1, X2, ..., XN, then my move on our next game should be Y.

Note that this implies that turtles have memories.

Initially, strategies are random. In other words, there is no rational correlation between past and future. During the learning phase, however, a turtle selects a random neighbor with a better average score than it has, and copies this turtle's strategy. The copy is imperfect, though, as a random Xi is "accidentally" mutated with probability P.

Here's a screen shot:

2 x 2 Games

Turtles usually play 2 x 2 games, which are simplifications of the social and business strategies people use. For example, Chicken (see below) is the game played between competing vendors engaged in a price war: who will go the furthest. Coordination is the game played between competing vendors interested in establishing an industry standard: how to spontaneously agree without divulging secrets. Battle of the Sexes is the game played between collaborators with differing agendas: how to have my cake and eat it to. Prisoner's Dilemma is the game played between vendor and customer: to cheat or not to cheat. One can also think of examples from psychology, animal behavior, and political science.

A 2 x 2 game is specified by a payoff matrix:

              II
         0     |    1
  0  (p1, q1)  | (p2, q2)
I    ----------|-----------
  1  (p3, q3)  | (p4, q4)

The rows represent the possible decisions made by player I: 0 or 1, and the columns represent the possible decisions made by player II: also 0 or 1. The entries represent numeric payoffs. For example, the entry (p2, q2) indicates that if player I "plays" 0 and player II "plays" 1, then player I's "score" will be incremented by p2 and player II's score will be incremented by q2. There are 8 possible payoffs, hence there are 2^8 possible games. Most of them are the same, others are uninteresting. But a few are famous.

Famous 2 x 2 games

Prisoner's Dilemma (0 = defect, 1 = cooperate)

              II
         0     |    1
  0    (1, 1)  | (0, 5)
I    ----------|-----------
  1    (5, 0)  | (3, 3)

Chicken (0 = swerve, 1 = don't swerve)

              II
         0     |    1
  0    (1, 1)  | (1, 5)
I    ----------|-----------
  1    (5, 1)  | (0, 0)

Coordination (0 = swerve left, 1 = swerve right)

              II
         0     |    1
  0    (1, 1)  | (0, 0)
I    ----------|-----------
  1    (0, 0)  | (1, 1)

Battle of the Sexes (0 = go to game, 1 = go to ballet, I = husband, II = wife)

              II
         0     |    1
  0    (3, 2)  | (1, 0)
I    ----------|-----------
  1    (0, 1)  | (2, 3)

Iterated Prisoner's Dilemma

Iterated Prisoner's Dilemma (contained in ipd.nlogo) allows users to compare five strategies for the iterated prisoner's dilemma game.

Here's a screen shot:

When a turtle is updated he:

   1. plays one prisoner's dilemma (PD) game with a randomly selected neighbor
   2. takes several steps in a random direction

In a PD game each turtle decides to cooperate or defect according to the turtle's strategy. If both turtles cooperate, each receives 3 points. If both defect, each receives 1 point. If one cooperates while the other defects, then the defector receives 5 points and the cooperator receives 0 points. The points are added to the turtle's overall score.

Different breeds of turtles use different PD strategies. Defectors always defect, cooperators always cooperate, and impulsives randomly cooperate or defect. Reciprocators defect if their partner defected the last time they met, and cooperate otherwise. This is called the tit-for-tat strategy. To implement tit-for-tat, reciprocators are equipped with a 1-bit memory:

true = opponent cooperated last time,
false = opponent defected last time.

Models

Ethnocentric agents cooperate when the opponent has the same ethnicity, and cheat otherwise. Anthropocentric agents cooperate with everyone. Egocentric agents cooperate with no one (except themselves), and sell-outs cooperate when the opponent has different ethnicity, and cheat otherwise. Which strategy will dominate in an ethnically diverse population, and under what conditions? This question is explored in Models Library/Social Sciences/Ethnocentrism.