skip to main content
10.1145/2463372.2463473acmconferencesArticle/Chapter ViewAbstractPublication PagesgeccoConference Proceedingsconference-collections
research-article

Improving evolutionary solutions to the game of mastermind using an entropy-based scoring method

Published: 06 July 2013 Publication History

Abstract

Solving the MasterMind puzzle, that is, finding out a hidden combination by using hints that tell you how close some strings are to that one is a combinatorial optimization problem that becomes increasingly difficult with string size and the number of symbols used in it. Since it does not have an exact solution, heuristic methods have been traditionally used to solve it; these methods scored each combination using a heuristic function that depends on comparing all possible solutions with each other. In this paper we first optimize the implementation of previous evolutionary methods used for the game of mastermind, obtaining up to a 40% speed improvement over them. Then we study the behavior of an entropy-based score, which has previously been used but not checked exhaustively and compared with previous solutions. The combination of these two strategies obtain solutions to the game of Mastermind that are competitive, and in some cases beat, the best solutions obtained so far. All data and programs have also been published under an open source license.

References

[1]
Marc Aldebert and Risto Widenius. Mastermind. Newsgroup comp.ai.games, archived at https://groups.google.com/d/topic/comp.ai.games/FVOEABY4gbQ/discussion, 1995.
[2]
E. Alfaro-Cid, P. A. Castillo, A. Esparcia, K. Sharman, J.J. Merelo, A. Prieto, A.M. Mora, and J.L.J. Laredo. Comparing multiobjective evolutionary ensembles for minimizing type I and II errors for bankruptcy prediction. In WCCI 2008 Proceedings, pages 2907--2913. IEEE Press, 2008.
[3]
Thomas Bāck. Selective pressure in evolutionary algorithms: A characterization of selection mechanisms. In In Proceedings of the First IEEE Conference on Evolutionary Computation, pages 57--62. IEEE Press, 1994.
[4]
L. Berghman, D. Goossens, and R. Leus. Efficient solutions for Mastermind using genetic algorithms. Computers and Operations Research, 36(6):1880--1885, 2009.
[5]
Azer Bestavros and Ahmed Belal. Mastermind, a game of diagnosis strategies. Bulletin of the Faculty of Engineering, Alexandria University, December 1986.
[6]
Y. Chen and D. Evans. Auditing information leakage for distance metrics. In Privacy, security, risk and trust (PASSAT), 2011 ieee third international conference on and 2011 ieee third international conference on social computing (socialcom), pages 1131--1140. IEEE, 2011.
[7]
V. Chvatal. Mastermind. Combinatorica, 3(3--4):325--329, 1983.
[8]
Carlos Cotta, Juan J. Merelo Guervós, Antonio Mora García, and Thomas Runarsson. Entropy-driven evolutionary approaches to the Mastermind problem. In Robert Schaefer, Carlos Cotta, Joanna Kolodziej, and Günter Rudolph, editors, Parallel Problem Solving from Nature PPSN XI, volume 6239 of Lecture Notes in Computer Science, pages 421--431. Springer Berlin / Heidelberg, 2010.
[9]
B. Doerr, R. Spöhel, H. Thomas, and C. Winzen. Playing mastermind with many colors. arXiv preprint arXiv:1207.0773, 2012.
[10]
B. Doerr and C. Winzen. Ranking-based black-box complexity. Algorithmica, pages 1--39, 2012. Article in Press.
[11]
J.A. Durlak and E.P. DuPre. Implementation matters: A review of research on the influence of implementation on program outcomes and the factors affecting implementation. American journal of community psychology, 41(3):327--350, 2008.
[12]
A. E. Eiben and J. E. Smith. Introduction to Evolutionary Computing. Springer, 2003.
[13]
R. Focardi and F.L. Luccio. Guessing bank pins by winning a mastermind game. Theory of Computing Systems, pages 1--20, 2011.
[14]
J. Francis. Strategies for playing MOO, or "Bulls and Cows". http://www.jfwaf.com/Bulls%20and%20Cows.pdf.
[15]
J. Gagneur, M.C. Elze, and A. Tresch. Selective phenotyping, entropy reduction, and the mastermind game. BMC bioinformatics, 12(1):406, 2011. http://www.biomedcentral.com/1471--2105/12/406.
[16]
P. García-Sánchez, J.J. Merelo, J.P. Sevilla, J.L.J. Laredo, A.M. Mora, and P.A. Castillo. Automatic generation of XSLT stylesheets using evolutionary algorithms. In Genetic and Evolutionary Computation Conference, GECCO2008, pages 1701--1702, New York, NY, USA, 2008. ACM Press.
[17]
W. Goddard. A computer/human Mastermind player using grids. South African Computer Journal, 30:3--8, 2003.
[18]
David E. Goldberg. Zen and the art of genetic algorithms. In J. David Schaffer, editor, ICGA, pages 80--85. Morgan Kaufmann, 1989.
[19]
M. T. Goodrich. Learning character strings via mastermind queries, with a case study involving mtdna. IEEE Transactions on Information Theory, 58(11):6726--6736, 2012.
[20]
M.T. Goodrich. The mastermind attack on genomic data. In Security and Privacy, 2009 30th IEEE Symposium on, pages 204--218. IEEE, 2009.
[21]
S. Hubalovsky. Modeling and computer simulation of real process-solution of mastermind board game. International Journal of Mathematics and Computers in Simulation, pages 107--118, 2012.
[22]
R. W. Irving. Towards an optimum Mastermind strategy. Journal of Recreational Mathematics, 11(2):81--87, 1978-79.
[23]
A.B. Khalifa and R.V. Yampolskiy. GA with Wisdom of Artificial Crowds for Solving Mastermind Satisfiability Problem. International Journal of Intelligent Games & Simulation, 6(2):6, 2011.
[24]
Donald E. Knuth. The computer as Master Mind. J. Recreational Mathematics, 9(1):1--6, 1976-77.
[25]
B. Kooi. Yet another Mastermind strategy. ICGA Journal, 28(1):13--20, 2005.
[26]
P.R. Laughlin, R. Lange, and J. Adamopoulos. Selection strategies for "mastermind" problems. Journal of Experimental Psychology: Learning, Memory, and Cognition, 8(5):475, 1982.
[27]
M. Legendre, K. Hollard, O. Buffet, A. Dutech, et al. MineSweeper: Where to probe? Technical Report RR-8041, INRIA, 2012. http://hal.inria.fr/hal-00723550.
[28]
J. J. Merelo, A. M. Mora, and C. Cotta. Finding fast solutions to the game of Mastermind. In Carlos Cotta Antonio Fernández-Leiva and Raúl Lara, editors, GAME-ON 2012, 13th International Conference on Intelligent Games and Simulation, pages 25--28. Eurosis, 2012.
[29]
J.J. Merelo, A.M. Mora, T.P. Runarsson, and C. Cotta. Assessing efficiency of different evolutionary strategies playing mastermind. In Computational Intelligence and Games (CIG), 2010 IEEE Symposium on, pages 38--45, August 2010.
[30]
Juan-Julián Merelo and Thomas P. Runarsson. Finding better solutions to the Mastermind puzzle using evolutionary algorithms. In Cecilia di Chio et al., editor, Applications of Evolutionary Computing, Part I, volume 6024 of Lecture Notes in Computer Science, pages 120--129, Istanbul, Turkey, 7-9 April 2010. Springer-Verlag.
[31]
Juan-J. Merelo-Guervós, Carlos Cotta, and Antonio Mora. Improving and Scaling Evolutionary Approaches to the MasterMind Problem. In Cecilia Di Chio, Stefano Cagnoni, Carlos Cotta, Marc Ebner, Anikó Ekárt, Anna Esparcia-Alcázar, Juan Julián Merelo Guervós, Ferrante Neri, Mike Preuss, Hendrik Richter, Julian Togelius, and Georgios N. Yannakakis, editors, EvoApplications (1), volume 6624 of Lecture Notes in Computer Science, pages 103--112. Springer, 2011.
[32]
Juan-J. Merelo-Guervós, Antonio-Miguel Mora, and Carlos Cotta. Optimizing worst-case scenario in evolutionary solutions to the MasterMind puzzle. In IEEE Congress on Evolutionary Computation, pages 2669--2676. IEEE, 2011.
[33]
Juan-Julián Merelo-Guervós, Antonio-Miguel Mora, Carlos Cotta, and Thomas-Philip Runarsson. An experimental study of exhaustive solutions for the mastermind puzzle. CoRR, abs/1207.1315, 2012.
[34]
Juan-Julián Merelo-Guervós, Gustavo Romero, Maribel García-Arenas, Pedro A. Castillo, Antonio-Miguel Mora, and Juan-Luís Jiménez-Laredo. Implementation matters: Programming best practices for evolutionary algorithms. In Joan Cabestany, Ignacio Rojas, and Gonzalo Joya Caparrós, editors, IWANN (2), volume 6692 of Lecture Notes in Computer Science, pages 333--340. Springer, 2011.
[35]
Zbigniew Michalewicz. Genetic Algorithms Data Structures = Evolution programs. Springer-Verlag, 2nd edition, 1994.
[36]
G. Montgomery. Mastermind: Improving the search. AI Expert, 7(4):40--47, 1992.
[37]
E. Neuwirth. Some strategies for Mastermind. Zeitschrift fur Operations Research. Serie B, 26(8):B257-B278, 1982.
[38]
JH O'Geran, HP Wynn, and AA Zhigljavsky. Mastermind as a test-bed for search algorithms. Chance, 6:31--37, 1993.
[39]
T. P Runarsson and J. J. Merelo. Adapting heuristic Mastermind strategies to evolutionary algorithms. In NICSO'10 Proceedings, Studies in Computational Intelligence, pages 255--267. Springer-Verlag, 2010. Also available from ArXiV: http://arxiv.org/abs/0912.2415v1.
[40]
A. U. Thor-Hidden. Title hidden. In Accepted, to be published in EvoApps proceedings 2013, page 10pp, 2013.
[41]
Giovanni Viglietta. Hardness of Mastermind. CoRR, abs/1111.6922, 2011.
[42]
Wikipedia. Mastermind (board game) -- Wikipedia, The Free Encyclopedia, 2009.

