HyperCodec / neat

Crate for implementing NeuroEvolution of Augmenting Topologies
MIT License
4 stars 1 forks source link

A neuron can depend on the same input multiple times #61

Closed HyperCodec closed 4 months ago

HyperCodec commented 4 months ago

Possibly the cause of #58, as I noticed this in the neuron dump by @Bowarc (also in #58). A neuron can have multiple references to the same neuron as input. This, when combined with rayon, makes it so that, as it performs parallelized iteration on the neurons, there is a chance they try to write to the same neuron at the same time, causing a deadlock.

HyperCodec commented 4 months ago

Merged #62, I don't really have a way of verifying that the changes I made worked due to chance, but it appears to work.