[mlpack-git] [mlpack/mlpack] NeuralEvolution - implemented gene, genome (#686)
Excalibur
notifications at github.com
Sat Jun 11 14:55:36 EDT 2016
> + // 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);
> + }
> +
> + // Randomize genome weights.
> + for (size_t i=0; i<populationSize; ++i) {
> + aGenomes[i].RandomizeWeights(-1, 1);
> + }
But I think whether randomize it or not is a choice (though for ne algorithms, it is required). Rather than putting it in the initialization of a single genome, I think it is more suitable to be put in the InitPopulation() step. How do you think?
---
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#r66710148
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160611/e283b5c9/attachment.html>
More information about the mlpack-git
mailing list