Usage Format Value Fields Methods Author(s) Examples
1 |
R6Class object.
R6Class object with methods for running an Axelrod-like
tournament.
typeThe tournament type ("onetime" or "repeated").
playersA list of the different Player object competing
in the tournament.
payoffA 2x2 payoff matrix of the tournament.
nrepsThe number of replications of the tournament.
nroundsThe number of rounds in each replication of the tournament.
resA data frame of the results of the tournament.
new(type, players, nreps, nrounds, payoff)Create an object
of clase Tournament.
typeA character string indicating the type of tournament to play: "onetime" for a single encounter tournament; "repeated" for a repeated encounter tournament (the default).
playersA named list of strategies to compete in the tournament.
nrepsA numerical value indicating the number of tournament replications to perform (default: 100).
nroundsFor repeated encounter tournaments only, a numerical value indicating the number of rounds of the tournament (default: 100).
payoffA 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.
Simon Garnier, garnier@njit.edu
1 | # TODO
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.