6242Fwd: SharpNeat 2.2 Network Decorder Bug
- Jan 16, 2014In the latest version of SharpNeat (2.2) downloaded from http://sourceforge.net/projects/sharpneat/files/. There is a subtle but high impact bug in using FastAcyclicNetworkFactory.cs that switches activation functions for nodes through an incorrect id transform.On line 95, the for loop sets all the activation functions for the order expected in the new sorted node list. However, the transform array newIdxByDefinitionIdx is the reverse of what the loop is looking for. It needs the original list idx given the new ordered list idx, but that array does the opposite which mixes up activation functions. I've attached a corrected version (a shame this library isn't on GitHub...) that I've found transforms activation functions appropriately. It simply creates an array that tracks original indexes given the new indexes and uses that for assigning activation functions.I haven't used the cyclic network factories, but they don't need to transform ids in the same way because the nodes are sorted differently. The impact is incorrect networks using the FastAcyclicNetworkFactory only if the genome's nodes depend on different activation functions. Hope this helps! Let me know if anyone's findings are different than what I describe.
- Next post in topic >>