Your SlideShare is downloading. ×

Even better Mastermind


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide
  • I will always remember one of the first reviews I received on a paper on Mastermind, 15 or so years ago: Why would anybody care about mastermind?
  • 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
  • One of the possible ways to find solutions. Could be others, of course, but this is a good one.
  • Like the birds. They look the same, but one of them has a bad hair day. Or rather a bad feather day. Let's just say that what we do is, once a solution is consistent, we find a scoring based on how the set of consistent solutions is partitioned by comparing consistent solutions with each other. In other papers we tested different ways of doing it, and we're fixing it here. Ideally, anyways, the solution should have always the maximum fitness, but I'm not sure it does (it will have to be checked)
  • Creative commons image from Okinawa Soba at This was published in NICSO, Evostar, CIG, GECCO (as a póster) and eventually PPSN
  • CC Picture from San Diego Shooter New is always better. And better is also always better. Mostly.
  • Picture from
  • Picture by AskThePixel at We realized that the algorithm was generating many repeated combinations, instead of generating new ones. In some cases, there were dozens of copies of them
  • Did we really improve population diversity, and could this be the cause of the improved results? It probably is, since the new algorithm maintains the diversity quite high during the whole experiment
  • All source, data sets, experiment results for this paper are available from Sourceforge (in fact, they were while we were doing it). Source is also available from the CPAN Perl module server worldwide, in two separate modules: the algorithm itself as the module Algorithm::Mastermind (along with other algorithms; for instance, Knuth's algorithm), and the EA in the shape of the Evolutionary Algorithm library.
  • Transcript

    • 1. J. J. Merelo , Carlos Cotta, Antonio Mora U. Granada & Málaga (Spain) Http:// Optimizing worst-case scenario in evolutionary solutions to the MasterMind puzzle
    • 2. Game of MasterMind
    • 3. 7 reasons why you should care
      • Donald Knuth
      • 4. NP-Complete
      • 5. Differential cryptanalisis/ATM cracking
      • 6. Circuit/program test
      • 7. Genetic profiling
      • 8. Optimal solution not known
      • 9. Interesting search problem
    • 10. Let's play, then
    • 11. Consistent combinations
    • 12. Naïve Algorithm
      • Repeat
        • Find a consistent combination and play it.
    • 13. Looking for consistent solutions
      • Optimization algorithm based on distance to consistency (for all combinations played)
      D = 2
    • 14. Not all consistent combinations are born the same
      • There's at least one better than the others (the solution).
      • 15. Some will reduce the remaining search space more.
      • 16. But scoring them is an open issue.
    • 17. What we did before
        Apply heuristic methods to speed up finishing games
    • 18. What we do now Increase diversity in search via new operators and selection mechanisms
    • 19. Objectives
      • Reduce the probability of takeover by a single individual
      • 20. Reduce the possibility of repeated generation of a single combination
      • 21. Increase speed to afford tackling bigger sizes
    • 22. New tricks for old games
      • Add permutation operator
      • 23. Add diff uniform crossover
        • crossover over different positions only
        • 24. Selection makes sure parents are different
      • Change to tournament selection
        • Stronger selective pressure
      • Higher replacement rate
    • 25. Results: number of evaluations
    • 26. Results: any good at MasterMind? Better Better
    • 27. Mission accomplished?
    • 28. Worst case is better! Measures to increase diversity have a positive impact on quality of algorithm and also speed
    • 29. Open source your science!
    • 30. Thank you very much Questions?