Re: JGAP - simple question re evolve() and the fitness function evaluate()



Hi,

Here is an extract of my original post just showing the configuration
info.
[...]

Thanks for re-posting. I must have skipped that part of your original post.
Everything looked quite unsuspicious - besides the elitism that I would turn
of right now for tracking down the problem.

By the way, this is what the DefaultConfiguration looks like:
....
BestChromosomesSelector bestChromsSelector = new
BestChromosomesSelector(
this, 0.95d);
bestChromsSelector.setDoubletteChromosomesAllowed(false);
addNaturalSelector(bestChromsSelector, true);
setMinimumPopSizePercent(0);
setKeepPopulationSizeConstant(true);
setFitnessEvaluator(new DefaultFitnessEvaluator());
setChromosomePool(new ChromosomePool());
addGeneticOperator(new CrossoverOperator(this));
addGeneticOperator(new MutationOperator(this, 15));
....

Two idea:
1. I had a brief look at the BestChromosomesSelector.java. When
setDoubletteChromosomesAllowed(false) then a chromosome is not put twice
(i.e. at most once) into the next generation. However, I could not find out
what happens if doublette are disallowed and the next population is not
filled up yet. Maybe new ones are created, involving the invocation of
evaluate?
2. Maybe the individual is evaluated once it is created and once it is
mutated. Setting the mutation rate to a ridiculously high value should
quickly verify/refute this.

Good luck on finding the critical spot!

Regards,
Markus


.