k_ToM: The k-ToM function

Description Usage Arguments Value Author(s) References

Description

The full k-ToM function. First it first updates level probability, choice probability, parameter and gradient estimates. Then it calculates the estimated choice proability of the opponent, and calculates its own choice probability in response. The function also contains the simpler 0-ToM strategy, which only updates opponent's choice probability, and reacts.

Usage

1
2
3
k_ToM(params = "default", hidden_states, player, level = NULL,
  p_matrix, choice_self = NULL, choice_op = NULL,
  return_hidden_states = T)

Arguments

params

a list structure containing k-ToM's volatility parameter, the dummy variable which decides which parameter estimates are affected by volatility, and the behavioural temperature. If a string is inputted, default values are used.

hidden_states

the estimates from last round

player

k-ToM's player role, i.e. which side of the payoff matrix is used

level

k-ToM's sophistication level k

p_matrix

a given 2-by-2 payoff matrix

choice_self

k-ToM's choice from last round

choice_op

opponent's choice from last round

Value

A list structure containing k-ToM's choice and updated estimates

Author(s)

K. Enevoldsen & P. Waade

References

Devaine et al. (2014a, 2014b, 2017)


KennethEnevoldsen/SiRToM documentation built on May 28, 2019, 9:32 a.m.