The expected value of the game is positive regardless of Ballmer’s strategy
Steve Ballmer's number guessing game has a negative expected value, but John Graham-Cumming argues it can be positive with random choices. A mixed strategy can improve outcomes, yielding average wins of $0.12 and $0.07.
Read original articleThe discussion centers around a brain teaser posed by Steve Ballmer, where players guess a number between 1 and 100, with varying monetary outcomes based on their guesses. Ballmer argues against playing the game, claiming that the expected value is negative due to the potential for many losing numbers and the possibility of him choosing numbers that prolong the guessing process. However, John Graham-Cumming counters that if Ballmer selects numbers randomly, the expected value is actually positive at $0.20. The article further explores game theory strategies, suggesting that employing a mixed strategy—using various guessing patterns—can mitigate losses and potentially yield a positive expected value for every number. The author presents a mathematical optimization approach to find a winning mixed strategy, which involves linear programming. The resulting strategy includes specific probabilities for different binary search patterns, ultimately leading to an average win of $0.12 when Ballmer chooses randomly and $0.07 against an adversarial selection. The conclusion suggests that if a player values a small average win, they might consider participating in the game with Ballmer.
- Steve Ballmer's brain teaser involves guessing a number with varying monetary outcomes.
- John Graham-Cumming argues that the expected value of the game is positive if numbers are chosen randomly.
- A mixed strategy using different guessing patterns can improve expected outcomes.
- The author employs linear programming to derive a winning strategy.
- The average win per game is $0.12 against random choices and $0.07 against adversarial choices.
Related
HAMURABI.BAS and Its Dystopian Lessons
The article explores the game HAMURABI.BAS from 1973, highlighting financial and political lessons. Strategies involve resource management, disaster response, and controlled starvation for wealth. Automated testing led to a 99% win rate, emphasizing wise investments and strategic decisions in the game.
Professional Poker Players Know the Optimal Strategy but Don't Always Use It
Professional poker players balance game theory optimal strategies with exploitative play to outsmart opponents. AI advancements challenge traditional approaches, pushing players to blend defensive and aggressive tactics for competitive success in evolving poker dynamics.
Is Steve Ballmer the Most Underrated CEO of the 21st Century?
Steve Ballmer, former Microsoft CEO, is reconsidered as underrated. Criticized during his tenure, he showed revenue growth, launched Xbox and Skype, and chose successor Satya Nadella. Ballmer's strategic decisions benefited Microsoft long-term.
Finding Nash equilibria through simulation
The article describes Python programs that find and visualize Nash Equilibria in simultaneous games, tailored for different matrix sizes, emphasizing their educational value in understanding game theory concepts.
Steve Ballmer's incorrect binary search interview question
Steve Ballmer's interview question about a guessing game has been criticized for miscalculating expected value. Analysis shows the game's expected value is positive, highlighting the importance of accurate calculations in game theory.
- Many commenters emphasize the importance of considering tail risk and survival in decision-making, suggesting that expected value alone may not be sufficient.
- Several users propose alternative strategies, such as Monte Carlo simulations and random offsets, to improve outcomes against Ballmer's approach.
- There is skepticism about the validity of the game as a meaningful interview question, with some questioning its practical application in real-world scenarios.
- Comments highlight the potential for Ballmer to manipulate the game by changing his number or choosing non-integer values, complicating the guessing strategy.
- Overall, the conversation reflects a mix of mathematical analysis and critique of the interview process in tech, with some humor about the improbability of winning against someone of Ballmer's wealth.
Steve Ballmer's incorrect binary search interview question - https://news.ycombinator.com/item?id=41434637 - Sept 2024 (240 comments)
Ballmer's argument is essentially about tail risk. Expected value is absolutely not a good way to make bets if you value survival, because you only get one shot. Same reason you wouldn't go all in every time you get a poker hand that's "expected" to win. Because you'll (very probably) be bankrupt in a few hands.
Sure the mean is +$0.07 or whatever, but the spread on that surely goes over the 0 line. So there may well be marginally more chance of winning than losing, on average, but you're only gonna get one outcome. So if the goal is to play to win, or else, then you probably shouldn't unless you like owing Ballmer money.
What would be more interesting is to monte carlo simulate this strategy and look at the win/loss distribution. Presumably the choice is then not so clear cut.
If you're allowed to play the game a few trillion times or so, then by all means bleed him dry :P
I feel like there's an even simpler proof that you can beat adversarial-ballmer, with exactly the same expected positive outcome as binary search vs random ballmer.
I call my algorithm "randomly offset binary search". It goes like this:
1. Pick a random number between 0-100, call this 'offset'
2. Perform the binary search algorithm, except at each step add 'offset' to the value and mod by 100.
That's it. Now, even if Ballmer knows you're using this strategy, he can't make it perform any worse by selecting any specific number. Therefore your expected outcome is still $0.20 per game, beating the strategy proposed in this blog post.
This looks right. Good work!
This is a very nice book covering mixed strategy in game theory.
A very nice motivating example from the book: "There are two cards, an ace and a deuce. Player A draws either of the two at random; B does not see which card is drawn. If A has drawn the ace, he says "I've got the ace" and demands a dollar from his opponent. If A has drawn the deuce, then he may either (A1) say "I've got the ace" and demand a dollar from his opponent or (A2) confess that he has got the deuce and pay his opponent a dollar. The opponent, if he is paid the dollar voluntarily, can only accept it. If, however, a dollar is demanded from him, then he may either (B1) believe that player A has got the ace and give him the dollar or (B2) demand a check so as to see whether A's statement is true or not. If it is found that A does have the ace, B must pay A two dollars. If, however, it is found that A is bluffing B and has the deuce, player A pays B two dollars. Analyze the game and find the optimal strategy for each player and the expected payoff."
People are unable to think randomly. They'll avoid the obvious "not random" numbers 2 and 99, for example. I read somewhere that most people, asked to pick a number between 0 and 10, will pick 7. And the next digit would probably be odd, and not 5, because 5 is not random. That leaves you with 71, 73, 77 and 79. 77 is not random, so 71, 73 or 79. I'd pick 73 as my first guess.
I'd say those were good odds!
(That's why when you're picking a "random" number, it's best to use an actual dice.)
This is how you win at hammer-paper-scissors, too.
Ballmer could also change the number he's thinking of as you make guesses, so part of the game would be guessing what he's thinking.
I guess this is part of the clarifications one normally asks when in an interview setting, but he has specified numbers and not integers. One could choose (pi*2)/2 and you will owe a lot of money.
https://docs.google.com/spreadsheets/d/e/2PACX-1vThljkK2nUIL...
I find it interesting: it is definitely symmetrical, but I did not expect that in the final result 1/98 could be more important as a starting value, while 2-17/82-97 are not used at all.
You can get the EV a lot closer to the optimal +0.2 (Although I was unable to prove how close) by dropping the requirement "do not increase worst-case complexity for the binary search" as this is lost with initial guesses outside 36-64 anyway. Deviating at a higher depth makes punishing specific guesses in the tails a lot cheaper, only giving up 1-2 cents of EV.
Otherwise it is a hidden mutable information game where Ballmer dynamically changes higher/lower for maximum tree depth and always make you lose.
Huh? I have 100 - (1+2+4+8+16+32) = 100 - 63 = 37, where 2^i numbers can be guessed after exactly i wrong guesses plus one correct guess.
- nowhere it says he has to choose whole number, he could choose fractions (55.25) or even irrational like PI. Number of questions can be infinitive.
- nowhere it says, he may not change his number while the game runs.
You pay upfront for each question, and you hope game is not somehow rigged. It is not just question of algorithms.
Also money you win is a taxable income, payments for hazard are not taxable expenses...
Related
HAMURABI.BAS and Its Dystopian Lessons
The article explores the game HAMURABI.BAS from 1973, highlighting financial and political lessons. Strategies involve resource management, disaster response, and controlled starvation for wealth. Automated testing led to a 99% win rate, emphasizing wise investments and strategic decisions in the game.
Professional Poker Players Know the Optimal Strategy but Don't Always Use It
Professional poker players balance game theory optimal strategies with exploitative play to outsmart opponents. AI advancements challenge traditional approaches, pushing players to blend defensive and aggressive tactics for competitive success in evolving poker dynamics.
Is Steve Ballmer the Most Underrated CEO of the 21st Century?
Steve Ballmer, former Microsoft CEO, is reconsidered as underrated. Criticized during his tenure, he showed revenue growth, launched Xbox and Skype, and chose successor Satya Nadella. Ballmer's strategic decisions benefited Microsoft long-term.
Finding Nash equilibria through simulation
The article describes Python programs that find and visualize Nash Equilibria in simultaneous games, tailored for different matrix sizes, emphasizing their educational value in understanding game theory concepts.
Steve Ballmer's incorrect binary search interview question
Steve Ballmer's interview question about a guessing game has been criticized for miscalculating expected value. Analysis shows the game's expected value is positive, highlighting the importance of accurate calculations in game theory.