HyperNEAT icon indicating copy to clipboard operation
HyperNEAT copied to clipboard

error in activation function ONES_COMPLIMENT?

Open guillaumecherel opened this issue 9 years ago • 1 comments

I was reading your code to see what activation functions were used and noticed that the computation of activation function ONES_COMPLIMENT (e.g. in files NEAT_FractalNetwork.cpp and NEAT_FastNetwork.cpp, and may be others) contains the following lines where the second overrides the result of the first, which looks like an error. Should there be another variable instead of retVal on the first line?

(line 839) retVal = max(0.0,tmpVal2);  
(line 840) retVal = 1.0-tmpVal2;

guillaumecherel avatar Jul 09 '15 09:07 guillaumecherel

Yeah I think it should be tmpVal2 = max(0.0, tmpVal2). Can you fix and submit a pull request?

MisterTea avatar Sep 02 '16 17:09 MisterTea