generic-github-user / Caesium

General-purpose AI library with NEAT-style genetic algorithm.
https://generic-github-user.github.io/Caesium/src/versions/javascript/projects/network-visualization/
MIT License
1 stars 1 forks source link

Zero values in network force multiplication node values to zero #12

Closed generic-github-user closed 5 years ago

generic-github-user commented 5 years ago

4.24 * 5.75 * 9.89 * 0.00 = 0.00

Not technically a bug . . . This is a bug.

generic-github-user commented 5 years ago

Fixed issue - when updating the values of nodes, the new values were being added/multiplied on top of the existing value. Added code to reset destination node values before adding or multiplying other values.

Addition

this.connections[i].destination.output = 0;

Multiplication

this.connections[i].destination.output = 1;