PD: PD function

Description Usage Arguments Value

View source: R/fitness.R

Description

Returns the number of points (payoff) that a focal player accumlates from one round of a game with an opponent given a payoff vector given a decision "C" or "D" for each player

Usage

1
PD(a1_play, a2_play, payoffs)

Arguments

a1_play

The play choice of the focal player (0 or 1)

a2_play

The play choice of the opponent player (0 or 1)

payoffs

A vector of payoffs (length = 4) to the focal player as a consequence of both players playing 0 (payoffs[1]), the focal player only playing 0 (payoffs[2]), the focal player only playing 1 (payoffs[3]), and both players playing 1 (payoffs[4])

Value

fitness The payoff to the focal player (points accumulated from the interaction)


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

Related to PD in gamesGA...