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

Your Mission: Find the Best

You’ll start with the simple rule—any row stays as it is. You stack up copies of this row until you’re above the paper bag:

images/Dream/stack_300.png

Will your genetic algorithm be clever enough to switch on all of the cells to begin with? This challenge is a variant of the OneMax problem.[68] You don’t need an evolutionary algorithm (EA) such as a GA to solve this. However, it does illustrate the characteristics of an EA, and the fitness function is easy to understand.

You can express your problem in formal terms. Find a bit pattern

images/_pragprog/svg-0076.png

that ...

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