[mlpack-git] [mlpack/mlpack] Neural evolution algorithms implementation (CNE, NEAT, HyperNEAT) (#686)
Marcus Edel
notifications at github.com
Wed Jul 13 12:38:24 EDT 2016
> + // Reassign genome IDs.
> + aPopulation.ReassignGenomeId();
> + }
> +
> + // Evaluate genomes in population, set genomes' fitness.
> + void Evaluate() {
> + for (ssize_t i=0; i<aPopulation.aSpecies.size(); ++i) {
> + for (ssize_t j=0; j<aPopulation.aSpecies[i].aGenomes.size(); ++j) {
> + ////printf("start eval fitness\n");
> + double fitness = aTask.EvalFitness(aPopulation.aSpecies[i].aGenomes[j]);
> + ////printf("end eval fitness\n");
> + aPopulation.aSpecies[i].aGenomes[j].Fitness(fitness);
> + }
> +
> + double oldSpeciesBestFitness = aPopulation.aSpecies[i].BestFitness();
> + aPopulation.aSpecies[i].SetBestFitnessAndGenome();
The SetBestFitnessAndGenome returns the minimal fitness over all genomes, but for the CartPole task as it implemented right now a higher fitniss is better.
---
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/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661281
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160713/c4fbca7b/attachment.html>
More information about the mlpack-git
mailing list