Problem 44630. Guess the number I'm thinking of (Part 1)
In this game you are competing against two other people to guess the number that I'm thinking of.
- I randomly choose an integer between one and ten (inclusive). I don't provide any clues about the number.
- Your first opponent tries to guess the number. They guess randomly.
- Your second opponent tries to guess the number. They also guess randomly.
- You try to guess the number. But you guess strategically.
- The winner is the person who guesses my chosen number, or the person who guesses closest to my chosen number. This represents a "win".
- If two contestants are equally close, they may share the win, with such a result being declared a "draw". (It is a loss for the remaining contestant.) A draw is worth half as much as a win.
Each person hears the guesses stated by any preceding competitors, so you will be aware of the two prior guesses (provided to you as the vector guessesOfOpponents). Moreover, each guess must be unique.
If everyone guessed randomly, each person should have an equal chance of winning.
It might seem that you're at a disadvantage, having the last opportunity to guess. But actually you have the advantage of extra knowledge.
By guessing strategically, you should be able to achieve a success rate of 45% or more, in which
success rate = (wins + draws/2) / games
Solution CommentsShow comments
Problem Recent Solvers45