[galib] Best Genomes

Miguel Nicolau Miguel.Nicolau at ul.ie
Fri Nov 4 09:24:17 EST 2005


Hi Rui,

to access the previous best and current best, you might consider using 
the ga.done() cycle (which you are already, I guess):

while(!ga.done()){
   ...
   ga.step();
   ...
}

Then call ga.statistics().bestIndividual() both before and after the 
call to ga.step(). You should copy the individuals returned, 
particularly before the call to ga.step(), as that individual might have 
changed after the call to ga.step().

Hope this helps

.Miguel.

Rui Tavares wrote:
> Hi,
> 
> I'm having difficulties keeping/accessing the two best genomes. I'ld 
> like to access the present best and the previous best genomes.
> I've looked into GAStatistics, but only gives me the (one) best genome.
> 
> Thanks in advance,
> 
>    R. Santos Tavares
> 
> _______________________________________________
> galib mailing list
> galib at mit.edu
> http://mailman.mit.edu/mailman/listinfo/galib


More information about the galib mailing list