Questions tagged [deap]

DEAP is an evolutionary computation framework for rapid prototyping and testing of ideas

DEAP is a novel evolutionary computation framework for rapid prototyping and testing of ideas. It seeks to make algorithms explicit and data structures transparent. It works in perfect harmony with parallelisation mechanism such as multiprocessing and SCOOP.

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
173 questions
2
votes
0 answers

DEAP Tournament Selection, Avoiding Crossovers with Duplicate Individuals

I've inherited a piece of Python code that uses DEAP, with tournament selection to manage a crossover step: #Early in the code toolbox.register("select", tools.selTournament, tournsize=tournsize) #Then later... popu = toolbox.select(popu,…
2
votes
2 answers

Using multiprocessing in DEAP for genetic programming

I'm using DEAP library to implement genetic programming and I have used eaMuCommaLambda algorithm for this purpose. In order to run the program in parallel, I followed the instructions in the DEAP document and added the two following lines of code…
Farnoosh
  • 31
  • 7
2
votes
1 answer

DEAP: what does the indpb parameter do in the mutPolynomialBounded function?

The DEAP documentation states that deap.tools.mutPolynomialBounded takes five parameters. However, only the first four are described. Why is indpb needed? In the code, it appears to be the mutation probability, but how is it different from the…
usernumber
  • 1,958
  • 1
  • 21
  • 58
2
votes
1 answer

How to fix RAM limit while turning a long DEAP logbook (10 MM) into a dataframe in Colab?

While turning a DEAP's Logbook (essentially, a list of Dictionaries) with around 10 MM entries into a Dataframe for further processing, I got a message about RAM overflow in Google Colab. I'm using the DEAP package for some experiments, as my…
EloyRD
  • 304
  • 3
  • 12
2
votes
1 answer

how to add max(or min) fitness halting condition to multiprocessing deap python genetic algorithm

this question is a follow-on to answer of this question about python deap genetic algorithm library: How to add elimination mechanism in Python genetic algorithm based on DEAP using reference code from deap…
bob smith
  • 23
  • 3
2
votes
1 answer

How to set upper and lower bounds to a gene in an individual in DEAP?

I am employing genetic algorithm through DEAP package in python. In this process, I would like to set different upper and lower bounds to each gene in the individual. I would like to know how can one do that? For more illustration, Suppose my…
2
votes
1 answer

'numpy.ndarray' object has no attribute 'fitness'

I have this code for nsga3(evolutionary algorithm) but I get the error 'numpy.ndarray' object has no attribute 'fitness'.Generates reference points for NSGA-III selection. This code is based onjMetal NSGA-III implementation…
Shivam Sharma
  • 517
  • 1
  • 5
  • 19
2
votes
4 answers

How to define custom Genetic Algorithm individuals that follow certain order pattern using DEAP

My GA individual is a random sequence of int (eg: [4, 5, 10, 11, 8, 12, 9, 13, 2, 6, 3, 7, 0, 14, 15, 1]) that follows certain order constraint which is dealt with in another self-defined function. How can I incorporate my order constraint function…
Stephanie
  • 51
  • 1
  • 7
2
votes
0 answers

Spark + Deap Examples Not Working

Goal I'm trying to get DEAP to parallelize across a spark cluster. I have seen this referenced by other users, as it allows for tight integration with existing server architecture easily via yarn. I have followed several tutorials online cited in…
Ryan
  • 451
  • 4
  • 11
2
votes
0 answers

Can python Deap deal with individual have two kinds of variable, float and int?

I have a problem that have multi variable and multi objective, but I'm not sure how to deal with it. The objective is like def objfunc(individual): f1 = 101 * reduce(lambda x,y:x*y, individual[0]) f2 = ((np.repeat(q.reshape(55,1), 3,…
mrbean
  • 171
  • 2
  • 15
2
votes
1 answer

Multi-objective optimization with Genetic Algorithm using DEAP

I'm trying to solve a logistics distribution routing problem. For example, there are x trucks that need to distribute y products from their respective starting point to respective destination. Problems to solve: which product is delivered by…
Stephanie
  • 51
  • 1
  • 7
2
votes
1 answer

ModuleNotFoundError: No module named 'deap' in Spyder3

I've got this same error on both Windows 10 and Raspbian. I checked here but doesn't help me. "pip install deap" downloads fine, but when I execute a DEAP sample code, I get the Module Not Found Error.
cupofcalculus
  • 51
  • 1
  • 8
2
votes
1 answer

Python object as a list of lists of dictionaries

I'm trying to develop a class that behaves as a list of lists. I need it to pass it as a type for an individual, in deap framework. Presently, I'm working with numpy object array. Here is the code. import numpy class MyArray(numpy.ndarray): def…
infiniator
  • 21
  • 8
2
votes
0 answers

DEAP and Multiprocessing: Passing Toolbox between Modules

I wrote an algorithm with DEAP and now wish to wrap it up inside an app with PyQt. I set up and registered all my evolutionary operators in my controller module and then tried to run the algorithm from my GUI however I noticed that when I pass the…
Thaeryn
  • 23
  • 1
  • 3
2
votes
1 answer

How to test for convergence (smoothness of Pareto front) in DEAP

In the DEAP algorithms (see documentation here), I notice that we need to specify the the number of generations (NGEN). I was advised that convergence has been achieved if the Pareto curve is smooth. It is possible to monitor for convergence by…
meraxes
  • 541
  • 10
  • 23
1 2
3
11 12