sample_round: Sample round function

Description Usage Arguments Value

View source: R/sample_round.R

Description

This funciton simulates a sequence of rounds of a game played between two selected agents.

Usage

1
sample_round(agents, foc_agent, opp_agent, pay, rounds = 100)

Arguments

agents

A list of agents, two of which will play the game

foc_agent

The index of the first agent that will play the game

opp_agent

The index of the second agent that will play the game

pay

A vector of the payoffs for CC (payoffs[1]), CD (payoffs[2]), DC (payoffs[3]) and DD (payoffs[4]) combinations of play choices from the focal player and the opponent

rounds

The number of rounds that the agents will play the game

Value

round_hist The history of the game played between both agents


gamesGA documentation built on March 26, 2020, 6:57 p.m.