[mlpack-git] [mlpack/mlpack] CNE algorithm (#753)

Excalibur notifications at github.com
Sun Aug 7 18:15:45 EDT 2016


> +  void Evolve() {
> +    // Generate initial species at random.
> +    int generation = 0;
> +    InitSpecies();
> +    
> +    // Repeat
> +    while (generation < aMaxGeneration) {
> +    	// Evaluate all genomes in the species.
> +      for (int i=0; i<aSpecies.SpeciesSize(); ++i) {
> +        double fitness = aTask.EvalFitness(aSpecies.aGenomes[i]);
> +        aSpecies.aGenomes[i].Fitness(fitness);
> +      }
> +      aSpecies.SetBestFitnessAndGenome();
> +
> +    	// Output some information.
> +      printf("Generation: %zu\tBest fitness: %f\n", generation, aSpecies.BestFitness());

Good idea, I will revise.

---
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/753/files/10b99ab5c6e8d2836d231fa60a898cc03f7d9192#r73810173
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160807/3bdeea5b/attachment.html>


More information about the mlpack-git mailing list