So the bug seems to have stemmed from a different bug in the crossover method. While the method would have been correct in all other syntaxes, in Java, setting one object equal to another object does not actually copy the properties into the object, rather it stores a reference. I was taking in a parameter for the child neuron that would be outputted, and setting it equal to the mother neuron (only if the crossover rate didn't fire, which is why it didn't happen every time). The child neuron then only stored a reference to the mother neuron, but the mother was deleted after the epoch (creation of a new generation) ended.
Sunday, November 29, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment