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
)A character vector of the name (label) for the players.
A character vector of pure strategies for Player 1 (row player). Required only when the players have discrete-choice strategies.
A character vector of pure strategies for Player 2 (column player). Required only when the players have discrete-choice strategies.
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.
The payoff of Player 2. See the explanation of
payoffs1 for detail.
A logical value. Set this TRUE to evaluate payoff
functions at some discrete values of strategies s1 and s2.
Default is FALSE.
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 c(6, 6), which shows equally spaced 6 values from the
range of the strategy par1_lim and par2_lim. Instead of
setting this parameter, you can specify arbitrary points to use by
setting s1 and s2.
A logical value. Set this TRUE when the payoffs for
two players are symmetric as in the prisoners' dilemma. Then, payoffs1 is
recycled for payoffs2. Default is FALSE.
A logical value. If TRUE, payoffs will be lined up by
row. Default is FALSE. Only used when both s1 and s2
are provided.
A character vector of parameters that are selected by players 1
and 2, respectively. Only used when payoffs1 and payoffs2
are specified as a function (either as a character string or as an R
function).
A numeric vector of length 2, which defines the range of parameters from which Player 1 chooses her strategy.
A numeric vector of length 2, which defines the range of parameters from which Player 2 chooses his strategy.
A named list of parameters contained in payoffs1 that
should be treated as constants, if any.
A named list of parameters contained in payoffs2 that
should be treated as constants, if any.
A named list of parameters contained in payoffs1
and payoffs2 that should be treated as constants, if any. If
cons1 and cons2 are exactly same, you can specify
cons_common instead of both cons1 and cons2.
An object of "sequential_form" class, which defines a sequential-form game (an extensive form game with a leader and a follower).
Create an object of 'sequential_form' class, which can be passed to functions in order to find solutions of the game.