DEAP / deap

Distributed Evolutionary Algorithms in Python
http://deap.readthedocs.org/
GNU Lesser General Public License v3.0
5.69k stars 1.11k forks source link

SPEA2 in DEAP #276

Open aut0 opened 6 years ago

aut0 commented 6 years ago

Hello,

the selSPEA2 function does not assign a distance measure to the individuals. According to "SPEA2: Improving the Strength Pareto Evolutionary Algorithm" by Zitzler et al. the fitness of an individual consists of two parts in SPEA2: The number of individuals the individual dominates as well as a distance measure D(i)=\frac{1}{\sigma_i^k+2}. If I understand correctly the distance measure is calculated in selSPEA2 and used for truncation, but not assigned to the individuals. So selSPEA2 implements "Step 3" of the algorithm. For "Step 5" a binary tournament selection should be performed. If I understand the paper correctly this tournament is based on fitness which is in turn based on distance measure and domination. Therefore selTournamentDCD could be used for this if a crowding distance would be assigned but it isn't. Can "Step 5" of the algorithm be implemented with DEAP in another way?

Thanks, Lukas

fmder commented 6 years ago

You are right, the distance should probably be assigned to the individual during the algorithm so that the dcd tournament can be done. However, it is especially old code (blame gives 5 years but it is only when we separated the tools nin different modules), and I can't say rapidely where that assignement should be done. I'll look into it when I have more than a couple of minutes.