<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r66710258">src/mlpack/methods/ne/population.hpp</a>:</p>
<pre style='color:#555'>&gt; +  // Destructor.
&gt; +  ~Population() {}
&gt; +
&gt; +  // Set/get best fitness.
&gt; +  double&amp; BestFitness() { return aBestFitness; }
&gt; +
&gt; +  // Set best fitness to be the minimum of all genomes&#39; fitness.
&gt; +  void SetBestFitness() {
&gt; +    if (aGenomes.size() == 0) 
&gt; +      return;
&gt; +
&gt; +    aBestFitness = aGenomes[0].Fitness();
&gt; +    for (size_t i=0; i&lt;aGenomes.size(); ++i) {
&gt; +      if (aGenomes[i].Fitness() &lt; bestFitness) {
&gt; +        aBestFitness = aGenomes[i].Fitness();
&gt; +      }
</pre>
<p>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?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/686/files/65f093daf32f6cb353cd6b9304bab88a5e096fdc#r66710258">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFL5_OGKpeXxTqtEnUzZcvaImgBL6ks5qKwbagaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOoW8UpxnX8a9nr3Mg6VwZmKoTJrks5qKwbagaJpZM4IwJa6.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/686/files/65f093daf32f6cb353cd6b9304bab88a5e096fdc#r66710258"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>