Today, I was mulling over the statistics behind “Guess My Number”. For those few who are not familiar with the game, a random number between 1 and 100 (inclusively) is chosen, and the player guesses what the number is. He is told if his guess is too high or too low. The idea is to have the smallest number of guesses.
Now, granted, this is not much of a game, but it does have all of the elements of a game, and so is good for studying games.
So, I was thinking about the statistics of it. The “best” strategy for playing is to divide the current possibility space into two sections in order to eliminate the most numbers from subsequent guesses. So, the first guess would be 50, followed by 25 or 75 (depending on the status of 50), and so on, subdividing the remaining possibilities into two until the final number is guessed.
This can be trivially formulized with logarithms…. the average number of guesses should be around log 100/log 2, or about 6.6. Empirical evidence seems to support this idea, as most number are guessed in either 6 or 7 guesses, unless the player “gets lucky” with the number being 50, 25, 75, or the other early on numbers.
I realized today that I cannot discount those “lucky” numbers, and so I figured out the following:
There is 1 number that will always be guessed in 1 move (the number 50).
There are 2 numberst that will always be guessed in 2 moves (25 and 75).
Similarly there are 4 numbers guessed in 3, 8 numbers guessed in 4, 16 numbers guessed in 5, 32 numbers guessed in 6, and the remaining 37 numbers (to make 100 total) are guessed in 7.
Add these probabilities up in an excel spreadsheet:
1 x 1 guess = 1 guess
2 x 2 guesses = 4 guesses
4 x 3 guesses = 12 guesses
8 x 4 guesses = 32 guesses
16 x 5 guesses = 80 guesses
32 x 6 guesses = 192 guesses
37 x 7 guesses = 259 guesses
Total guesses = 580 guesses.
Divide by 100 numbers = 5.8 guesses/number.
So, we find that the actual average score is 5.8, which is 0.8 guesses less than the prediction from the logarithm approximation.
This analysis has also shed light on an important aspect of this game: why it isn’t fun.
Basically, your score at Guess My Number is wholly dependent on the number chosen randomly, provided that the player is using a deterministic strategy. The player has a 1% chance of winning on the first move. The second move he has a 1 divided by whatever numbers are left, and so on.
So, this makes the game a complete game of chance. You might as well take a die and roll it, and whatever you roll is the score. Beyond picking a binary search deterministic strategy, there is no method of improving score due to skill/technique development.