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

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 http://www.flickr.com/photos/unloveable/2399932549/
  • 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 http://www.flickr.com/photos/24443965@N08/3606831198/ This was published in NICSO, Evostar, CIG, GECCO (as a póster) and eventually PPSN
  • CC Picture from San Diego Shooter http://www.flickr.com/photos/nathaninsandiego/3758988303/ New is always better. And better is also always better. Mostly.
  • Picture from http://www.flickr.com/photos/nostri-imago/3137422976/in/photostream/
  • Picture by AskThePixel at http://www.flickr.com/photos/askthepixel/3008033829 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.
  • Even better Mastermind

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