An experimental study of exhaustive solutions for the Mastermind puzzle

Mastermind is in essence a search problem in which a string of symbols that is kept secret must be found by sequentially playing strings that use the same alphabet, and using the responses that indicate how close are those other strings to the secret one as hints. Although it is commercialized as a game, it is a combinatorial problem of high complexity, with applications on fields that range from computer security to genomics. As such a kind of problem, there are no exact solutions; even exhaustive search methods rely on heuristics to choose, at every step, strings to get the best possible hint. These methods mostly try to play the move that offers the best reduction in search space size in the next step; this move is chosen according to an empirical score. However, in this paper we will examine several state of the art exhaustive search methods and show that another factor, the presence of the actual solution among the candidate moves, or, in other words, the fact that the actual solution has the highest score, plays also a very important role. Using that, we will propose new exhaustive search approaches that obtain results which are comparable to the classic ones, and besides, are better suited as a basis for non-exhaustive search strategies such as evolutionary algorithms, since their behavior in a series of key indicators is better than the classical algorithms.

[1]  Dries R. Goossens,et al.  Efficient solutions for Mastermind using genetic algorithms , 2009, Comput. Oper. Res..

[2]  Juan Julián Merelo Guervós,et al.  Improving and Scaling Evolutionary Approaches to the MasterMind Problem , 2011, EvoApplications.

[3]  Juan Julián Merelo Guervós,et al.  Implementation Matters: Programming Best Practices for Evolutionary Algorithms , 2011, IWANN.

[4]  Michael T. Goodrich,et al.  On the algorithmic complexity of the Mastermind game with black-peg results , 2009, Inf. Process. Lett..

[5]  Flaminia L. Luccio,et al.  Guessing Bank PINs by Winning a Mastermind Game , 2011, Theory of Computing Systems.

[6]  Achim Tresch,et al.  Selective Phenotyping, Entropy Reduction, and the Mastermind game , 2011, BMC Bioinformatics.

[7]  P ? ? ? ? ? ? ? % ? ? ? ? , 1991 .

[8]  Juan Julián Merelo Guervós,et al.  Evolvable agents, a fine grained approach for distributed evolutionary computing: walking towards the peer-to-peer computing frontiers , 2008, Soft Comput..

[9]  Graham Kendall,et al.  A Survey of NP-Complete Puzzles , 2008, J. Int. Comput. Games Assoc..

[10]  Erich Neuwirth,et al.  Some strategies for mastermind , 1982, Z. Oper. Research.

[11]  Juan Julián Merelo Guervós,et al.  Finding a needle in a haystack using hints and evolutionary computation: the case of evolutionary MasterMind , 2006, Appl. Soft Comput..

[12]  Guo-Qiang Zhang,et al.  Mastermind is NP-Complete , 2005, ArXiv.

[13]  H. P. Wynn,et al.  Mastermind as a Test-Bed for Search Algorithms , 1993 .

[14]  A. Bestavros,et al.  MasterMind A game of Diagnosis Strategies , 1986 .

[15]  Barteld P. Kooi Yet Another Mastermind Strategy , 2005, J. Int. Comput. Games Assoc..

[16]  Juan Julián Merelo Guervós,et al.  Adapting Heuristic Mastermind Strategies to Evolutionary Algorithms , 2010, NICSO.

[17]  Shun-Shii Lin,et al.  A Two-Phase Optimization Algorithm For Mastermind , 2007, Comput. J..

[18]  Juan Julián Merelo Guervós,et al.  Optimizing worst-case scenario in evolutionary solutions to the MasterMind puzzle , 2011, 2011 IEEE Congress of Evolutionary Computation (CEC).

[19]  Flaminia L. Luccio,et al.  Cracking Bank PINs by Playing Mastermind , 2010, FUN.

[20]  D. Knuth The Computer as Master Mind , 1977 .

[21]  Juan Julián Merelo Guervós,et al.  Entropy-Driven Evolutionary Approaches to the Mastermind Problem , 2010, PPSN.

[22]  Juan Julián Merelo Guervós,et al.  Designing and testing a pool-based evolutionary algorithm , 2012, Natural Computing.