[mlpack-git] [mlpack/mlpack] Neural evolution algorithms implementation (CNE, NEAT, HyperNEAT) (#686)

Marcus Edel notifications at github.com
Sun Jul 17 17:51:45 EDT 2016


> +    childGenomes.push_back(lastBestGenome);
> +    ssize_t currentNumGenome = childGenomes.size() + aPopulation.PopulationSize();
> +    while (currentNumGenome < aPopulationSize) {
> +      ssize_t speciesIndex = mlpack::math::RandInt(0, aPopulation.aSpecies.size());
> +      Genome genome;
> +      bool hasBaby = BreedChild(aPopulation.aSpecies[speciesIndex], genome, aCrossoverRate);
> +      if (hasBaby) {
> +        childGenomes.push_back(genome);
> +        ++currentNumGenome;
> +      }
> +    }
> +
> +    // Speciate genomes into new species.
> +    std::vector<Genome> populationGenomes;
> +    AggregateGenomes(aPopulation, populationGenomes);
> +    aPopulation.aSpecies.clear();

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.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/686/files/66b0f4171ab0c6810cf3058e653e48d18c4913be#r71090227
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160717/f329aa85/attachment.html>


More information about the mlpack-git mailing list