<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'>> + }
> +
> + // Add genome to existing species or create new species.
> + void AddGenomeToSpecies(Population& population, Genome& genome) {
> + for (ssize_t i=0; i<population.aSpecies.size(); ++i) {
> + if (population.aSpecies[i].aGenomes.size() > 0) {
> + if (IsSameSpecies(population.aSpecies[i].aGenomes[0], genome)) { // each first genome in species is the representative genome.
> + population.aSpecies[i].AddGenome(genome);
> + return;
> + }
> + }
> + }
> +
> + Species newSpecies = Species();
> + newSpecies.AddGenome(genome);
> + 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;">—<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>