von Neumann Model of Poker
1. The von Neumann Model
Now we will explore the von Neumann model of poker, which has been noteworthy for advancing the application of game theory to poker.2. Uniform Random Variables
Rather than utilize actual cards, the von Neumann model stipulates that each player's hand is a random draw from a uniform 0 1 distribution. This means, roughly, that any real-numbered value between 0 and 1 is equally likely to occur. We can simulate this here using the runif function in R, where the only argument we need to specify is n, since the default values of min and max are already what we want, 0 and 1. Evaluating which player wins is as simple as determining who has the higher value. Here, that is Player A.3. Betting under the von Neumann model
However, the von Neumann model takes it one step further than this. Wagering occurs as follows. Player B first observes their value and decides whether to wager one dollar or not. If it is wagered, the two players compare their values and the higher value wins. Otherwise, no money is won or lost by either player. Since Player B has all of the decision-making power, it stands to reason that Player B has the advantage. Let's explore this further.4. The ifelse function
Previously, we have used if and else statements separately. An alternate approach is to use the ifelse function, which is particularly useful when the only thing that occurs as a result of the condition is the output of a single value. When using the ifelse function, the order of arguments is as follows: the condition to evaluate, followed by what to do if it is true, followed by what to do if it is false. Consider this example, where we first evaluate whether x is greater than 0. In the first case, since this condition is true, the result is the square root of x, or 2. In the second case, the condition is not true, so we do not take the square root of negative 4. Instead, the final statement is run, which negates x so that the two negatives cancel out and then takes the square root of the positive value.5. The mean function, revisited
Previously, we used the mean function to estimate a probability from a vector of TRUE and FALSE. We can also use it to estimate an expected value. Recall that the expected value is the true mean of the quantity of interest. Here, we will use the mean function to calculate an estimate of the expected value based on a set of simulated values. Using mean on such a set will calculate the arithmetic average, which is an estimate of the expected value.6. Your turn!
Let's do it.Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.