4 Evolutionary algorithms
This chapter covers
- The inspiration for evolutionary algorithms
- Solving problems with evolutionary algorithms
- Understanding the life cycle of a genetic algorithm
- Designing and developing a genetic algorithm to solve optimization problems
4.1 What is evolution?
When you look around at life on Earth, nothing popped into existence fully formed. Everything alive today is the result of a long chain of tiny changes that accumulated over millions of years. This implies that the physical and cognitive characteristics of every living organism are a result of fitting to its environment for survival.
We often make the mistake of thinking evolution is a neat line from “primitive ancestor” to “modern form”. In reality, evolution is messy and branching. Offspring are not perfect clones of their parents; they inherit a mix of genes with small random changes (mutations). At any moment, a species is actually a cloud of variants, not one single clean shape. You only see big, obvious differences when you zoom far out in time and compare averages across thousands of generations.
Figure 4.1 depicts this reality of actual evolution versus the commonly mistaken linear version.
So, evolution is both simple and wild: variation is constantly produced, most variants disappear, and some variants thrive. In doing so, nature essentially “searches” enormous spaces of possibility for the best fit.