Introduction to DEAP
As we have seen in the previous chapters, the basic ideas behind genetic algorithms and the genetic flow are relatively simple, and so are many of the genetic operators. Therefore, developing a program from scratch that implements a genetic algorithm to solve a particular problem is entirely feasible.
However, as is often the case when developing software, using a tried-and-true dedicated library or framework can make our lives easier. It helps us create solutions faster and with fewer bugs and gives us many options to choose from (and experiment with) right out of the box, without the need to reinvent the wheel.
Numerous Python frameworks have been created for working with genetic algorithms – PyGAD, GAFT, Pyevolve, and PyGMO, to mention a few. After looking into several options, we chose to use the DEAP framework for this book thanks to its ease of use and a large selection of features, as well as its extensibility and ample documentation.
DEAP...