does_player_cooperate: Does 'player' cooperate with the other player on this round...

Description Usage Arguments Details Value

View source: R/game.R

Description

Does player cooperate with the other player on this round of the game?

Usage

1
does_player_cooperate(player, previous_round)

Arguments

player

tbl row of the player whose cooperation we are checking

previous_round

tbl of the previous round of the game

Details

Uses a version of forgiving tit-for-tat. Basic strategy is to copy the partner's previous move, but with a chance to change. Where the partner cooperated, players defect based on their sneakiness. Where the partner defected, players cooperate based on their forgivingness.

Value

logical of T = cooperate, F = defect


mjaquiery/silly-smile-sim documentation built on Nov. 21, 2020, 9:15 a.m.