Cited By

View all
  • (2020)The Paradox of Help Seeking in the Entropy Mastermind GameFrontiers in Education10.3389/feduc.2020.5339985Online publication date: 23-Sep-2020
  • (2018)Tactile Tools for Teaching: Implementing Knuth's Algorithm for Mastering MastermindThe College Mathematics Journal10.1080/07468342.2018.150198949:4(278-286)Online publication date: 6-Sep-2018

Index Terms

  1. Improving evolutionary solutions to the game of mastermind using an entropy-based scoring method

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      GECCO '13: Proceedings of the 15th annual conference on Genetic and evolutionary computation
      July 2013
      1672 pages
      ISBN:9781450319638
      DOI:10.1145/2463372
      • Editor:
      • Christian Blum,
      • General Chair:
      • Enrique Alba
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 06 July 2013

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. evolutionary algorithms
      2. games
      3. optimization
      4. puzzles

      Qualifiers

      • Research-article

      Conference

      GECCO '13
      Sponsor:
      GECCO '13: Genetic and Evolutionary Computation Conference
      July 6 - 10, 2013
      Amsterdam, The Netherlands

      Acceptance Rates

      GECCO '13 Paper Acceptance Rate 204 of 570 submissions, 36%;
      Overall Acceptance Rate 1,669 of 4,410 submissions, 38%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)6
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 28 Feb 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2020)The Paradox of Help Seeking in the Entropy Mastermind GameFrontiers in Education10.3389/feduc.2020.5339985Online publication date: 23-Sep-2020
      • (2018)Tactile Tools for Teaching: Implementing Knuth's Algorithm for Mastering MastermindThe College Mathematics Journal10.1080/07468342.2018.150198949:4(278-286)Online publication date: 6-Sep-2018

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media