[mlpack-git] [mlpack/mlpack] Neural evolution algorithms implementation (CNE, NEAT, HyperNEAT) (#686)
Marcus Edel
notifications at github.com
Thu Jul 14 20:29:53 EDT 2016
> + // Breed children in each species.
> + std::vector<double> speciesAverageRank;
> + CalcSpeciesAverageRank(aPopulation, speciesAverageRank);
> + //DEBUGGING!!!!!!!!!
> + printf("Species average rank are: ");
> + for (ssize_t s=0; s<speciesAverageRank.size(); ++s) {
> + std::cout<< speciesAverageRank[s] << " ";
> + }
> + printf("\n");
> + //DEBUGGING!!!!!!!!!
> +
> + double totalAverageRank = std::accumulate(speciesAverageRank.begin(), speciesAverageRank.end(), 0);
> + std::vector<Genome> childGenomes;
> + for (ssize_t i=0; i<aPopulation.aSpecies.size(); ++i) {
> + // number of child genomes by this species.
> + ssize_t numBreed = std::floor(speciesAverageRank[i] * aPopulationSize / totalAverageRank) - 1;
That's the right position, I would go with offspring here.
---
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/48e15c45ab1a9c65dbd8fe3fe6f07e368c965883#r70906305
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160714/35a49adc/attachment.html>
More information about the mlpack-git
mailing list