<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r71061137">src/mlpack/methods/ne/neat.hpp</a>:</p>
<pre style='color:#555'>&gt; +  }
&gt; +
&gt; +  // Add genome to existing species or create new species.
&gt; +  void AddGenomeToSpecies(Population&amp; population, Genome&amp; genome) {
&gt; +    for (ssize_t i=0; i&lt;population.aSpecies.size(); ++i) {
&gt; +      if (population.aSpecies[i].aGenomes.size() &gt; 0) {
&gt; +        if (IsSameSpecies(population.aSpecies[i].aGenomes[0], genome)) {  // each first genome in species is the representative genome.
&gt; +          population.aSpecies[i].AddGenome(genome);
&gt; +          return;
&gt; +        }
&gt; +      }
&gt; +    }
&gt; +
&gt; +    Species newSpecies = Species();
&gt; +    newSpecies.AddGenome(genome);
&gt; +    newSpecies.Id(population.NextSpeciesId());  // NOTICE: changed species id.
</pre>
<p>Good point! revised.</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/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r71061137">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFPHE7ClHu6NfQREeg_M03EAuowhFks5qWGWkgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNl3NrTqrChctg0yfDWGtXMkPi9Pks5qWGWkgaJpZM4IwJa6.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#r71061137"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>