7 Genetic Algorithm
This chapter covers
- Introducing population-based optimization algorithms
- Understanding evolutionary computation
- Understanding different components of genetic algorithms
- Implementing genetic algorithms in Python
Suppose you’re on a treasure hunting mission and do not want to take the risk of searching alone and returning empty-handed. So, you might decide to collaborate with a group of friends and share information. This approach follows a population-based search strategy, where multiple agents are involved in the search process. During this collaborative effort, you may notice that some hunters perform better than others. In this case, you can choose to retain only the best performing hunters and replace the less competent ones with new recruits. This process resembles the workings of evolutionary algorithms such as genetic algorithms, where the fittest individuals survive and pass on their traits to the next generation. In this chapter, genetic algorithm is presented and discussed as an evolutionary computing algorithm. Different elements of this algorithm are described and implementation details are presented.