Closed brentspine closed 1 year ago
Bump
As long as output[0] and xo[0] are floats, (output[0] - xo[0]) ** 2 should always be positive, so there's no need for the abs. Does this seem right or am I missing something?
Oh yes then it's my misunderstanding
Let's say we test xor_inputs[1] in the current iteration. The expected output would be xor_outputs[1], meaning 1.
output = net.activate(xi)
will now let the model predict an output. In our example, the model predicts 0. Based on that the following line should remove fitness for the wrong guess. Though through the fact, xo[0] would be 1 and output would be 0, the linegenome.fitness -= (output[0] - xo[0]) ** 2
would not decrease the genome.fitness variable but rather increase it.