View source: R/sequence_plot.R
sequence_plot | R Documentation |
Plot a gameplay sequence between 2 strategies.
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")
)
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. |
A ggplot object showing two strategies playing.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.