Abstract
DEAP (Distributed Evolutionary Algorithms in Python) is a modular evolutionary computation framework designed to prioritize transparency and ease of prototyping. By utilizing a unique "creator" and "toolbox" architecture, DEAP allows for the rapid development of complex evolutionary systems while maintaining a "white-box" approach that keeps implementation details accessible to researchers.
Introduction
Evolutionary Computation (EC) is a diverse field requiring significant customization of data structures and operators. Traditional frameworks often adopt a "black-box" model, hiding implementation details within complex class hierarchies. This makes customization difficult for researchers who need to modify specific selection or mutation mechanisms. DEAP addresses this by providing a toolkit where logic is explicit, readable, and compact, bridging the gap between pseudocode and implementation.
Framework Architecture
DEAP’s design is centered around two primary components:
- The Creator: A meta-factory that enables dynamic class creation at runtime. It allows users to compose individuals from standard Python types (e.g., lists or dictionaries) and augment them with attributes like fitness without extensive boilerplate.
- The Toolbox: A container for evolutionary operators. By registering functions under generic aliases (e.g.,
mate,mutate), DEAP decouples the algorithm from its specific operators, facilitating easy experimentation through "plug-and-play" swapping.
Additionally, DEAP includes an Algorithms module for common strategies and a Distributed Task Manager (DTM) to scale evaluations across clusters by simply replacing the standard map function.
Key Results and Comparison
The utility of DEAP was demonstrated using benchmark problems such as Multi-objective Feature Selection and the "OneMax" problem. A primary metric for evaluation was the verbosity of the framework compared to existing EC libraries.
As shown in the comparison table, DEAP is significantly more compact than its predecessors. Implementing the OneMax problem required only 59 lines of code in DEAP, whereas frameworks like Open BEAGLE and ECJ required 477 and 328 lines, respectively. This compactness does not sacrifice versatility; DEAP supports a wide range of techniques including Genetic Programming, CMA-ES, and Particle Swarm Optimization.
Conclusion
DEAP represents a shift toward "white-box" evolutionary computation frameworks. By favoring composition over inheritance and explicit loops over hidden library calls, it empowers researchers to understand and modify the underlying evolutionary logic easily. While Python's performance can be a bottleneck for some tasks, DEAP's focus on distributed evaluation effectively mitigates this for computationally expensive real-world applications.
Summary updated