<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r70661513">src/mlpack/methods/ne/neat.hpp</a>:</p>
<pre style='color:#555'>&gt; +    // Reassign genome IDs.
&gt; +    aPopulation.ReassignGenomeId();
&gt; +  }
&gt; +
&gt; +  // Evaluate genomes in population, set genomes&#39; fitness.
&gt; +  void Evaluate() {
&gt; +    for (ssize_t i=0; i&lt;aPopulation.aSpecies.size(); ++i) {
&gt; +      for (ssize_t j=0; j&lt;aPopulation.aSpecies[i].aGenomes.size(); ++j) {
&gt; +        ////printf(&quot;start eval fitness\n&quot;);
&gt; +        double fitness = aTask.EvalFitness(aPopulation.aSpecies[i].aGenomes[j]);
&gt; +       ////printf(&quot;end eval fitness\n&quot;);
&gt; +        aPopulation.aSpecies[i].aGenomes[j].Fitness(fitness);
&gt; +      }
&gt; +
&gt; +      double oldSpeciesBestFitness = aPopulation.aSpecies[i].BestFitness();
&gt; +      aPopulation.aSpecies[i].SetBestFitnessAndGenome();
</pre>
<div class="email-fragment">Yeah, my current version fixed this.</div>
<span class="email-hidden-toggle"><a href="#">…</a></span><div class="email-hidden-reply" style="display:none">
<div class="email-quoted-reply">On Wednesday, 13 July 2016, Marcus Edel ***@***.***&gt; wrote:
 In src/mlpack/methods/ne/neat.hpp
 &lt;<a href="https://github.com/mlpack/mlpack/pull/686#discussion_r70661281" class="issue-link js-issue-link" data-url="https://github.com/mlpack/mlpack/issues/686" data-id="158975273" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#686 (comment)</a>&gt;:

 &gt; +    // Reassign genome IDs.
 &gt; +    aPopulation.ReassignGenomeId();
 &gt; +  }
 &gt; +
 &gt; +  // Evaluate genomes in population, set genomes' fitness.
 &gt; +  void Evaluate() {
 &gt; +    for (ssize_t i=0; i&lt;aPopulation.aSpecies.size(); ++i) {
 &gt; +      for (ssize_t j=0; j&lt;aPopulation.aSpecies[i].aGenomes.size(); ++j) {
 &gt; +        ////printf("start eval fitness\n");
 &gt; +        double fitness = aTask.EvalFitness(aPopulation.aSpecies[i].aGenomes[j]);
 &gt; +       ////printf("end eval fitness\n");
 &gt; +        aPopulation.aSpecies[i].aGenomes[j].Fitness(fitness);
 &gt; +      }
 &gt; +
 &gt; +      double oldSpeciesBestFitness = aPopulation.aSpecies[i].BestFitness();
 &gt; +      aPopulation.aSpecies[i].SetBestFitnessAndGenome();

 The SetBestFitnessAndGenome returns the minimal fitness over all genomes,
 but for the CartPole task as it implemented right now a higher fitniss is
 better.

 —
 You are receiving this because you commented.
 Reply to this email directly, view it on GitHub
 &lt;<a href="https://github.com/mlpack/mlpack/pull/686/files/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661281">https://github.com/mlpack/mlpack/pull/686/files/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661281</a>&gt;,
 or mute the thread
 &lt;<a href="https://github.com/notifications/unsubscribe/AD9tIZxBMpJVkbYl6W-nxSAtDPhelQqaks5qVRR-gaJpZM4IwJa6">https://github.com/notifications/unsubscribe/AD9tIZxBMpJVkbYl6W-nxSAtDPhelQqaks5qVRR-gaJpZM4IwJa6</a>&gt;
 .
</div>
<div class="email-fragment"></div>
</div>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<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#r70661513">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFMXPOxOhks_DyiH9yvlV5d96UCGJks5qVRTAgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDBODlrdZGZOv5qwhMaM7LzaunkNks5qVRTAgaJpZM4IwJa6.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#r70661513"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>