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
0
votes
1 answer

DEAP cooperative coevolution

I don't quite understand the example of cooperative coevolution described in the documentation for DEAP. What is the target_set, that appears when evaluating individual fitness ? Why is the line for updating fitness ind.fitness.values =…
usernumber
  • 1,958
  • 1
  • 21
  • 58
0
votes
1 answer

Access multiple statistics in DEAP

Following the DEAP tutorial, I am trying to use multiple statistics. import numpy as np import random from deap import base, creator, tools, algorithms # Define toolbox toolbox = base.Toolbox() creator.create("FitnessMin", base.Fitness,…
usernumber
  • 1,958
  • 1
  • 21
  • 58
0
votes
1 answer

DEAP: Genetic algorithm - eval function

I am a beginner in Python and DEAP and I am trying to understand the evaluatiobn function for the TSP from: https://github.com/DEAP/deap/blob/master/examples/ga/tsp.py def evalTSP(individual): distance =…
campioni
  • 157
  • 1
  • 8
0
votes
1 answer

accelerate DEAP using multiprocessing report OSError

I want to accelerate DEAP using multiprocessing but always get OSError. Here is abbreviated version of my code: import operator import math import random import numpy as np import pandas as pd from deap import algorithms from deap import…
xxyao
  • 529
  • 1
  • 7
  • 16
0
votes
1 answer

Can I use more than one mutation function in GP?

I want to use more than one mutation method in GP, for example both mutUniform and mutEmphemeral. But all the algorithm can only receive one parameter. Is there method can solve this?
xxyao
  • 529
  • 1
  • 7
  • 16
0
votes
0 answers

I can find deap in conda list, but cannot import name base in python 2.7

I tried to use DEAP for Multi Objective PSO. So, I installed deap in my anaconda environment using pip install. and I found the deap in conda list. but I cannot import deap in python. Could you help me to solve this problem? I activated conda…
hakseung lee
  • 21
  • 1
  • 3
0
votes
0 answers

Evaluation stuck at local optima in genetic programing DEAP. How to prevent GP from converging on local optima?

I'm trying to do a symbolic regression of a geometric model. And it gets stuck at most of the time with a fitness score that is not near 0. So I did a couple of research and find out it is the problem with local minima. And some people tried to…
Snigdhajyoti
  • 1,327
  • 10
  • 26
0
votes
1 answer

DEAP - Fitness Value lost through toolbox operation

I've been working on generating roads through maximizing specific properties of the road. I'm using the DEAP Framework for the evolution part. My roads are represented as dicts. I've encountered a problem, while I'm mating two roads. The…
Fierl
  • 11
  • 3
0
votes
1 answer

How to strongly type zero argument primitives

I'm trying to write a genetic program in Python using DEAP and have several zero argument functions as terminals. I want to be able to combine them using, for example, an if_then_else primitive but this primitive keeps trying to call my other int…
Davidson
  • 1
  • 1
0
votes
1 answer

Python DEAP library, using random words as individuals

I'm trying to get a better handle on DEAP. I want to make a genetic algorithm that has words as individuals as a population and it maximizes this by checking how far in distance(read: spelling) these words are from a given "maximal word". This is…
sf8193
  • 575
  • 1
  • 6
  • 25
0
votes
1 answer

Python DEAP: Fitness seems to go down over time - how do I fix this?

My individual is a concatenation of the five parameters needed to tweak a multi-stage process. The first population is created by randomly assigning those parameters a value within their respective ranges and converting that into a binary string. A…
Dave Babbitt
  • 1,038
  • 11
  • 20
0
votes
1 answer

DEAP framework Python usage of "n=5" in PSO

What is the meaning of n in this code which is given as default in DEAP without an explanation in basic PSO? pop = toolbox.population(n=5) def main(): pop = toolbox.population(n=5) stats = tools.Statistics(lambda ind: ind.fitness.values) …
Tolga
  • 116
  • 2
  • 12
0
votes
2 answers

how to run evolutionary algorithms using pyspark

I want to run evolutionary algorithms like GA,PSO using pyspark on spark.How to do this using MLLib using Deap python library.Is there any other library available to perform same task.
0
votes
1 answer

In python DEAP package, why a function can be called from a module which dose not have such function?

I have just started to use the DEAP package in python. Following the tutorial, I can't understand this statement: toolbox.register("cross",tools.cxTwoPoint) I understand that tools.cxTwoPoint is to call the cxTwoPoint function. However, I checked…
Zhida Deng
  • 189
  • 2
  • 12
0
votes
1 answer

What dose this statement mean in python deap package?

There are some statements in the init.py file of python DEAP package, such as: from .crossover import * Is this means import all function from crossover.py? So why there is a "." in front of crossover. It would be so much appreciated that if…
Zhida Deng
  • 189
  • 2
  • 12
1 2 3
11
12