[mlpack-git] [mlpack/mlpack] NeuralEvolution - implemented gene, genome (#686)
Excalibur
notifications at github.com
Mon Jul 11 22:34:50 EDT 2016
> + true);
> + genome.AddLink(inputLink);
> + genome.AddLink(outputLink);
> + }
> +
> + // Mutate: enable disabled, or disable enabled link.
> + void MutateEnableDisable(Genome& genome, bool enabled, double mutateProb) {
> + std::vector<ssize_t> linkIndexs;
> + for (ssize_t i=0; i<genome.NumLink(); ++i) {
> + if (genome.aLinkGenes[i].Enabled() == enabled) {
> + linkIndexs.push_back(i);
> + }
> + }
> +
> + double p = mlpack::math::Random();
> + if (p<mutateProb && linkIndexs.size()>0) {
Good idea, revised!
---
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/554a279b0089e4385dfb40077e578d6ae2a42ece#r70369424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160711/30524e92/attachment.html>
More information about the mlpack-git
mailing list