Improving Evolutionary Solutions to the Game of MasterMind Using an Entropy-based Scoring Method

JJ Merelo, Pedro Castillo, Antonio Mora , Anna Esparcia

GeNeura, U. Granada, S2 Grupo

Check out this presentation at

Licencia de Creative Commons

Let's play MasterMind

Create a combination

Hide the combination

Make a guess

Get a response

Keep playing until solution is found

How do we solve this problem?

Using a crowd optimization algorithm?

Using a cow herd algorithm?

Using a sheep flock algorithm?

No! We use an evolutionary algorithm!

Play consistently

Make the algorithm faster using a profiler

Wait! What's a profiler?

This is profiling for fun and profit

Devel::NYTprof output after profiling

What else do we do in this paper?


Image from JackAZ Photo

Permutation is slow! What do we do?

Image by CurveTo.

Results are good enough

average turns needed to win

But not great

average evals needed to win


average time needed to win


Any questions?

Visit our blog We are looking for partners in European projects.

Follow @geneura, @CANUBEproject, @AnySelfProject and @jjmerelo. Download/use this presentation from

Want to participate in an open source novel? Check Hoborg, the novel