Skip to main content

Advertisement

Log in

New solver and optimal anticipation strategies design based on evolutionary computation for the game of MasterMind

  • Special Issue
  • Published:
Evolutionary Intelligence Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. 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

  1. Focardi R, Luccio F (2011) Guessing bank pins by winning a mastermind game. Theory Comput Syst 1–20

  2. 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

    Google Scholar 

  3. Knuth E (1977) The computer as MasterMind. J Recreational Math 9:1–6

    MATH  MathSciNet  Google Scholar 

  4. Irving W (1979) Towards an optimum Mastermind strategy. J Recreational Math 11(2):81–87

    Google Scholar 

  5. Koyama K, Lai T (1993) An optimal Mastermind strategy. J Recrational Math 25(4):251–256

    MATH  Google Scholar 

  6. Bestavros A, Belal A (1986) Master Mind: a game of diagnosis strategies. Bulletin of the faculty of engineering, Alexandria University, Alexandria, Egypt

    Google Scholar 

  7. Kooi B (2005) Yet another mastermind strategy. ICGA J 28(1):13–20

    MathSciNet  Google Scholar 

  8. Chen ST, Lin SS, Huang LT (2007) A two-phase optimization algorithm for Mastermind. Comput J 50(4):435–443

    Article  Google Scholar 

  9. Chen ST, Lin S, Huang L, Hsu S (2007) Strategy optimization for deductive games. Eur J Oper Res 183:757–766

    Article  MATH  Google Scholar 

  10. Merelo JJ, Mora AM, Cotta C, Runarsson TP (2012) An experimental study of exhaustive solutions for the Mastermind puzzle. ARXiV

  11. Shapiro E (1983) Playing Mastermind logically. SIGART Bullet 85:28–29

    Article  Google Scholar 

  12. Swaszek P (2000) The mastermind novice. J Recreational Math 30:130–138

    Google Scholar 

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

    Article  Google Scholar 

  18. 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

  19. Bergman L, Goossens D, Leus R (2009) Efficient solutions for Mastermind using genetic algorithms. Comput Operat Res 36(6):1880–1885

    Article  Google Scholar 

  20. 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

  21. Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection. MIT Press, Cambridge

    MATH  Google Scholar 

  22. Koza JR (1992) Genetic programming

  23. Langdon WB (1998) Genetic programming and data structures. Kluwer, Boston

    Book  MATH  Google Scholar 

  24. Koza JR, Poli R (2003) A genetic programming tutorial. In: Introductory tutorials in optimization, search and decision support, Chapter 8, E. Burke Editor

  25. Koza JR (2010) Human-competitive results produced by genetic programming. Genet Program Evolvable Mach 11:251–284

    Article  Google Scholar 

  26. Angeline PJ, Kinnear KE Jr., (eds.) Advances in Genetic Programming 2. MIT Press, Cambridge

Download references

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

Authors

Corresponding author

Correspondence to S. Salcedo-Sanz.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12065-013-0099-6

Keywords

Navigation