Forcing Evaluation

Yossi Mossel ymossel at hotmail.com
Sun Aug 11 08:16:04 EDT 2002


Hi All,
  I am using galib with a noisy objective function - it does not always
return the same value for a specific genome.
As I am using elitism my best genomes from each generation get passed on 
from generation to generation without being re-evaluated.  I know this to be 
the case because the fitness of the best genome is a  monotonously 
increasing step function - this being highly unlikely considering how noisy 
my objective function is.  I would like to force galib to re-evaluate my 
genome in each generation.

I wrote the following population evaluator:

void PopEvaluator(GAPopulation & p)
{
  for(int i=0; i<p.size(); i++)
    p.individual(i).evaluate(gaTrue);
}

and set it using:

GAPopulation& pop = const_cast<GAPopulation&>(ga.population());
pop.evaluator(&PopEvaluator);

I expected this to solve the problem as I force evaluation in the population 
evaluator.  What happens is a bit surprising, my evaluator is used only 
every other call to the population evaluator, the other call goes to the 
default population evaluator which does not force evaluation.

I would be most appreciative of any input regarding this,

Yossi Mossel
M.Sc student
computational neuroscience
Tel Aviv University


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




More information about the galib mailing list