Skip to main content

Comparing Evolutionary Algorithms to Solve the Game of MasterMind

  • Conference paper
Applications of Evolutionary Computation (EvoApplications 2013)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7835))

Included in the following conference series:

Abstract

In this paper we propose a novel evolutionary approach to solve the Mastermind game, and compare the results obtained with that of existing algorithms. The new evolutionary approach consists of a hierarchical one involving two different evolutionary algorithms, one for searching the set of eligible codes, and the second one to choose the best code to be played at a given stage of the game. The comparison with existing algorithms provides interesting conclusions regarding the performance of the algorithms and how to improve it in the future. However, it is clear that Entropy is a better scoring strategy than Most Parts, at least for these sizes, being able to obtain better results, independently of the evolutionary algorithm.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Knuth, E.: The computer as Master Mind. Journal of Recreational Mathematics 9, 1–6 (1977)

    MathSciNet  MATH  Google Scholar 

  2. Irving, W.: Towards an optimum Mastermind strategy. Journal of Recreational Mathematics 11(2), 81–87 (1979)

    Google Scholar 

  3. Koyama, K., Lai, T.: An optimal Mastermind strategy. Journal of Recrational Mathematics 25(4), 251–256 (1993)

    MATH  Google Scholar 

  4. Bestavros, A., Belal, A.: Master Mind: a game of diagnosis strategies. In: Bulletin of the Faculty of Engineering, Alexandria University, Alexandria (1986)

    Google Scholar 

  5. Kooi, B.: Yet another mastermind strategy. ICGA Journal 28(1), 13–20 (2005)

    MathSciNet  Google Scholar 

  6. Chen, S.T., Lin, S.S., Huang, L.T.: A two-phase optimization algorithm for Mastermind. The Computer Journal 50(4), 435–443 (2007)

    Article  Google Scholar 

  7. Chen, S.T., Lin, S., Huang, L., Hsu, S.: Strategy optimization for deductive games. European Journal of Operational Research 183, 757–766 (2007)

    Article  MATH  Google Scholar 

  8. Merelo, J.J., Mora, A.M., Cotta, C., Runarsson, T.P.: An experimental study of exhaustive solutions for the Mastermind puzzle. ARXiV (2012)

    Google Scholar 

  9. Shapiro, E.: Playing Mastermind logically. SIGART Bulleting 85, 28–29 (1983)

    Article  Google Scholar 

  10. Swaszek, P.: The mastermind novice. Journal of Recreational Mathematics 30, 130–138 (2000)

    Google Scholar 

  11. Temporal, A., Kovacs, T.: A heuristic hill climbing algorithm for Mastermind. In: Proc. of the UK Workshop on Computational Intelligence, Bristol, UK, pp. 183–196 (2003)

    Google Scholar 

  12. Bernier, J., Herráiz, C., Merelo-Guervós, J.J., Olmeda, S., Prieto, A.: Solving Mastermind using GAs and simulated annealing: a case of dynamic constraint optimization. In: Proc. of the 4th International Conference on Parallel Problem Solving from Nature, London, UK, pp. 554–563 (1996)

    Google Scholar 

  13. Bento, L., Pereira, L., Rosa, A.: Mastermind by evolutionary algorithms. In: Proc. of the Sixth Annual Workshop on Selected Areas in Cryptography, Kingston, Ontario, Canada, pp. 307–311 (1999)

    Google Scholar 

  14. Kalister, 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)

    Chapter  Google Scholar 

  15. Merelo-Guervós, J.J., Castillo, P., Rivas, V.: Finding a needle in a haystack using hints and evolutionary computation: the case of evolutionary MasterMind. Applied Soft Computing 6(2), 170–179 (2006)

    Article  Google Scholar 

  16. Some A. Uthor, A fine paper (2012)

    Google Scholar 

  17. Bergman, L., Goossens, D., Leus, R.: Efficient solutions for Mastermind using genetic algorithms. Computers & Operations Research 36(6), 1880–1885 (2009)

    Article  Google Scholar 

  18. Runarsson, T.P., Merelo-Guervos, J.J.: Adapting heuristic Mastermind strategies to evolutionary algorithms. In: Proc. of the International Workshop on Nature Inspired Cooperative Strategies for Optimization, Granada, Spain (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Maestro-Montojo, J., Merelo, J.J., Salcedo-Sanz, S. (2013). Comparing Evolutionary Algorithms to Solve the Game of MasterMind. In: Esparcia-Alcázar, A.I. (eds) Applications of Evolutionary Computation. EvoApplications 2013. Lecture Notes in Computer Science, vol 7835. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37192-9_31

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-37192-9_31

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-37191-2

  • Online ISBN: 978-3-642-37192-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics