| sim_learning | R Documentation | 
sim_learning() simulates learning dynamics in a
normal-form game expected by an experienced weighted attraction (EWA)
model.
sim_learning(
  game,
  n_samples,
  n_periods,
  type = "EWA",
  lambda = 1,
  delta = 0.5,
  rho = 0.5,
  phi = 0.5,
  A1_init = 0,
  A2_init = 0,
  N_init = 0,
  plot_range_y = NULL
)
| game | An object of  | 
| n_samples | A positive integer specifying the number of samples to be simulated. | 
| n_periods | A positive integer specifying how many times the game is played within each sample. | 
| type | A character string to tell which learning models should be
simulated. The available options are  | 
| lambda | A positive real value representing the players' sensitivity to
attraction values of strategies. As  | 
| delta | A real number between 0 and 1. This parameter controls how fast
attraction values of strategies that are not chosen are updated.  If
 | 
| rho | A real value between 0 and 1. This parameter controls the learning
speed.  | 
| phi | A real value between 0 and 1. This parameter controls how much
attraction values at the current period are constrained by the past
attraction values. If  | 
| A1_init | An initial value of Player 1's attraction for each strategy. | 
| A2_init | An initial value of Player 2's attraction for each strategy. | 
| N_init | An initial value of N. | 
| plot_range_y | Choose the range of vertical axis for plots. Available
choices are  | 
Simulate plays of a normal-form game defined by
normal_form() in a way expected by an EWA model.
A list containing (1) a list of data frames of strategies chosen by each player, (2) a single long data frame of (1)'s data frames combined, (3) a list of each player's attraction values for each strategy (data frames), (4) a list of probability of each strategy being chosen (data frames), and (5) a plot of the simulation result (ggplot object).
Yoshio Kamijo and Yuki Yanai yanai.yuki@kochi-tech.ac.jp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.