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

network.inputs() function not working #35

Closed generic-github-user closed 5 years ago

generic-github-user commented 5 years ago

The inputs are not assigned to the correct network.

generic-github-user commented 5 years ago

Fixed issue - replaced input_nodes[i].value = inputs[i]; with this.input_nodes[i].value = inputs[i];

The input_nodes array is created for each network - the code was referencing the global variable that the array is created from, which contained references to the nodes of the most recently created network (population[99]).