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

Marcus Edel notifications at github.com
Sat Jun 11 15:04:58 EDT 2016


> +  // Destructor.
> +  ~Population() {}
> +
> +  // Set/get best fitness.
> +  double& BestFitness() { return aBestFitness; }
> +
> +  // Set best fitness to be the minimum of all genomes' fitness.
> +  void SetBestFitness() {
> +    if (aGenomes.size() == 0) 
> +      return;
> +
> +    aBestFitness = aGenomes[0].Fitness();
> +    for (size_t i=0; i<aGenomes.size(); ++i) {
> +      if (aGenomes[i].Fitness() < bestFitness) {
> +        aBestFitness = aGenomes[i].Fitness();
> +      }

I'm not sure right now, but doesn't HyperNEAT keep more than the best genome from a population? So maybe it's a good idea to add or modify another function that returns the k best 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/65f093daf32f6cb353cd6b9304bab88a5e096fdc#r66710258
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160611/1d685085/attachment.html>


More information about the mlpack-git mailing list