compete: compete

Description Usage Arguments Value Author(s)

Description

Makes two agents play against each other a set number of rounds

Usage

1
2
compete(player1, player2, p1_params, p2_params, p1_hidden_states = NA,
  p2_hidden_states = NA, p_matrix, n_rounds = 10)

Arguments

player1

player 1's strategy function

player2

player 2's strategy function

p1_params

a list structure containing player 1's parameter values

p2_params

a list structure containing player 2's parameter values

p1_hidden_states

player 1's starting states, i.e. priors

p2_hidden_states

player 2's starting states, i.e. priors

p_matrix

a given 2-by-2 payoff matrix

n_rounds

number of rounds to compete

Value

A dataframe containing the two agents' choices, rewards and states, for each round

Author(s)

K. Enevoldsen & P. Waade


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