Chapter 5. Genetic algorithms

 

Genetic algorithms are not used for everyday programmatic problems. They are called upon when traditional algorithmic approaches are insufficient for arriving at a solution to a problem in a reasonable amount of time. In other words, genetic algorithms are usually reserved for complex problems without easy solutions. If you need a sense of what some of these complex problems might be, feel free to read ahead in section 5.7 before proceeding.

5.1. Biological background

In biology, the theory of evolution is an explanation of how genetic mutation coupled with the constraints of an environment leads to changes in organisms over time (including speciation—the creation of new species). The mechanism by which the well-adapted organisms succeed and the less well-adapted organisms fail is known as natural selection. Each generation of a species will include individuals with different (and sometimes new) traits that come about through genetic mutation. All individuals compete for limited resources to survive, and because there are more individuals than there are resources, some individuals must die.

5.2. Preliminaries

5.3. A generic genetic algorithm

5.4. A naive test

5.5. SEND+MORE=MONEY revisited

5.6. Challenges for genetic algorithms

5.7. Real-world applications

5.8. Exercises