[galib] Best Genomes

Rui Tavares rmt at uninova.pt
Fri Nov 4 09:58:06 EST 2005


I was thinking on setting a (new) terminator function ... and inside, 
check if the previous and current "best" genomes values were equal, or 
at least closer ...

Sincerelly,

R. Santos Tavares

Miguel Nicolau wrote:

> 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
>
> _______________________________________________
> galib mailing list
> galib at mit.edu
> http://mailman.mit.edu/mailman/listinfo/galib
>
>



More information about the galib mailing list