Hacker News new | ask | show | jobs
by wrvn 651 days ago
That approach would still leave you weak to always picking 1 or 100. Without proof, I believe the optimal guessing strategy would perform equal (on average) for every number, to not give the opponent any standout choice (common for optimal strategies, but not always the case). If my math serves me right, that would be an average of log2(100) = 6.64 guesses for any number, which would make you lose 0.64$ on average.
1 comments

Although upon further thinking, you could then sprinkle in some binomial searches to abuse the uniformity. So the -0.64$ is merely a lower bound.
You forget that the quick guesses bring you more than $1!

As the original article says, on average you can win $0.20. But that's indeed the upper bound if we speak of the adversarial number picking.