[mlpack-git] [mlpack/mlpack] NeuralEvolution - implemented gene, genome (#686)
Marcus Edel
notifications at github.com
Sat Jun 11 14:57:33 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);
What I meant was to put ```aGenomes[i].RandomizeWeights(-1, 1); ``` right after we pushed it.
---
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#r66710168
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160611/6de6ec5a/attachment-0001.html>
More information about the mlpack-git
mailing list