solve_efg | R Documentation |
solve_efg
finds solutions of an extensive-form game
defined by extensive_form()
.
solve_efg(game, concept = "backward", quietly = FALSE)
game |
An "extensive_form" class object created by
|
concept |
Solution concept to be used. It must be one of
|
quietly |
A logical value. If |
A list containing (1) user-specified solution concept (either
backward induction or spe), (2) sols
: a list of solutions, if any,
(3) n_sols
: the number of solutions found, and (4) trees
: a
list of game trees each of which shows which paths were played under
each solution.
Yoshio Kamijo and Yuki Yanai yanai.yuki@kochi-tech.ac.jp
g1 <- extensive_form(
players = list("Kamijo",
rep("Yanai", 2),
rep(NA, 4)),
actions <- list(c("U", "D"),
c("U'", "D'"), c("U''", "D''")),
payoffs = list(Kamijo = c(0, 2, 1, 3),
Yanai = c(0, 1, 2, 1)))
s1 <- solve_efg(g1)
g2 <- extensive_form(
players = list("f",
c("m", "m"),
rep(NA, 4)),
actions = list(c("ballet", "baseball"),
c("ballet", "baseball"), c("ballet", "baseball")),
payoffs = list(f = c(2, 0, 0, 1),
m = c(1, 0, 0, 2)),
show_node_id = FALSE)
s2 <- solve_efg(g2, quietly = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.