Tournament: Tournament Class

Usage Format Value Fields Methods Author(s) Examples

Usage

1

Format

R6Class object.

Value

R6Class object with methods for running an Axelrod-like tournament.

Fields

type

The tournament type ("onetime" or "repeated").

players

A list of the different Player object competing in the tournament.

payoff

A 2x2 payoff matrix of the tournament.

nreps

The number of replications of the tournament.

nrounds

The number of rounds in each replication of the tournament.

res

A data frame of the results of the tournament.

Methods

new(type, players, nreps, nrounds, payoff)

Create an object of clase Tournament.

type

A character string indicating the type of tournament to play: "onetime" for a single encounter tournament; "repeated" for a repeated encounter tournament (the default).

players

A named list of strategies to compete in the tournament.

nreps

A numerical value indicating the number of tournament replications to perform (default: 100).

nrounds

For repeated encounter tournaments only, a numerical value indicating the number of rounds of the tournament (default: 100).

payoff

A 2x2 matrix indicating the payoff received by the players as a function of their decision and of the decision of their opponent (default: matrix(c(3, 5, 0, 1), nrow = 2)). Here the first value indicates the payoff if both players cooperate; the second value is the payoff if the player defects and its opponent cooperates; the third value is the payoff if the player cooperates and its opponent defects; the fourth value is the payoff if both players defect.

play()

This method is used to run the tournament.

Author(s)

Simon Garnier, garnier@njit.edu

Examples

1
# TODO

swarm-lab/axelRod documentation built on May 30, 2019, 9:34 p.m.