The guess-a-number game starts with one player (the chooser) picking a number between 1 and 100 (inclusive) and secretly writing it down. The other player (the guesser) attempts to guess the number. After each guess, the chooser responds with “correct” (the guesser guessed the number and the game is over), “higher” (the actual number is higher than the guess), or “lower” (the actual number is lower than the guess).
What is the average number of guesses the guesser will need to find the number given that he uses the optimal, most efficient strategy?
I found that it will be 6 guesses $29/32$ times and 7 guesses $3/32$ times using the most clumsy method ever which I won't post. It can be no more than 7 since $2^7=124>100$.
It was like
$(100-1)/2 = 49.5, \\(49-1)/2 = 24, \\(50-1)/2 = 24.5 \\-> 24, 25 $
with 24 $3/4$ of the time and 25 $1/4$ of the time, etc etc etc.
What is a better way (since the method had so many opportunities for error I'm probably wrong anyway)?