seq_form | R Documentation |
seq_form()
defines a sequential-form game and creates an
object of "sequential_form" class.
seq_form(
players = NULL,
s1 = NULL,
s2 = NULL,
payoffs1,
payoffs2,
discretize = FALSE,
discrete_points = c(6, 6),
symmetric = FALSE,
byrow = FALSE,
pars = NULL,
par1_lim = NULL,
par2_lim = NULL,
cons1 = NULL,
cons2 = NULL,
cons_common = NULL
)
players |
A character vector of the name (label) for the players. |
s1 |
A character vector of pure strategies for Player 1 (row player). Required only when the players have discrete-choice strategies. |
s2 |
A character vector of pure strategies for Player 2 (column player). Required only when the players have discrete-choice strategies. |
payoffs1 |
The payoff of Player1. This argument can be specified in three different ways. First, it can be a numeric vector of payoffs. Second, it can be a character string of the payoff function (e.g., payoffs1 = "x^2 - y"). Third, it can be an R function of payoff. |
payoffs2 |
The payoff of Player 2. See the explanation of
|
discretize |
A logical value. Set this |
discrete_points |
A numeric vector of length 2 to set how many discrete
points should be used to discretize the game defined by payoff functions.
Default is |
symmetric |
A logical value. Set this |
byrow |
A logical value. If |
pars |
A character vector of parameters that are selected by players 1
and 2, respectively. Only used when |
par1_lim |
A numeric vector of length 2, which defines the range of parameters from which Player 1 chooses her strategy. |
par2_lim |
A numeric vector of length 2, which defines the range of parameters from which Player 2 chooses his strategy. |
cons1 |
A named list of parameters contained in |
cons2 |
A named list of parameters contained in |
cons_common |
A named list of parameters contained in |
Create an object of 'sequential_form' class, which can be passed to functions in order to find solutions of the game.
An object of "sequential_form" class, which defines a sequential-form game (an extensive form game with a leader and a follower).
Yoshio Kamijo and Yuki Yanai yanai.yuki@kochi-tech.ac.jp
g1 <- seq_form(
players = c("Leader", "Follower"),
s1 = c("R", "S", "P"),
s2 = c("R", "S", "P"),
payoffs1 = c(0, -1, 1, 1, 0, -1, -1, 1, 0),
payoffs2 = c(0, 1, -1, -1, 0, 1, 1, -1, 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.