AddNodeStrategy.CreateChildGenome() has an unhandled case that results in an IndexOutOfRangeException
I'm running into a case where insertIdx1 is resolved to -1, which leads to stopIdx, copyLen and parentIdx being -1. IndexOutOfRangeException is thrown at connArr[childIdx] = newConnArr[newConIdx];
newConnArr: 0,14 8,0
newWeightArr: -0.4854858 1
parentConnArr: 0,14 4,14 8,14 13,14
parentWeightArr: -4.0975833 -3.7439632 -0.4854858 0.24271071
Hi. Was this on main branch? And have you seen this more than once?
This was on the main branch.
I may have tracked down the cause. I was reusing AddNodeStrategy rather than creating a new one for subsequent generations so the original sequence IDs were being reused.
At first glance it does seem that method doesn't handle when insertIdx1 is -1, so it's a bit odd that I've never seen this issue. It's quite a complex method and it's late here, so I'll need to take a fresh look at it another time. I feel like this method should be simplified and that I over optimised it perhaps.