The Minimum Strategy and the Strongest Strategy of the Number Guessing Game MOO


We calculated a fixed strategy that minimizes the average number of guesses (minimum strategy) for the number-guessing game MOO by exhaustive search. And we presented this research at the 3rd Game Programming Symposium (1996/9/20-22, Hakone).

MOO is a popular number-guessing game that has been called by various names such as Hit & Blow, Cow & Bull. The rules of the game are as follows.

We used exhaustive search to find the fixed strategy that minimizes the average number of guesses and the strongest strategy to play this game.

To calculate those strategies, we used the following techniques.

The search program for estimating the lower bound of the total number of questions for a given set of MOO numbers is divided into estimate.c (when 10 different numbers appear in the set) and estimate_n.c (when there are 10 different numbers in the set) and estimate_n.c (in other cases).

The program to find the minimum question strategy is find_sol.c . The total number of questions (for all 5040 inputs) with the minimum question strategy is 26274, so the average number of questions is 5.213. Although this is a small improvement over the best strategy reported before this study, with a total number of 26347 questions (average number of questions 5.226), it is significant that it proves that there is no strategy with a smaller number of questions.


The minimum strategy obtained using this program is answer.all. The source files of a Java MOO player programs using the minimum question strategy are moo.java and mootable.java .

The program to find the fixed strategy that maximizes the win rate for the minimum question strategy is find_sol_next.c. The resulting strategy is different from the minimum-question strategy, but it is the strongest strategy among the fixed strategies (no strategy has a winning ratio greater than 0.5 against this strategy). This strongest strategy is n-answer.all.

find_sol.c and find_sol_next.c" use the common header file hit.h.


References

ktanaka _at_ ecc.u-tokyo.ac.jp