[galib] GA doesn't evaluate all mutated individuals

Daniel Marbach daniel.marbach at epfl.ch
Sun Nov 28 15:57:15 EST 2004


> You might be interested in the following thread on the same subject:
>
> http://mailman.mit.edu/pipermail/galib/1999-May/000145.html
>

Thanks, but the thread mentioned above discusses always evaluating all the
individuals - it is clear to me how to do that with evaluate(gaTrue) (I studied
the documentation...)

I don't want to evaluate all the individuals, but only those that mutated, i.e.
those where the mutator returned a value greater than 0. When the mutator
returns 0, that means that nMut=0, i.e. the genome was not mutated. If no
crossover was used and no mutation occured, the individual should obviously not
be re-evaluated (waste of time), so evaulate(gaTrue) is not good in my case.

As I mentioned, I actually solved my problem by adding the following lines to
the mutation function of my genome:

> >if (nMut > 0)
> >   _evaluated = gaFalse;

I was just wondering why the galib GA doesn't take care of this (or what I did
wrong so that it didn't re-evaluate mutated genomes...)


Greetings,

  Daniel



> Daniel Marbach wrote:
>
> >Hi,
> >
> >
> >I'm using galib to co-evoleve configuration and control of modular robots.
> At
> >the beginning I was very happy with galib, but by now I must say that I
> spent
> >more time studying the library and customizing stuff than it would have
> taken to
> >implement the GA from scratch. But that's just because I customize/extend
> almost
> >everything (Genome, selection, replacement, scaling, mutation...), I
> believe
> >galib can be highly beneficial for users with more 'standard' genomes.
> >
> >I had a problem that cost me a lot of time - I don't know if it is a bug in
> >galib or if I
> >did something wrong:
> >
> >For a long time, the performance of my GA (a GASteadyStateGA) was not very
> good
> >and weird things happened (e.g. weak individuals had a high fitness). By
> >coincidence I discovered, that the GA was not always evaluating all the
> >individuals that mutated. Adding the following lines to my mutation
> function
> >solved the
> >problem:
> >
> >if (nMut > 0)
> >   _evaluated = gaFalse;
> >
> >Shouldn't galib do that for me? Or what did I do wrong that I had to add
> these
> >lines?
> >
> >
> >Thanks for your help,
> >   Daniel
> >
> >PS: My genome class extends GATreeGenome<GARealGenome>.


More information about the galib mailing list