[mlpack-git] [mlpack/mlpack] NeuralEvolution - implemented gene, genome (#686)

Marcus Edel notifications at github.com
Tue Jun 14 09:19:49 EDT 2016


> +      return;
> +
> +    aBestFitness = aGenomes[0].Fitness();
> +    for (size_t i=0; i<aGenomes.size(); ++i) {
> +      if (aGenomes[i].Fitness() < aBestFitness) {
> +        aBestFitness = aGenomes[i].Fitness();
> +      }
> +    }
> +  }
> +
> +  // Sort genomes by fitness. First is best.
> +  static bool CompareGenome(Genome lg, Genome rg) {
> +    return (lg.Fitness() < rg.Fitness());
> +  }
> +  bool SortPopulation() {
> +    std::sort(aGenomes.begin(), aGenomes.end(), CompareGenome);

Probably that cases the travis ``unknown location(0): fatal error in "NECneXorTest": memory access violation at address: 0x00000101: no mapping at fault address`` error.

Not sure, do we need to return a bool here, or can we just use void?



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


More information about the mlpack-git mailing list