Turtle Tournaments

In a turtle tournament each turtle picks a random neighbor and plays a mutual dilemma game with him.

In a mutual dilemma game two players, A and B, are presented with a mutual dilemma. Each must choose one of two options: fight or flee, cooperate or defect, hold 'em or fold 'em, etc. The choice may be based on strategy and history, but is made without knowing the opponent's choice.

After the choices are made, each player is awarded points based on the game's payoff matrix:

Payoffs

B

FALSE

TRUE

A

FALSE

a1/b1

a2/b2

TRUE

a3/b3

a4/b4

The a3/b3 entry indicates that if A chooses TRUE and B chooses FALSE, then A receives a3 points and B receives b3 points.

A turtle's fitness is simply the sum of all of his payoff points.

Examples of Mutual Dilemma Games

Chicken

Coordination

Battle of the Sexes

Prisoner's Dilemma

Implementation

When a turtle is updated, he randomly picks a nearby turtle and plays a game with him:

to play-game-with [candidate]
  let my-choice choice? candidate
  let candidate-choice [choice? myself] of candidate
  update-attributes candidate my-choice candidate-choice
end

The choice can be based on knowledge of the candidate's history and the strategy used by the active turtle. For now the choice is random:

to-report choice? [candidate]
  report (random 2) < 1 ; for now
end

The update-attributes procedure updates the executor's fitness, number of games played, and history (i.e., candidate's choice).

The payoffs are global variables:

globals [
  payoff-a1   ; payoff for A if A & B chose TRUE
  payoff-a2   ; payoff for A if A chooses TRUE and B FALSE
  payoff-a3   ; payoff for A if A chooses FALSE and B TRUE
  payoff-a4   ; payoff for A if A & B choose FALSE
  payoff-b1   ; payoff for B if A & B chose TRUE
  payoff-b2   ; payoff for B if A chooses TRUE and B FALSE
  payoff-b3   ; payoff for B if A chooses FALSE and B TRUE
  payoff-b4   ; payoff for B if A & B choose FALSE
]

Prisoner's Dilemma (PD) Tournaments

In a PD tournament, turtles are constantly playing PD with each other. They make their choice—to cheat or cooperate—based on some strategy.

PD Strategies