Abstract
This paper presents and compares several evolutionary solutions for the well-known MasterMind game, a classic board game invented in the 1970s. First, we propose a novel evolutionary approach (which we call nested hierarchical evolutionary search) to solve the MasterMind game, comparing the obtained results with that of existing algorithms. Second, we show how to design novel game anticipation strategies for the MasterMind game, by applying genetic programming. In this case we compare the performance of the new obtained strategies with that of the classical ones, obtaining advantages in all the cases tested.
Similar content being viewed by others
Notes
We do not consider WC since it is focussed on minimizing the maximum depth of the game tree, instead of minimizing the tree weight. ES, MP and EN are focussed on minimizing the tree weight, and are known to be more efficient than WC.
References
Focardi R, Luccio F (2011) Guessing bank pins by winning a mastermind game. Theory Comput Syst 1–20
Gagneur J, Elze M, Tresch A (2011) Selective phenotyping, entropy reduction, and the mastermind game. BMC Bioinform 12(1):406 http://www.biomedcentral.com/1471-2105/12/406
Knuth E (1977) The computer as MasterMind. J Recreational Math 9:1–6
Irving W (1979) Towards an optimum Mastermind strategy. J Recreational Math 11(2):81–87
Koyama K, Lai T (1993) An optimal Mastermind strategy. J Recrational Math 25(4):251–256
Bestavros A, Belal A (1986) Master Mind: a game of diagnosis strategies. Bulletin of the faculty of engineering, Alexandria University, Alexandria, Egypt
Kooi B (2005) Yet another mastermind strategy. ICGA J 28(1):13–20
Chen ST, Lin SS, Huang LT (2007) A two-phase optimization algorithm for Mastermind. Comput J 50(4):435–443
Chen ST, Lin S, Huang L, Hsu S (2007) Strategy optimization for deductive games. Eur J Oper Res 183:757–766
Merelo JJ, Mora AM, Cotta C, Runarsson TP (2012) An experimental study of exhaustive solutions for the Mastermind puzzle. ARXiV
Shapiro E (1983) Playing Mastermind logically. SIGART Bullet 85:28–29
Swaszek P (2000) The mastermind novice. J Recreational Math 30:130–138
Temporal A, Kovacs T (2003) A heuristic hill climbing algorithm for Mastermind. In: Proceedings of the UK workshop on Computational Intelligence. Bristol, UK, pp 183-196
Bernier J, Herráiz C, Merelo-Guervós JJ, Olmeda S, Prieto A (1996) Solving Mastermind using GAs and simulated annealing: a case of dynamic constraint optimization. In: Proceedings of the 4th international conference on parallel problem solving from nature. London, UK, pp 554–563
Bento L, Pereira L, Rosa A (1999) Mastermind by evolutionary algorithms. In: Proceedings of the sixth annual workshop on selected areas in cryptography. Kingston, Ontario, Canada, pp 307–311
Kalister T, Camens D (2003) Solving Mastermind using genetic algorithms. In: Proceedings of the genetic and evolutionary computation conference (GECCO). Chicago, USA, pp 1590–1591
Merelo-Guervós JJ, Castillo P, Rivas V (2006) Finding a needle in a haystack using hints and evolutionary computation: the case of evolutionary MasterMind. Appl Soft Comput 6(2):170–179
Maestro-Montojo J, Merelo JJ, Salcedo-Sanz S (2013) Comparing evolutionary algorithms to solve the game of MasterMind. Applications of Evolutionary Computation, Lecture Notes in Computer Science 7835:304–313
Bergman L, Goossens D, Leus R (2009) Efficient solutions for Mastermind using genetic algorithms. Comput Operat Res 36(6):1880–1885
Runarsson TP, Merelo-Guervos JJ (2010) Adapting heuristic Mastermind strategies to evolutionary algorithms. Proceedings of the international workshop on nature inspired cooperative strategies for optimization, Granada, Spain
Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection. MIT Press, Cambridge
Koza JR (1992) Genetic programming
Langdon WB (1998) Genetic programming and data structures. Kluwer, Boston
Koza JR, Poli R (2003) A genetic programming tutorial. In: Introductory tutorials in optimization, search and decision support, Chapter 8, E. Burke Editor
Koza JR (2010) Human-competitive results produced by genetic programming. Genet Program Evolvable Mach 11:251–284
Angeline PJ, Kinnear KE Jr., (eds.) Advances in Genetic Programming 2. MIT Press, Cambridge
Acknowledgments
This work has been partially supported by Spanish Ministry of Science and Innovation, under project numbers ECO2010-22065-C03-02, TIN2011-28627-C04-02 and P08-TIC-03903 awarded by the Andalusian Regional Government, as well as project CANUBE (CEI2013-P-14) from CEI-BioTIC (http://biotic.ugr.es).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Maestro-Montojo, J., Salcedo-Sanz, S. & Merelo, J.J. New solver and optimal anticipation strategies design based on evolutionary computation for the game of MasterMind. Evol. Intel. 6, 219–228 (2014). https://doi.org/10.1007/s12065-013-0099-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12065-013-0099-6