Skip to main content

Solving Mastermind Using Genetic Algorithms

  • Conference paper
  • First Online:
Genetic and Evolutionary Computation — GECCO 2003 (GECCO 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2724))

Included in the following conference series:

Abstract

The MasterMind game involves decoding a secret code. The classic game is a code of six possible colors in four slots. The game has been analyzed and optimal strategies have been posed by computer scientists and mathematicians. In this paper we will survey previous work done on solving MasterMind, including several approaches using Genetic Algorithms. We will also analyze the solution sets and compare our results using a novel scoring system inside a GA against previous work using Genetic and Heuristic algorithms. Our GA is performing closer to optimal then previously published work. The GA we present is a Steady State GA using Fitness Proportional Reproduction (FPR), where the fitness function incorporates a simple heuristic algorithm. We also present a scoring method that is simpler then those used by other researchers. In larger games such as 10 colors and 8 slots our GA clearly outperform the heuristic algorithm. In fact if one wishes to tradeoff a higher average number of guesses to a faster running time, extremely large games such as 12 × 10 can be solved in a reasonable time (i.e. minutes) of run time.

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

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kalisker, T., Camens, D. (2003). Solving Mastermind Using Genetic Algorithms. In: Cantú-Paz, E., et al. Genetic and Evolutionary Computation — GECCO 2003. GECCO 2003. Lecture Notes in Computer Science, vol 2724. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45110-2_39

Download citation

  • DOI: https://doi.org/10.1007/3-540-45110-2_39

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40603-7

  • Online ISBN: 978-3-540-45110-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics