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

Excalibur notifications at github.com
Wed Jul 13 12:39:28 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();

Yeah, my current version fixed this.

On Wednesday, 13 July 2016, Marcus Edel <notifications at github.com> wrote:

> In src/mlpack/methods/ne/neat.hpp
> <https://github.com/mlpack/mlpack/pull/686#discussion_r70661281>:
>
> > +    // 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 commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/mlpack/mlpack/pull/686/files/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661281>,
> or mute the thread
> <https://github.com/notifications/unsubscribe/AD9tIZxBMpJVkbYl6W-nxSAtDPhelQqaks5qVRR-gaJpZM4IwJa6>
> .
>


---
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#r70661513
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160713/c5ef8d80/attachment.html>


More information about the mlpack-git mailing list