J. J. Merelo , T. P. Runarsson U. Granada (Spain) & U. Iceland Finding better solutions to the Mastermind puzzle using evolutionary algorithms
Game of MasterMind
Why should I care? I want to frag!
7 reasons why you should Donald Knuth
NP-Complete
Differential cryptanalisis
Circuit and program test
Genetic profiling
Minimize guesses
Minimize evaluations
Let's play, then
Consistent combinations
Naïve Algorithm Repeat Find a consistent combination and play it.
Looking for consistent solutions Optimization algorithm based on distance to consistency (for all combinations played) D = 2
Not all consistent combinations are born the same There's at least one better than the others (the solution)
Some will reduce the remaining search space more.
But scoring them is an open issue
Score consistent set
Enter partitions Most parts. Score = 5 Best worst case. Score = -3 Entropy. Score = 1.67 1.31 0.96 0.96 1.58 1.52 1.67 1.42 1.52 1.67
Less Naïve Algorithm Play initial combination

An Algorithm for solving the game of Mastermind

Editor's Notes

  • #4 http://www.flickr.com/photos/96dpi/3045941013/ With a creative commons licence
  • #6 How would you play mastermind? It's not easy to do, since possible branches are many more than for Sudoku or even chess. In fact, this is the kind of game that can be played more easily by a machine than by a person. CC picture from http://www.flickr.com/photos/unloveable/2399932549/
  • #7 One of the possible ways to find solutions. Could be others, of course, but this is a good one.
  • #13 Creative Commons picture from http://www.flickr.com/photos/mayaevening/138372058/