<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r70661513">src/mlpack/methods/ne/neat.hpp</a>:</p>
<pre style='color:#555'>> + // 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();
</pre>
<div class="email-fragment">Yeah, my current version fixed this.</div>
<span class="email-hidden-toggle"><a href="#">…</a></span><div class="email-hidden-reply" style="display:none">
<div class="email-quoted-reply">On Wednesday, 13 July 2016, Marcus Edel ***@***.***> wrote:
In src/mlpack/methods/ne/neat.hpp
<<a href="https://github.com/mlpack/mlpack/pull/686#discussion_r70661281" class="issue-link js-issue-link" data-url="https://github.com/mlpack/mlpack/issues/686" data-id="158975273" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#686 (comment)</a>>:
> + // 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
<<a href="https://github.com/mlpack/mlpack/pull/686/files/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661281">https://github.com/mlpack/mlpack/pull/686/files/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661281</a>>,
or mute the thread
<<a href="https://github.com/notifications/unsubscribe/AD9tIZxBMpJVkbYl6W-nxSAtDPhelQqaks5qVRR-gaJpZM4IwJa6">https://github.com/notifications/unsubscribe/AD9tIZxBMpJVkbYl6W-nxSAtDPhelQqaks5qVRR-gaJpZM4IwJa6</a>>
.
</div>
<div class="email-fragment"></div>
</div>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<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/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661513">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFMXPOxOhks_DyiH9yvlV5d96UCGJks5qVRTAgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDBODlrdZGZOv5qwhMaM7LzaunkNks5qVRTAgaJpZM4IwJa6.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/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70661513"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>