These are chat archives for DEAP/deap

11th
Jun 2015
eouti
@eouti
Jun 11 2015 14:31
Hi, congrats for this nice framework. I started to play around with nsga2 and basic optimization problems, it is great. Now i'd like to hack into more realistic optimization problem. Indeed, instead of list of floats, i'd like my individuals to have a custom model. Then, i need to implement the corresponding crossover, mutates... I also need to formalize the optimization problem. Any example on custom individual model and how to deal with it? I searched the web and this is this only relevant topic i found similar to my needs: https://groups.google.com/forum/#!msg/deap-users/KZYYHCGrFyY/x1nXcXpCyscJ
Fran├žois-Michel De Rainville
@fmder
Jun 11 2015 16:07
@eouti Thanks for the kind words. Usually, the transfer between the usual float vector optimization and a more realistic model is done through a genotypic <=> phenotypic translation. On the first hand, the phenotype is used for evaluation. It is the complex object that is the answer to your problem. The genotype, on the other hand, is the simpler object that is manipulated by the optimization algorithm. Since programmer time is much more costly than machine time, a translation phase in the evaluation function between a simple vector representation and your model is the ideal case. It will save you time and you will be able to use already implemented (and tested!) operators. Just as example, instead of trying to optimize a permutation of prime numbers, it is much simpler to optimize a permutation of integers (say [0, 1, 2, 3]) and, at evaluation time, translate them to primes using their index ([2, 3, 5, 7]). You can most often do the same with floats vectors.