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
1
vote
1 answer

DEAP : Creating custom indivudal generator function along with fitness function

I have written my own function to generate an individual def generate_Individual(arr1,arr2): np.random.shuffle(arr1) np.random.shuffle(arr2) Candidate = tuple(zip(arr1,arr2)) return Candidate def generate_Fitness(Individual): …
Leothorn
  • 1,345
  • 1
  • 23
  • 45
1
vote
1 answer

Is it possible to have variable length genomes in deap?

I can't seem to figure out how to have variable length genomes in DEAP. I have gone through the DEAP documentation and found nothing related to varibable length genomes.
1
vote
1 answer

Is it normal to have a decrease in average fitness of populations in genetic programming (maximization problem) using DEAP?

I'm using DEAP library in python for a genetic programming maximization problem. I have used eaSimple algorithm to create populations with 60% probability of crossover and 30% probability of mutation. The fitness of the best individual in…
Farnoosh
  • 31
  • 7
1
vote
1 answer

Checkpointing using EAsimple and Deap

My issue involves checkpointing. I have my genetic algorithm code running well using eaSimple, but I need to run tests and evaluation on large population sizes (1000+) with many generations (50+). Because I am working remotely my connections to the…
1
vote
1 answer

DEAP: implementing NSGA-ii for flight ticket problem

I have a list which consist of 2 attributes which are cost and rating. I need to find possible best flights which have lower cost and a higher rating. This is a multi objecting optimization problem with minimizing and maximizing objectives. How can…
1
vote
1 answer

Issue with PyGame/PyMunk evaluations in DEAP

This seems to be the most bizarre thing, however I am at my wit's end here. I have a PyGame/PyMunk simulation (the simple BouncyBall demo that is scheduled to run for 2 seconds). I have it hooked into DEAP to try and optimize line placement to…
erik
  • 3,810
  • 6
  • 32
  • 63
1
vote
1 answer

DEAP algorithm with several weights

I'm pretty new to DEAP and looking at several places and examples I've seen it creates classes for genetic algoritms using this method: creator.create('FitnessMax', base.Fitness, weights=(1.0, -0.5,)) creator.create('Individual', list,…
Eduardo Yáñez Parareda
  • 9,126
  • 4
  • 37
  • 50
1
vote
0 answers

Struggling to implement a differential evolutionary algorithm from a paper in python3 with DEAP

I'm trying to implement a differential evolution algorithm to solve for the parameters of a PV model. I think the code I've written is correct, but I seem to be getting weird answers. With each run of the algorithm, I get new parameters, which vary…
1
vote
0 answers

Individual of type Dict in DEAP framework

Is there any way to get individual of type dict working in GA operators (Crossovers, mutate, select and evaluate)? I used cxOnePoint to crossover, but I got an error of TypeErro: Unhashable type: 'slice'. Then, I tried using cxOrdered, but there is…
1
vote
1 answer

DEAP framework - mutGaussian using per gene statistics

I have an individual with the following genes: genes = [8, 2, 300, 2, 25, 10, -64, -61] and I then apply the following gaussian mutation: toolbox.register("mutate", tools.mutGaussian, mu=0, sigma=1, indpb=1) toolbox.mutate(genes) to produce the…
aweeeezy
  • 806
  • 1
  • 9
  • 22
1
vote
1 answer

python - Multi-Objective optimization with multiple variables using DEAP

I am trying to optimize two outputs of simulation software (I used random forest to train a model for fast prediction of outputs). There are seven input variables three are continuous, and the rest are discrete. I have used DEAP package for…
Sali
  • 77
  • 1
  • 8
1
vote
1 answer

Genetic algorithm Deap save mutation data?

I used deap library on Python to work with genetic algorithm. For example: I have individual [0,1,1,1,1,0], I have 3 methods of mutation such as mutation1, mutation2, mutation3. With deap library, I do the mutation as below: for mutate in [mutate1,…
Windy764
  • 77
  • 7
1
vote
0 answers

Python 3.6 - Multiprocessing map with list comprehension iterable containing lists defined in main context

I am trying to figure out if the list of objects I'm including in my list comprehension iterable for the pool.map function are being accessed directly by the workers or if the works are receiving copies of the lists. I'm using DEAP and have…
1
vote
0 answers

Python Deap library, how to access initRepeat mapping

What I want my algorithm to do I want to have a bunch of random words as individuals in my population, whos fitness is compared to an "optimal" word. If the length of the words are equivalent, that's +1 in fitness. For each char that is the same,…
sf8193
  • 575
  • 1
  • 6
  • 25
1
vote
2 answers

Is there a way to use the deap library in grasshopper

Is there a way I can use the deap library inside grasshopper's Python node I want to run a genetic algorithm but the fitness function is to be calculated by grasshopper (only the fitness function, all the other things are to be taken of by deap…
gokul gupta
  • 330
  • 4
  • 13