peter-ch / MultiNEAT

Portable NeuroEvolution Library
http://MultiNEAT.com
GNU Lesser General Public License v3.0
328 stars 104 forks source link

For loop overwrites did_mutate every iteration #61

Open jherico opened 4 years ago

jherico commented 4 years ago

https://github.com/peter-ch/MultiNEAT/blob/0dc93aa0e228e23eeb95371bdd3838c64f08fdae/src/Genome.cpp#L2697

Should be did_mutate |= true

As it stands this code will set did_mutate to the result for the last neuron, rather than the OR value of all the nueron mutation results, which is presumably what's desired. This error is repeated throughout the remainder of the code.

peter-ch commented 4 years ago

Yes, thanks, I'll fix that.