View source: R/advantage_plot.R
advantage_plot | R Documentation |
Generate a plot of scaled evaluations (advantages).
advantage_plot(scores, style = "graph", scaling = "lichess")
scores |
A numeric vector of positional evaluations (in centipawns). |
style |
(Default = 'graph') A single-element character vector indicating the plot style. Allowed values are 'graph' for a traditional graph with axes, or 'infographic' to add a background gradient and remove the axes (similar to lichess.org). |
scaling |
(Default = 'lichess') A single-element character vector indicating how the plot should be scaled. Allowed values are 'none' to plot the data as is, 'lichess' to apply the same scaling function used by lichess.org, or 'regan' to apply the scaling function developed by Prof. Kenneth Regan at the University of Buffalo. |
Given a vector of positional evaluations (in centipawns), the results are scaled using a form of logistic scaling function (2 / (1 + exp(-0.004 * scores)) - 1) borrowed from lichess.org. This function downplays the impact of less-than-perfect play when one side is far ahead. The idea being that the player who is ahead may avoid moves that lead to material gain if those moves lead to complicated tactics. In such positions players often go for simple and solid moves that maintain a clear advantage. These types of moves aren't really blunders. Similarly, a player in a lost position may make moves designed to complicate the position and create chances for a comeback, even if the move objectively loses material with perfect play by the opponent. The scaled values are plotted vs. the number of half-moves.
A ggplot object of the plotted data.
time_plot()
to plot move time data.
game_summary_plot()
to plot move time and advantage data with a
table of game stats.
scores <- c(15, 5, 29, -94, 67, 76, 154, -31, 1000, 1000)
advantage_plot(scores)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.