Playing Several Variants of Mastermind with Constant-Size Memory is not Harder than with Unbounded Memory
We investigate a version of the Mastermind game, where the codebreaker may only store a constant number of questions and answers, called Constant-Size Memory Mastermind, which was recently introduced by Doerr and Winzen. We concentrate on the most difficult case, where the codebreaker may store only one question and one answer, called Size-One Memory Mastermind. We consider two variants of the game: the original one, where the answer is coded with white and black pegs, and the simplified one, where only black pegs are used in the answer. We show that for two pegs and an arbitrary number of colors, the number of questions needed by the codebreaker in an optimal strategy in the worst case for these games is equal to the corresponding number of questions in the games without a memory restriction. In other words, for these cases restricting the memory size does not make the game harder for the codebreaker. This is a continuation of a result of Doerr and Winzen, who showed that this holds asymptotically for a fixed number of colors and an arbitrary number of pegs. Furthermore, by computer search we determine additional pairs (p, c), where again the numbers of questions in an optimal strategy in the worst case for Size-One Memory Mastermind and original Mastermind are equal.
KeywordsGame theory Logic game Mastermind Space complexity
- 1.Chen, S.T., Lin, S.S.: Optimal algorithms for \(2 \times n\) AB games–a graph-partition approach. J. Inform. Sci. Eng. 20(1), 105–126 (2004)Google Scholar
- 4.Doerr, B., Spöhel, R., Thomas, H., Winzen, C.: Playing mastermind with many colors. In: Proceedings of the 24th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2013), SIAM, pp. 695–704 (2013)Google Scholar
- 6.Doerr, B., Winzen, C.: Playing Mastermind with constant-size memory. In: Proceedings of 29th International Symposium on Theoretical Aspects of Computer Science (STACS 2012). Leibniz International Proceedings in Informatics (LIPIcs), vol. 14, pp. 441–452. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2012)Google Scholar
- 9.Erdős, P., Rényi, A.: On two problems of information theory. Magyar Tud. Akad. Mat. Kutató Int. Közl. 8, 229–243 (1963)Google Scholar
- 15.Knuth, D.E.: The computer as Mastermind. J. Recr. Math. 9(1), 1–6 (1976–1977)Google Scholar