[galib] Problems with Terminator
Simon Martin
martin at ikr.uni-stuttgart.de
Tue Sep 26 09:45:40 EDT 2006
Hello,
I have made my own Terminator for my optimization problem. But there occurs a
quite strange phenomena (see code below). The terminator doesn't stop the
algorithm, when the condition is fulfilled, but the algorithm runs a few more
times until it stops.
How can I stop the algorithm immediately, when genome.score() fulfills the
condition?
Here is my code:
GABoolean MyTerminator1(GAGeneticAlgorithm & ga) {
if (ga.statistics().current(GAStatistics::Maximum)==1)
return gaTrue;
else
return gaFalse;
}
Thanks.
BR,
Simon Martin
More information about the galib
mailing list