Description Usage Arguments Value Examples
This function takes the probabilities of winning the game after each turn, the vector returned by markov_chain()
and calculates the probability that the game will be won BY each turn. This is essentially the derivative of the graph of
number of turns versus the probability of winning the game after each turn. The function calculates the difference between each
two consecutive entries in the input vector, multiplied by 100, and returns a vector of the probabilities of winning by each turn.
The vector returned by this function can be graphed versus the number of turns, and the index of the maximum value is the turn that
a player has the greatest chance of winning on. In the case of the default board, for example, players have the highest chance of winning on turn 19.
1 | finish_game_chance(probabilities, tau = turns)
|
probabilities |
The probabilities of winning the game after each turn. This is the vector returned by the function |
tau |
The number of iterations, or turns. Must be the same as the value used in |
A vector of the probability of that the game will be won at each turn.
1 | finish_game_chance(probabilities = markov_chain(), tau = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.