Usage Format Value Fields Methods Author(s) Examples
1 |
R6Class
object.
R6Class
object with methods for running an Axelrod-like
tournament.
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.
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.
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.