sample_round {gamesGA}R Documentation

Sample round function

Description

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

Usage

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


[Package gamesGA version 1.1.3.7 Index]