[Paradiseo-help] Paradiseo-MOEO: diversity preservation

Romanas Puisa rpuisa at gmail.com
Mar 6 Juil 13:26:45 CEST 2010

Dear Friends

Some time ago I turned to you with the diversity preservation problem in
Paradiseo-MOEO. I received an instant response, which helped me to find the
solution. However, that appeared to be temprary, as I still struggle.
Specifically, the search rather quickly converges to partly and sometimes
fully uniform populations  in the design and search spaces. So, populations
contain many equal individuals.
I a feeling that there might be something wrong with the optimiser settings
I'm using. I've pasted the piece of the code (in blue) that I use. Please
note that I changed class moeoNSGAII in such a way that it uses
*instead of default by front (not a nice temporal change). The reason is
that I use a constraint handling technique that makes fronts having only one

I'd appreciate any suggestion and idea. Thanks beforehand.


moeoUnboundedArchive<Sch1> a;
    moeoArchiveUpdater<Sch1> aupdater(a, pop);
    string fname = "front";
    moeoArchiveObjectiveVectorSavingUpdater<Sch1> fupdator(a, fname, true);

    eoGenContinue<Sch1> terminator(MAX_GEN);
    eoCheckPoint<Sch1> checkpoint(terminator); // if need be

    // Create a counter parameter
     eoValueParam<unsigned> generationCounter(0, "Gen.");
     // Create an incrementor (sub-class of eoUpdater). Note that the
     // parameter's value is passed by reference,
     // so every time the incrementer is updated (every generation),
     // the data in generationCounter will change.
     eoIncrementor<unsigned> increment(generationCounter.value());
     // Add it to the checkpoint,
     // so the counter is updated (here, incremented) every generation

     //eoBestFitnessStat<Sch1> bestStat;
     // Second moment stats: average and stdev
     //eoSecondMomentStats<Sch1> SecondStat;
     // Add them to the checkpoint to get them called at the appropriate
     // The Stdout monitor will print parameters to the screen ...
     eoStdoutMonitor monitor(false);

     // when called by the checkpoint (i.e. at every generation)
     // the monitor will output a series of parameters: add them

     // Last type of item the eoCheckpoint can handle: state savers:
     eoState outState;
     // Register the algorithm into the state (so it has something to
     // and feed the state to state savers
     // save state every 100th  generation
     eoCountedStateSaver stateSaver1(1, outState, "pop");

    eoSGATransform<Sch1> transform(crossover, P_CROSS, mutation, P_MUT);//,
transform(eoQuadOp, eoMonOp;

    // build NSGA-II
    moeoNSGAII < Sch1 > nsgaII(checkpoint, eval, transform);

    // help ?

    // run the algo
    nsgaII (pop);

On 21 April 2010 12:24, Romanas Puisa <rpuisa at gmail.com> wrote:

> Hi there,
> I'm using Paradiseo-MOEO for  constrained multiobjective optimisation. The
> problem I have is that my population tends to become uniform (all or almost
> all invididual are the same) from time to time during the search, probably
> once local optima are reached.
> I'm running NSGAII which uses 'moeoFrontByFrontCrowdingDiversityAssignment'
> for diversity preservation. There are surely also a possibility to use other
> methdos like the partent class 'moeoCrowdingDiversityAssignment' instead.
> I've tried to do this (by reimplementing NSGAII) but it does not seem
> helpful.
> I've looked at  the  NSGAII implementation, and in particualar at the
> method
> virtual void operator ()  <http://paradiseo.gforge.inria.fr/addon/paradiseo-moeo/doc/classmoeoNSGAII.html#60ba3ed4287efe81e1ff66b22e1d2e14>(eoPop < MOEOT > &_pop)
> 00133     {
> 00134         eoPop < MOEOT > offspring, empty_pop;
> 00135         popEval <http://paradiseo.gforge.inria.fr/addon/paradiseo-moeo/doc/classmoeoNSGAII.html#2926b2c13fbf66aa34ca8bb2d1268df4> (empty_pop, _pop);      // a first eval of _pop
> 00136         // evaluate fitness and diversity
> 00137         fitnessAssignment <http://paradiseo.gforge.inria.fr/addon/paradiseo-moeo/doc/classmoeoNSGAII.html#20fd563da176b72275be7f843c4aac7f>(_pop);
> 00138         diversityAssignment <http://paradiseo.gforge.inria.fr/addon/paradiseo-moeo/doc/classmoeoNSGAII.html#4abf4583668c6f145f4dbb0a24d2dae0>(_pop);
> 00139         do
> 00140         {
> 00141             // generate offspring, worths are recalculated if necessary
> 00142             breed <http://paradiseo.gforge.inria.fr/addon/paradiseo-moeo/doc/classmoeoNSGAII.html#17954849435e579d74bf37ed7b9063fc> (_pop, offspring);
> 00143             // eval of offspring
> 00144             popEval <http://paradiseo.gforge.inria.fr/addon/paradiseo-moeo/doc/classmoeoNSGAII.html#2926b2c13fbf66aa34ca8bb2d1268df4> (_pop, offspring);
> 00145             // after replace, the new pop is in _pop. Worths are recalculated if necessary
> 00146             replace <http://paradiseo.gforge.inria.fr/addon/paradiseo-moeo/doc/classmoeoNSGAII.html#75bc4b735c5de2a6fc93b2f2b63c7251> (_pop, offspring);
> 00147         }
> 00148         while (continuator <http://paradiseo.gforge.inria.fr/addon/paradiseo-moeo/doc/classmoeoNSGAII.html#7eb1e36631eebbe3216167b1077e3a53> (_pop));
> 00149     }
> of class 'moeoNSGAII' and found that the diversity assigment, function
> 'diversityAssignment', is called only once, just before the main loop.
> Perhaps there is a gap in my understanding of NSGAII, but I'd think that the
> diversity should be maintained all the time, hence being included in the
> main loop just after the evaluation, function popEval(). Am I correct? Could
> you please clarify this? I'd also appreciate if you could point out possible
> reasons of the population diversity shrinking problem I have.
> Thankful in advance,
> romas
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.gforge.inria.fr/pipermail/paradiseo-help/attachments/20100706/42f14e5d/attachment.html>

Plus d'informations sur la liste de diffusion Paradiseo-help