Description Usage Arguments Value
This function assesses the fitness of each strategy through the use of a sequential game between each focal strategy and a fixed number of random opponents.
1 | get_fitness(history, agents, payoffs, num_opponents, rounds, useC)
|
history |
A table of all possible prior moves of agents in sequence |
agents |
A list of agents whose fitness will be assessed |
payoffs |
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 |
num_opponents |
The number of random opponents to match the focal agent against |
rounds |
The number of rounds that will be played |
useC |
A TRUE or FALSE value that determines whether or not c will be called to calculate agent fitnesses |
fitness A vector in which elements correspond to the accumlated fitness (payoffs) of each agent
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.