DEAP / deap

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

How to add NSPSO into the repository #277

Open AshTex opened 6 years ago

AshTex commented 6 years ago

Hi,

I'd like to add NSPSO (as found in Li, X., 2003, July. A non-dominated sorting particle swarm optimizer for multiobjective optimization. In Genetic and Evolutionary Computation Conference (pp. 37-48). Springer, Berlin, Heidelberg.) into the DEAP examples/toolset.

As per the name it's closely based on the NSGA-II algorithm. I could include it by using the tools.selNSGA selection method and add an argument to allow the user to choose the crowd-penalty mechanism or create an entirely new selection function (selNSPSO) that would handle it but would be almost identical to selNSGA

AshTex commented 6 years ago

I've made a start on this. The repo is here. It gets to the end but is pretty awful at finding the zd1 front from the benchmarks. In the paper referenced above it should be able to find that function relatively easily.

fmder commented 6 years ago

I would go for the selNSPSO function. selNSGA2 is only a few lines of code, we don't want to over complicate a function just to save a few lines.