
}

// Breed the next individuals
for(var i = 0; i &lt; neat.popsize - neat.elitism; i++){
  newPopulation.push(neat.getOffspring());
}

// Replace the old population with the new population
neat.population = newPopulation;
neat.mutate();

neat.generation++;
startEvaluation();
</code></pre>

<p>The above code shows the code run when the evaluation is finished. It is very similar
to the built-in <code>evolve()</code> function of Neataptic, however adapted to avoid a fitness
function as all genomes must be ev