[Paradiseo-help] [Paradiseo-users] Correct use of moeoObjectiveVectorTraits

Christoph Redecker redecker at avrbeginners.net
Mer 24 Avr 11:42:32 CEST 2013

Just to provide more information about the interconnection between 
objectives and gene encoding:

I have a configuration file which contains information about the following:

- the number of genes each individual has. All individuals have an equal 
number of genes, but that number can change between runs
- the mapping of a set of genes to a fitness value
- what values a gene can have
- parameters for evaluation

Basically, all eo functions (init, eval, mutations) need to know almost 
all of this information. I pass a reference to the config to each 
function constructor. I feel fine about this because I know where the 
information comes from and where it goes.

I'm not so confident about the traits, because I'm not too familiar with 
paradisEO yet. The answers I received so far indicate that I'm on the 
right track.

Thank you for your replies so far!



Am 24.04.2013 11:07, schrieb Johann Dréo:
> On Sun, Apr 21, 2013 at 9:41 PM, Christoph Redecker
> <redecker at avrbeginners.net <mailto:redecker at avrbeginners.net>> wrote:
>  > this is the first time I'm implementing an EO algorithm. I have an
>  > optimization problem with several objectives. I want to load a
>  > configuration file before the EO algorithm runs, then initialize my
>  > population and optimize away.
>  >
>  > For an object to be created, the number of objectives and the number of
>  > genes must be known. Both are known after the configuration has been
>  > loaded. My questions are:
>  >
>  > 1) moeoObjectiveVectorTraits has a private static unsigned int nObj
>  > property. Where and when is that set, and what information is that
>  > setting based on?
> Generally, you inherit your own class from that one and overload
> nObjectives to return a const.
>  > 2) Can I just create my own public nObj property in a class derived from
>  > moeoObjectiveVectorTraits and return that in nObjectives()? Would that
>  > have any drawbacks or cause bugs with other parts of the framework?
> I think it's OK, but maybe you should use the "setup" method, that seems
> to be here to handle a dynamic number of objectives.
>  > 3) Is it customary to store all available configuration data related to
>  > the problem in a class derived from moeoObjectiveVectorTraits?
> If you mean data related to the number of objectives, I would say yes.
> Else, it depends on the semantic of your data.
> I would personally try to maintain a separation of concern, by
> implementing my own:
> * moeoObjectiveVectorTraits for data related to the number of objectives
> and their "direction" (min or max);
> * MOEO, for data related to the fitness computation (note that an MOEO
> embeds an moeoObjectiveVectorTraits).
> If you have data related to the gene encoding, your own EOT is a better
> place.
> But keep in mind that if those data are only useful for generating your
> individuals, surely the initialization operators are a far more better
> place (instanciated once).
> --
> nojhan

Paradiseo-users mailing list
Paradiseo-users at lists.gforge.inria.fr

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