get_2x2_game_solutions.Rd
Get 2x2 Nash equilibrium and first best
get_2x2_game_solutions(payouts, output = "solution")
payouts | List of payouts from get_2x2_payouts |
---|---|
output | Either "solution", "NE", "FB", or "dilemma", or "type". See Value section. |
The output
variable determines the type of output. The options are:
"solution"
: a payout tibble is returned that contains additional columns NE and FB
columns containing the solution.
"NE"
: the pure strategies where NE == 1 or 0.
"FB"
: the pure strategies where FB == 1.
"dilemma"
: whether the game is a "social dilemma" or "agreement".
"type"
: the payout structure for each player.
This function evaluates Nash stability by checking, for each combination of pure strategies, if any player is incentivized to change their strategy. The set of pure strategies can be stable (NE set to 1), neutral (NE set to 0), or unstable (NE set to -1). The first two (0 and 1) represent Nash equilibria. The first best solution is calculated as the set of pure strategies that product the highest net payout among all players (i.e., the sum for all players). A value of 1 indicates the set of pure strategies is a joint optimum, and 0 indicates it is not.
#> # A tibble: 4 x 12 #> A B tA tB Cs_A Cs_B Cd_A Cd_B UA UB NE FB #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 0 0 3 3 0 0 -3 -3 -3 -3 1 0 #> 2 0 1 3 3 0 -2 0 -3 0 -5 -1 0 #> 3 1 0 3 3 -2 0 -3 0 -5 0 -1 0 #> 4 1 1 3 3 -2 -2 0 0 -2 -2 -1 1# Note that this function is contained in get_2x2_ggplot, if desired get_2x2_ggplot(payouts, equilibria = TRUE)payouts_ii <- get_2x2_payouts(3, 1, Cs = 2, Cd = 3, TRUE) weights <- c(0.5, 0.5) weighted_payouts <- get_2x2_weighted_payouts(list(payouts, payouts_ii), weights = weights) get_2x2_game_solutions(weighted_payouts, "NE")#> [1] "A0B0"get_2x2_game_solutions(weighted_payouts, "FB")#> [1] "A1B0"get_2x2_game_solutions(weighted_payouts, "type")#> [1] "Dl-Pd"get_2x2_game_solutions(weighted_payouts, "dilemma")#> [1] "social dilemma"