evaluate() method of FitnessFunction not called
Brought to you by:
klausikm
I've written a genetic algorithm using JGap 2.4.
It seems that the evaluate() method of the fitness
function is just called within the first generation
(and so the population.evolve() will not work).
I've also overwritten the evaluate() method of
the "traveling salesman" example provided in the
sources and the it was also just called within the
first generation.
I've downloaded version 2.3 of JGAP and everything
worked fine.
Logged In: YES
user_id=1318150
is it a known bug or did i do sth. wrong?
Logged In: YES
user_id=722855
You are right, there is a bug in the codebase, which will
soon be fixed. I then will release a new version, JGAP 2.5.
Logged In: YES
user_id=722855
Until the new release you could change the code in class
org.jgap.Chromosome, method getFitnessValue(): Just replace
the whole logic within the method with:
return calcFitnessValue();
This will do the job but is not that performant, so a more
sophisticated bug fix would be appropriate.
Logged In: YES
user_id=722855
You could find the current release fixing the bug in the
CVS. Please check out any classes since there are severel
ones involved with the bug fix.