How to always evaluate?

Anthony Liekens mooby at mail.dma.be
Wed May 5 10:36:44 EDT 1999


Ok,

As I was browsing through the documentation of GAlib last night, I saw
that one can change the population evaluator, and if I want to "always
evaluate" I could use the following evaluator :

1 void
2 PopulationAlwaysEvaluate(GAPopulation & p){
3   for(int i=0; i<p.size(); i++)
4     p.Individual(i).evaluate(gaTrue);
5 }

Especially the gaTrue at line 4 makes sure every genome is evaluated
every generation.

Fair enough to me, but now I have this new question... How do I tell
Galib, or the running genetic algorithm, that it's population has to be
evaluated with this population evaluator?

thanks in advance,

Anthony Liekens
liekens at alife.santafe.edu





More information about the galib mailing list