Optimal Consistent Guessing in Bulls and Cows
A simple Bulls and Cows solver always guesses the smallest remaining possible secret. What should it guess if it wants to finish in the fewest turns on average? We solve the decision tree under the rule that every guess must still be a possible secret. With four distinct decimal digits the optimal total is 26,688 guesses over 5,040 secrets when a leading zero is allowed, and 23,620 over 4,536 secrets when it is forbidden. An eleven-secret position shows why the guess leaving the fewest candidates on average can take longer to finish. In a 216-secret position, reuse of solved states, symmetry and lower bounds reduce the number of guess evaluations from 94,765,680 to 34,531 while selecting the same guess. We give exact averages through length four and bounds through length ten. In a separate four-digit experiment with no leading zero, allowing probes outside the remaining candidates yields a playable strategy costing 23,499 guesses.
Authors
- Mingon Kim
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-26
- DOI
- https://doi.org/10.5281/zenodo.24541919
- Primary Topic
- Artificial Intelligence in Games
- Type
- preprint