sequence_plot: Plot a gameplay sequence between 2 strategies.

View source: R/sequence_plot.R

sequence_plotR Documentation

Plot a gameplay sequence between 2 strategies.

Description

Plot a gameplay sequence between 2 strategies.

Usage

sequence_plot(
  Focal = "ATFT",
  Partner = "ATFT",
  seed = 1234,
  n_rounds = 20,
  error_rate = 0.1,
  arb_error_rate_type_1 = 0.5,
  arb_error_rate_type_2 = 0.5,
  colors = c(No = "#ffeda0", Defect = "#440154FF", `Good Standing` = "#7fcdbb", `Bad
    Standing` = "black", Cooperate = "white", Yes = "#0c2c84")
)

Arguments

Focal

A strategy file to be used by the focal player. Name must match a legal function file: i.e., "ALLC", "TFT", "GTFT", "TFTA", etc.

Partner

A strategy file to be used by the partner player. Name must match a legal function file: i.e., "ALLC", "TFT", "GTFT", "TFTA", etc.

seed

A seed for the random number generator for reproducible plots.

n_rounds

Number of rounds to plot.

error_rate

The rate at which the computer introduces errors of the form C to D.

arb_error_rate_type_1

The arbitrators rate of failing to detect a real error.

arb_error_rate_type_2

The arbitrators rate of claiming an error was a true defection.

colors

Colors for the palette.

Value

A ggplot object showing two strategies playing.


ctross/PrisonR documentation built on July 1, 2024, 11:23 p.m.