<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r71090227">src/mlpack/methods/ne/neat.hpp</a>:</p>
<pre style='color:#555'>&gt; +    childGenomes.push_back(lastBestGenome);
&gt; +    ssize_t currentNumGenome = childGenomes.size() + aPopulation.PopulationSize();
&gt; +    while (currentNumGenome &lt; aPopulationSize) {
&gt; +      ssize_t speciesIndex = mlpack::math::RandInt(0, aPopulation.aSpecies.size());
&gt; +      Genome genome;
&gt; +      bool hasBaby = BreedChild(aPopulation.aSpecies[speciesIndex], genome, aCrossoverRate);
&gt; +      if (hasBaby) {
&gt; +        childGenomes.push_back(genome);
&gt; +        ++currentNumGenome;
&gt; +      }
&gt; +    }
&gt; +
&gt; +    // Speciate genomes into new species.
&gt; +    std::vector&lt;Genome&gt; populationGenomes;
&gt; +    AggregateGenomes(aPopulation, populationGenomes);
&gt; +    aPopulation.aSpecies.clear();
</pre>
<p>If we clear all species, we lose the information about the species age, also I'm not sure, why we have to reassign the genomes.</p>

<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/66b0f4171ab0c6810cf3058e653e48d18c4913be#r71090227">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFDacDBGzAiOWGMEdzqaOfyzCqV_jks5qWqPxgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCFdOJF0G4c9hBtvCkZeP9f_QOsZks5qWqPxgaJpZM4IwJa6.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/66b0f4171ab0c6810cf3058e653e48d18c4913be#r71090227"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>