Questions tagged [pyevolve]

Pyevolve was developed to be a complete genetic algorithm framework written in pure python.

Pyevolve was developed to be a complete genetic algorithm framework written in pure python, the main objectives of Pyevolve is:

  • written in pure python, to maximize the cross-platform issue;
  • easy to use API, the API must be easy for end-user;
  • see the evolution, the user can and must see and interact with the evolution statistics, graphs and etc;
  • extensible, the API must be extensible, the user can create new representations, genetic operators like crossover, mutation and etc;
  • fast, the design must be optimized for performance;
  • common features, the framework must implement the most common features: selectors like roulette wheel, tournament, ranking, uniform. Scaling schemes like linear scaling, etc;
  • default parameters, we must have default operators, settings, etc in all options;
  • open-source, the source is for everyone, not for only one.
25 questions
8
votes
2 answers

Making global variable accessible from every process

I am new to python and started using an genetic algorithm (GA) to do some sort of curve fitting. For that GA I am using the (awesome) pyevolve library (http://pyevolve.sourceforge.net/) that is able to reduce the calculation time enormously by using…
ItsMarvolo
  • 133
  • 7
5
votes
4 answers

Use pyevolve in python 3

Pyevolve is usually used in python 2.7. Is there any way we can install and use pyevolve in python 3 ? I know there is another package DEAP for genetic algorithms compatible with python 3 but somehow I have to use pyevolve. I have tries but I think…
muazfaiz
  • 4,611
  • 14
  • 50
  • 88
4
votes
1 answer

Enforce constraints in genetic algorithm with DEAP

I am trying to use a genetic algorithm with DEAP to solve an optimization problem not all that different from a knapsack problem. A chromosome is represented by a vector of integers and the constraint is that the sum of the vector must be equal to…
scottyaz
  • 722
  • 7
  • 18
3
votes
3 answers

Population replacement pyevolve

Looking for a way to reuse 50% of previous population best individuals in different GA iteration . For example at the end of current iteration inside a process do "population = ga.getPopulation()".Next iteration initialize 50% of that pop. Does…
Jack
  • 106
  • 1
  • 9
2
votes
1 answer

pareto ranking using Pyevolve

I am currently using Pyevolve package to solve some Genetic Algorithms problems. I am wondering is there any examples using Pareto ranking in Pyevolve package, since I have multi evaluation functions. If not exists, could you plz provides some…
Joe SHI
  • 1,734
  • 4
  • 20
  • 39
2
votes
1 answer

Resuming an optimization with pyevolve

I have done an optimization with Pyevolve and after a look at the results I wanted to add a few generation to have a better convergence. As an evaluation is quite long, I was wondering if I can resume my optimization to the last generation and add…
TazgerO
  • 535
  • 6
  • 22
2
votes
0 answers

AttributeError when freezing library with multiprocessing

I want to freeze my program, which includes a library that uses multiprocessing (http://pyevolve.sourceforge.net/), with py2exe. This works just fine; I can run the generated .exe and (with multiprocessing disabled) my program does what I expect it…
ItsMarvolo
  • 133
  • 7
2
votes
1 answer

Charting a best value evolution plot using pyevolve and matplotlib

I'm trying to chart a plot of the best value evolution on a GA over time. I'm trying to use matplotlib to do it, and I'm using pyevolve for the GA. My problem is that when I call the evolve function, it evolves the algorithm till the end and I have…
1
vote
1 answer

Pyevolve - sum of chromosome = 1

# Genome instance, 1D List of 20 elements genome = G1DList.G1DList(20) Sets the range max and min of the 1D List genome.setParams(rangemin=0, rangemax=1) Change the initializator to Real…
Jonas
  • 617
  • 3
  • 8
  • 22
1
vote
0 answers

Simultaneous evaluation of fitness function with pyevolve

I'm am using pyevolve and I would like to give a fitness score based on the whole population. Nevertheless in the evaluation function needs to be defined for one individual like: def eval_func(ind): score = 0.0 for x in…
JLT
  • 712
  • 9
  • 15
1
vote
1 answer

Pyevolve Score in Evaluation function

Here is an example of pyevolve library of Python, from pyevolve import G1DList from pyevolve import GSimpleGA import time def eval_func(chromosome): score = 0.0 for value in chromosome: if value == 50: score +=…
user5538696
1
vote
1 answer

How to set different parameter ranges within a real valued chromosome using Pyevolve?

I'm trying to use pyevolve to implement a real valued genetic algorithm. (Example documentation is given here: http://pyevolve.sourceforge.net/examples.html#example-2-real-numbers-gaussian-mutator) The range of the parameters (20 in this example)…
1
vote
0 answers

Display an image an refresh it

I made a program with a genetic algorithm using pyevolve; it modifies a PIL Image every generation. The code is as follows. def update_image(): global image # Update image ... ga = GSimpleGA.GSimpleGA( genome ) ... ga.stepCallback.set(…
Adrián Juárez
  • 183
  • 5
  • 14
1
vote
1 answer

"AttributeError: fileno" when attemping to import from pyevolve

I just installed Pyevolve using easy_install and I am getting errors trying to run my first program. I first tried copy and pasting the source code of the first example but this is what I receive when I attempt to run it: Traceback (most recent…
Corey Sunwold
  • 10,194
  • 6
  • 51
  • 55
1
vote
0 answers

2D binary string pyevolve

I am new to pyevolve and GA in Python. I am trying to make a 2D binary array representing matches. Something like this: A B C 1 1 0 0 2 0 1 0 3 1 0 0 4 0 0 1 My goal is to have only one "1" in each row and the "1" in the array should be equal to…
Yannis
  • 203
  • 4
  • 14
1
2