7BREEDING GIANT RATS WITH GENETIC ALGORITHMS

image

Genetic algorithms are general-purpose optimization programs designed to solve complex problems. Invented in the 1970s, they belong to the class of evolutionary algorithms, so named because they mimic the Darwinian process of natural selection. They are especially useful when little is known about a problem, when you’re dealing with a nonlinear problem, or when searching for brute-force-type solutions in a large search space. Best of all, they are easy algorithms to grasp and implement.

In this chapter, you’ll use genetic algorithms to breed a race of super-rats that can terrorize the world. After that, ...

Get Impractical Python Projects 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.