Deap - Distributed Evolutionary Algorithms in Python

  •        1008

DEAPDEAP is intended to be an easy to use distributed evolutionary algorithm library in the Python language. Its two main components are modular and can be used separately. The first module is a Distributed Task Manager (DTM), which is intended to run on cluster of computers. The second part is the Evolutionary Algorithms in Python (EAP) framework. ComponentsDTMDTM is a distributed task manager that is able to spread workload over a buch of computers using a TCP or a MPI connection. DTM include the following features: Easy to use parallelization paradigms Offers a similar interface to the Python's multiprocessing module Basic load balancing algorithm Works over mpi4py Support for TCP communication manager EAPEAP is the evolutionary core of DEAP, it provides data structures, methods and tools to design any kind of evolutionary algorithm. It works in perfect harmony with DTM, allowing easy parallelization of any demanding evolutionary task. EAP includes the following features: Genetic algorithm using any imaginable representation List, Array, Set, Dictionary, Tree, Numpy Array, etc. Genetic programing using prefix trees Loosely typed, Strongly typed Automatically defined functions Evolution strategies (including CMA-ES) Multi-objective optimisation (NSGA-II, SPEA-II) Co-evolution (cooperative and competitive) of multiple populations Parallelization of the evaluations (and more) Hall of Fame of the best individuals that lived in the population Checkpoints that take snapshots of a system regularly Benchmarks module containing most common test functions Genealogy of an evolution (that is compatible with NetworkX) Examples of alternative algorithms : Particle Swarm Optimization, Differential Evolution, Estimation of Distribution Algorithm DocumentationSee the DEAP User's Guide for DEAP 0.8 documentation. In order to get the tip documentation, change directory to the doc subfolder and type in make html, the documentation will be under _build/html. You will need Sphinx to build the documentation. RequirementsThe most basic features of DEAP requires Python2.6. In order to combine the toolbox and the multiprocessing module Python2.7 is needed for its support to pickle partial functions. CMA-ES requires Numpy, and we recommend matplotlib for visualization of results as it is fully compatible with DEAP's API. Version 0.8 is now compatible out of the box with Python 3.2, the installation procedure will automatically translate DEAP to Python 3. ExampleThe following code gives a quick overview how simple it is to implement the Onemax problem optimization with genetic algorithm using DEAP. More examples are provided here. import array, randomfrom deap import creator, base, tools, algorithmscreator.create("FitnessMax", base.Fitness, weights=(1.0,))creator.create("Individual", array.array, typecode='b', fitness=creator.FitnessMax)toolbox = base.Toolbox()toolbox.register("attr_bool", random.randint, 0, 1)toolbox.register("individual", tools.initRepeat, creator.Individual, toolbox.attr_bool, 100)toolbox.register("population", tools.initRepeat, list, toolbox.individual)def evalOneMax(individual): return sum(individual),toolbox.register("evaluate", evalOneMax)toolbox.register("mate", tools.cxTwoPoints)toolbox.register("mutate", tools.mutFlipBit, indpb=0.05)toolbox.register("select", tools.selTournament, tournsize=3)population = toolbox.population(n=300)NGEN=40for gen in range(NGEN): offspring = algorithms.varAnd(population, toolbox, cxpb=0.5, mutpb=0.1) fits =, offspring) for fit, ind in zip(fits, offspring): = fit offspring = [toolbox.clone(ind) for ind in, len(offspring))] population = offspringProjects using DEAPMarc-André Gardner, Christian Gagné and Marc Parizeau, "Bloat Control in Genetic Programming with Histogram-based Accept-Reject Method", in Proc. Genetic and Evolutionary Computation Conference (GECCO 2011), 2011. Vahab Akbarzadeh, Albert Ko, Christian Gagné and Marc Parizeau, "Topography-Aware Sensor Deployment Optimization with CMA-ES", in Proc. of Parallel Problem Solving from Nature (PPSN 2010), Springer, 2010. If you want your project listed here, send us a link and a brief description and we'll be glad to add it.



Related Projects


raspBerry+ is a web-based administration platform for Blackberry Enterprise Server for MS Exchange (BES). You can group-based activate/kill/delete/add and get status of users, their handhelds and services. With a little download-area and a comment-system


RASP's A Sneakernet Proxy; download using a thumbdrive.


RasmusDSP is an embeddable Audio/MIDI processor. It contains various filters and generators (including SoundFont 2.0 compatible synthesizer). Has a script interpreter which is used to describe instruments, route Audio/MIDI signal between processor units.


An acronym for cRoss-plAtform accesS control for Enterprise Applications. Rasea aims to become a reference in access control as a service based on the RBAC model.


Rascal, the Advanced Scientific CALculator, is a platform independent modular calculator. Based on modules for integer, doubles, strings, vectors and matrices it can be easily extended with existing C or C++ code.


RARS is the Robot Auto Racing Simulation, in which the drivers are robot programs. It is intended as a competition among programmers. It consists of a simulation of the physics of cars, a graphic display of the race, and a robot driver for each car.


This small program allows you to play a video directly from a RAR file and do so in real-time. Both VLC and MPlayer are supported video players.


RAReXtract is a Front-End for the UnRAR command line utility for Mac OS X 10.5 (Leopard). Its purpose is the rapid and convenient extraction of RAR archives with a double click.

RAR Expander

Rar Expander is a MacOSX program which extracts the files contained in single or multi-volume RAR archives. It uses the official unRAR library internally so it is fully compatible with archives produced by WinRAR.


This program uses a brute force algorithm to guess your encrypted compressed file\'s password. If you forget your encrypted file password, this program is the solution. This program can crack zip,7z and rar file passwords.


RArcInfo is a package for R ( to import data from binary Arc/Info V7.X coverages and E00 files . This will allow R users to used it as a primary GIS tool.

rar brute force shell script - rarbrute

This is rarbrute, a shell script to brute force encrypted rar files under unix and linux. A long wordlist and a paper about security in internet cafes is included.

Raquel Database System

The system will : 1. use RAQUEL (= Relational Algebra Query, Update and Executive Language) for programming, implementing Third Manifesto principles. 2. have a 'Lego-like' architecture of building blocks and plug-ins, for wider applicability.


RAPv4 is an engine for building web application with only a business description (in XML format). NEW 04/2006 : Stable 2006 release. Add new functions like mail, sms, web services, graph, map engine (GIS), Excel output, QBE... and also a beta release of


2d Scroller. Clone of Raptor: Call of the Shadows and Tyrian. Fun game written in c++ using allegro.


Lightweight XML based transformation tool written in C that builds upon expat, tidylib and XSLT to tranform authored web content (incl. Word processor generated HTML) into styled web content suitable for publication.


RapidSMS is an open-source internet and communications platform


RapidSmith is a research-based FPGA CAD tool framework written in Java for modern Xilinx FPGAs. Based on XDL, its objective is to serve as a rapid prototyping platform for research ideas and algorithms relating to low level FPGA CAD tools.

Rapidshare Mass Downloader

What this program does is bringing out human interaction while downloading files from rapidshare(without premium account). It downloads all the rapidshare links sequentially to the specified location.

rapido visual profiler

rapido is a visual profiler for linux-x86. It traces function call using the ptrace interface and displays the information collected in a nice visual flow chart. rapido does not require the re-compilation of the application.