Chapter 8Alive! Create Artificial Life

In the previous chapter, you made an abstract bee colony and used a fitness function to guide the bees’ movement. The bees remembered the best places they had visited, and they communicated these places with the other bees by performing a waggle dance. This encoded information-sharing between agents, encouraging them to learn. In the end, the bees swarmed out of the paper bag when they all found food outside.

Now, imagine cells on a grid, some of which are in a paper bag. If a cell gets crowded, it dies; however, when certain conditions are met, a cell remains alive or even comes to life. These live cells can form a stable shape, or cycle through states, making patterns. You’ll see this as you play with ...

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.