Print

Print


Dear Sean,

Based on a previous conversation, I'm using 1 + 1 ES as RMHC on tree-
based individuals.

In your previous message, you wrote, in part:

> In a 1+1 ES,
> MuPlusLambdaBreeder puts the "parent" in the top of the population
> (state.population.subpops[subpop].inds[1]), and the "child" in the
> bottom (state.population.subpops[subpop].inds[0]).

I'm using the following settings:

generations =                           25500
pop.subpop.0.size =                     2
es.mu.0 =                               1
es.lambda.0 =                           1
breed =                                 ec.es.MuPlusLambdaBreeder

pop.subpop.0.fitness =                  ec.gp.koza.KozaFitness
pop.subpop.0.duplicate-retries =        0
pop.subpop.0.species =                   ec.gp.GPSpecies
pop.subpop.0.species.ind =              ec.gp.GPIndividual
pop.subpop.0.species.pipe =             ec.gp.koza.MutationPipeline
pop.subpop.0.species.pipe.source.0 =    ec.es.ESSelection


I've  been running a problem and getting an unexpected result. I'm
reporting the statistics for the parent at every climb
("generation"). I report:

generation
individual index (always 1 in this case)
raw fitness (which is just MAX - hits for my fitness function)
adjusted fitness
hits
size

Here is a report for the first 15 climbs. It shows that the fitness
did not change (I presume, therefore, there was no substitution of
child for parent using the configuration above) but then why is the
size of the individual changing?

0   1       319.0   0.003125    7   315
1   1       319.0   0.003125    7   315
2   1       319.0   0.003125    7   299
3   1       319.0   0.003125    7   345
4   1       319.0   0.003125    7   360
5   1       319.0   0.003125    7   525
6   1       319.0   0.003125    7   562
7   1       319.0   0.003125    7   606
8   1       319.0   0.003125    7   603
9   1       319.0   0.003125    7   658
10  1       319.0   0.003125    7   736
11  1       319.0   0.003125    7   835
12  1       319.0   0.003125    7   943
13  1       319.0   0.003125    7   1064
14  1       319.0   0.003125    7   1141
15  1       319.0   0.003125    7   1214

The exact code output for each line is:

         KozaFitness bestFitness = ( KozaFitness) best.fitness;
         state.output.print( "" + state.generation
                 + "\t" + bestIndex
                 + "\t"
                 + "\t" + bestFitness.rawFitness()
                 + "\t" + bestFitness.adjustedFitness()
                 + "\t" + bestFitness.hits
                 + "\t" + best.size()
                 + "\t"
                 + "\t"
                 + "\n", Output.V_NO_GENERAL, statLog);

I assume that by the time postEvaluationStatistics() is called, which
is where this is being printed, the best individual of the 2 is moved
into the "parent" slot, index 1. From what little I could glean from
the code, this is set up so that the child replaces the parent only
if the child is strictly better than the parent (not if it is equal)
but I could be wrong. If I report on index 1, the fitness is
monotonically non-decreasing. If I report on index 0, the fitness
does sometimes decrease. I'm assuming that this means that child was
not chosen. However, in both cases, the size of both is changing
which doesn't make sense to me.

Any help would be greatly appreciated.

Cheers,
Steve