Chapter 10Optimize! Find the Best

In the previous chapter, you found the best starting configurations for cellular automata using genetic algorithms. You used a fitness function to assess how good a cell pattern was, and you programmed your way out of several paper bags. For this final exercise, you’ll make your way into the paper bag instead.

Imagine you have a turtle who likes walking along the inside of a paper bag. This turtle is a little shy and is happiest when curled up in the bottom of the bag. Initially, this bag will be two-dimensional and almost rectangular. Later, however, you’ll scrunch it up so you can learn how to find the best of several better hiding places without getting stuck in one. Although you’ll see how to try more ...

Get Genetic Algorithms and Machine Learning for Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.