carrot icon indicating copy to clipboard operation
carrot copied to clipboard

popsize more than 500 crashes

Open dan-ryan opened this issue 6 years ago • 8 comments

When I set my popsize on Neat over 500 it crashes when I run neat.evolve(). I'm using the latest version of Node.js and Carrot. The memory with popsize as 500 is only ~100megs, so that doesn't seem to be the issue.

(node:19260) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'score' of undefined
    at Neat.evolve (D:\Git\DayTradingBot\DayTradingBot\node_modules\@liquid-carrot\carrot\src\neat.js:140:32)
    at endEvaluation (D:\Git\DayTradingBot\DayTradingBot\app.js:480:10)
    at learnData (D:\Git\DayTradingBot\DayTradingBot\app.js:325:13)
    at downloadBtcData (D:\Git\DayTradingBot\DayTradingBot\app.js:229:5)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:19260) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:19260) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:12304) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toJSON' of undefined
    at Neat.export (D:\Git\DayTradingBot\DayTradingBot\node_modules\@liquid-carrot\carrot\src\neat.js:346:24)
    at learnData (D:\Git\DayTradingBot\DayTradingBot\app.js:342:60)
    at downloadBtcData (D:\Git\DayTradingBot\DayTradingBot\app.js:229:5)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:12304) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 11)```

dan-ryan avatar May 05 '19 07:05 dan-ryan

@luiscarbonell You should be able to repeat it easily with the code I gave you.

dan-ryan avatar May 05 '19 22:05 dan-ryan

In my latest changes, it no longer crashes but the generation count doesn't increase, so odd...

dan-ryan avatar May 21 '19 11:05 dan-ryan

@dan-ryan We've been seeing a lot of these silent failures also.

We're cleaning some of them out with unit testing.

We'll use Mocha and Chai for now.

@christianechevarria Ran into ritewayt by Eric Elliot - but we haven't done extensive work with it yet...

luiscarbonell avatar May 22 '19 02:05 luiscarbonell

So far, that we know of, we've cleaned out 7 silent bugs.

luiscarbonell avatar May 22 '19 02:05 luiscarbonell

I'll close this for now since we haven't been able to replicate on our end.

luiscarbonell avatar May 22 '19 02:05 luiscarbonell

Great. I'll test it with the latest code later tonight.

dan-ryan avatar May 22 '19 03:05 dan-ryan

I'm still having generation count issues. Sometimes it works a little higher than a population size of 500 but usually, 2000+ doesn't.

dan-ryan avatar May 22 '19 22:05 dan-ryan

Will have to create a test where we can increase popsize to Number.MAX_SAFE_INTEGER or Number.MAX_VALUE - ideally.

luiscarbonell avatar May 23 '19 06:05 luiscarbonell