HyperCodec / neat

Crate for implementing NeuroEvolution of Augmenting Topologies
MIT License
3 stars 0 forks source link

`max_index` function can panic #59

Closed HyperCodec closed 3 weeks ago

HyperCodec commented 1 month ago

Somehow (in very rare circumstances) the partial_cmp will return None. I believe this may be caused by #53.

thread 'main' panicked at /workspaces/neat/src/runnable.rs:296:57:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
HyperCodec commented 1 month ago

Both this and the NaN issue occurred on the same branch, and given how rare this ought to be, it might actually just be caused by a breaking change in the activation fn registry.

HyperCodec commented 3 weeks ago

image yes, this is caused by NaN.

HyperCodec commented 3 weeks ago

I think in this scenario, it's caused by log functions returning NaN when they are provided 0 as input.