3
Using the DEAP Framework
In this chapter – as promised – the real fun begins! You will be introduced to Distributed Evolutionary Algorithms in Python (DEAP) – a powerful and flexible evolutionary computation framework capable of solving real-life problems using genetic algorithms. After a brief introduction, you will get acquainted with two of its main modules – the creator and the toolbox – and learn how to create the various components needed for the genetic algorithm flow. We will then write a Python program that solves the OneMax problem – the Hello World of genetic algorithms – using the DEAP framework. This will be followed by a more concise version of the same program, where we’ll take advantage of the built-in algorithms of the framework. ...
Get Hands-On Genetic Algorithms with Python - Second Edition 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.