<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r70661281">src/mlpack/methods/ne/neat.hpp</a>:</p>
<pre style='color:#555'>> + // Reassign genome IDs.
> + aPopulation.ReassignGenomeId();
> + }
> +
> + // Evaluate genomes in population, set genomes' fitness.
> + void Evaluate() {
> + for (ssize_t i=0; i<aPopulation.aSpecies.size(); ++i) {
> + for (ssize_t j=0; j<aPopulation.aSpecies[i].aGenomes.size(); ++j) {
> + ////printf("start eval fitness\n");
> + double fitness = aTask.EvalFitness(aPopulation.aSpecies[i].aGenomes[j]);
> + ////printf("end eval fitness\n");
> + aPopulation.aSpecies[i].aGenomes[j].Fitness(fitness);
> + }
> +
> + double oldSpeciesBestFitness = aPopulation.aSpecies[i].BestFitness();
> + aPopulation.aSpecies[i].SetBestFitnessAndGenome();
</pre>
<p>The SetBestFitnessAndGenome returns the minimal fitness over all genomes, but for the CartPole task as it implemented right now a higher fitniss is better.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/686/files/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661281">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFEDEsepOnjqiAtacgm8Iadl9VUbaks5qVRSAgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOA2L3gtIdxvl5SViLRKoJ3guXGbks5qVRSAgaJpZM4IwJa6.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/686/files/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661281"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>