<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r69383794">src/mlpack/methods/ne/neat.hpp</a>:</p>
<pre style='color:#555'>> + bool BreedChild(Species& species, Genome& childGenome, double crossoverProb) {
> + ////printf("breed 1\n");
> + double p = mlpack::math::Random();
> + ssize_t speciesSize = species.aGenomes.size();
> + ////printf("species size is %d \n", speciesSize);
> + ////printf("breed 2\n");
> + if (speciesSize == 0)
> + return false;
> +
> + if (p < crossoverProb) {
> + ssize_t idx1 = mlpack::math::RandInt(0, speciesSize);
> + ssize_t idx2 = mlpack::math::RandInt(0, speciesSize);
> + ////printf("idx1 is %d\n", idx1);
> + ////printf("idx2 is %d\n", idx2);
> + ////printf("breed 3\n");
> + Crossover(species.aGenomes[idx1], species.aGenomes[idx2], childGenome);
</pre>
<p>Is it possible to do a crossover using the same genomes?</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/554a279b0089e4385dfb40077e578d6ae2a42ece#r69383794">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFFzSHlNREa6KnAvxkzH-5ZJHt_zuks5qRvebgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFIpxNhjB2Gjl43Z6WlBtuwRS9eNuks5qRvebgaJpZM4IwJa6.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/554a279b0089e4385dfb40077e578d6ae2a42ece#r69383794"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>