Optimal Analyses for 3×n AB Games in the Worst Case

  • Li-Te Huang
  • Shun-Shii Lin
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6048)


The past decades have witnessed a growing interest in research on deductive games such as Mastermind and AB game. Because of the complicated behavior of deductive games, tree-search approaches are often adopted to find their optimal strategies. In this paper, a generalized version of deductive games, called 3×n AB games, is introduced. However, traditional tree-search approaches are not appropriate for solving this problem since it can only solve instances with smaller n. For larger values of n, a systematic approach is necessary. Therefore, intensive analyses of playing 3×n AB games in the worst case optimally are conducted and a sophisticated method, called structural reduction, which aims at explaining the worst situation in this game is developed in the study. Furthermore, a worthwhile formula for calculating the optimal numbers of guesses required for arbitrary values of n is derived and proven to be final.


Mastermind Strategy Optimal Analysis Hard State Apply Soft Computing Adversary Response 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Merelo-Guervos, J.J., Castillo, P., Rivas, V.M.: Finding a needle in a haystack using hints and evolutionary computation: the case of evolutionary MasterMind. Applied Soft Computing 6(2), 170–179 (2006)CrossRefGoogle Scholar
  2. 2.
    Knuth, D.E.: The computer as Mastermind. Journal of Recreational Mathematics 9, 1–6 (1976)MathSciNetGoogle Scholar
  3. 3.
    Irving, R.W.: Towards an optimum Mastermind strategy. Journal of Recreational Mathematics 11(2), 81–87 (1978)Google Scholar
  4. 4.
    Neuwirth, E.: Some strategies for Mastermind. Mathematical Methods of Operations Research 26, 257–278 (1982)zbMATHMathSciNetGoogle Scholar
  5. 5.
    Norvig, P.: Playing Mastermind optimally. ACM SIGART Bulletin 90, 33–34 (1984)CrossRefGoogle Scholar
  6. 6.
    Koyama, K., Lai, T.W.: An optimal Mastermind strategy. Journal of Recreational Mathematics 25, 251–256 (1993)zbMATHGoogle Scholar
  7. 7.
    Rosu, R.: Mastermind. Master’s thesis, North Carolina State University, Raleigh, North Carolina (1999)Google Scholar
  8. 8.
    Barteld, K.: Yet another Mastermind strategy. ICGA Journal 28(1), 13–20 (2005)Google Scholar
  9. 9.
    Huang, L.T., Chen, S.T., Huang, S.J., Lin, S.S.: An efficient approach to solve Mastermind optimally. ICGA Journal 30(3), 143–149 (2007)Google Scholar
  10. 10.
    Shapiro, E.: Playing Mastermind logically. ACM SIGART Bulletin 85, 28–29 (1983)CrossRefGoogle Scholar
  11. 11.
    Chen, S.T., Lin, S.S., Huang, L.T., Hsu, S.H.: Strategy optimization for deductive games. European Journal of Operational Research 183(2), 757–766 (2007)zbMATHCrossRefGoogle Scholar
  12. 12.
    Kalisker, T., Camens, D.: Solving Mastermind using genetic algorithms. In: Cantú-Paz, E., Foster, J.A., Deb, K., Davis, L., Roy, R., O’Reilly, U.-M., Beyer, H.-G., Kendall, G., Wilson, S.W., Harman, M., Wegener, J., Dasgupta, D., Potter, M.A., Schultz, A., Dowsland, K.A., Jonoska, N., Miller, J., Standish, R.K. (eds.) GECCO 2003. LNCS, vol. 2724, pp. 1590–1591. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  13. 13.
    Singley, A.: Heuristic solution methods for the 1-dimensional and 2-dimensional Mastermind problem. Master’s thesis, University of Florida (2005)Google Scholar
  14. 14.
    Chen, S.T., Lin, S.S., Huang, L.T.: A two-phase optimization algorithm for Mastermind. The Computer Journal 50(4), 435–443 (2007)CrossRefGoogle Scholar
  15. 15.
    Berghman, L., Goossens, D., Leus, R.: Efficient solutions for Mastermind using genetic algorithms. Computers and Operations Research 36(6), 1880–1885 (2009)zbMATHCrossRefGoogle Scholar
  16. 16.
    Chen, S.T., Lin, S.S.: Optimal algorithms for 2 ×n AB games - a graph-partition approach. Journal of Information Science and Engineering 20(1), 105–126 (2004)MathSciNetGoogle Scholar
  17. 17.
    Chen, S.T., Lin, S.S.: Optimal algorithms for 2 ×n Mastermind games - a graph-partition approach. The Computer Journal 47(5), 602–611 (2004)CrossRefGoogle Scholar
  18. 18.
    Goddard, W.: Mastermind revisited. Journal of Combinatorial Mathematics and Combinatorial Computing 51, 215–220 (2004)zbMATHMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Li-Te Huang
    • 1
  • Shun-Shii Lin
    • 1
  1. 1.Department of Computer Science and Information EngineeringNational Taiwan Normal UniversityTaipeiTaiwan, ROC

Personalised recommendations