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

Excalibur notifications at github.com
Sat Jun 11 14:59:56 EDT 2016


> +class Population {
> + public:
> +  // Genomes.
> +  std::vector<Genome> aGenomes;
> +
> +  // Parametric constructor.
> +  // TODO: whether randomize, random range, as parameter or not??
> +  Population(Genome& seedGenome, size_t populationSize) {
> +    aPopulationSize = populationSize;
> +    aBestFitness = -1; // -1 denotes haven't evaluate yet.
> +
> +    // Create genomes from seed Genome.
> +    for (size_t i=0; i<populationSize; ++i) {
> +      Genome genome = seedGenome;
> +      genome.Id() = i;
> +      aGenomes.push_back(genome);

Oh! Got it, good idea!

---
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#r66710199
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160611/01e58068/attachment.html>


More information about the mlpack-git mailing list