O'Reilly logo

Genetic Algorithms and Machine Learning for Programmers by Frances Buontempo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Did It Work?

If you start with the simplest possible rule, and only have one item in the population, not much changes. Your tournament only has one competitor. The mutation gives it a chance to improve, but it might not manage to turn on all of the cells. Here’s a typical run—it started with 12 live cells, and creeps up to 17 over time:

images/Dream/pop1_big.png

You need a larger population to allow your GA to try more rows. Experimentation suggested about 25 items works well. The algorithm can then manage to turn on all 32 bits within 20 epochs, like this:

images/Dream/pop25_big.png

Your choice ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required