Darwinbots Forum

Code center => Bugs and fixes => Bug reports => Topic started by: Peter on September 28, 2014, 10:30:50 AM

Title: DB can't even handle a few bots!
Post by: Peter on September 28, 2014, 10:30:50 AM
Get out of memory on a small sim. :(
Title: Re: DB can't even handle a few bots!
Post by: Shadowgod2 on September 28, 2014, 10:40:38 AM
that's small? 13000 bots is small? to me that's huge, i get about 1000 before it starts getting too slow.  :P
Title: Re: DB can't even handle a few bots!
Post by: Botsareus on September 28, 2014, 10:46:55 AM
Time to crankup autokills to prevent out of memory (again)
Title: Re: DB can't even handle a few bots!
Post by: Botsareus on September 28, 2014, 10:51:15 AM
Before I do so, how much times did you mess with the settings? That is a known memory leak.
Title: Re: DB can't even handle a few bots!
Post by: Peter on September 28, 2014, 10:59:54 AM
What do autokills do exactly?

On what I changed  I increased the max amount of chloroplasts quite a bit.  It wasn't really intended as a big report. Just a oh, it crashes when you get way too many bots.

Total, combined with the chloroplasts is ~33k bots not 13k. ;)
Title: Re: DB can't even handle a few bots!
Post by: Botsareus on September 28, 2014, 11:02:02 AM
Alright I will crank up auto kills a bit. It kills weak robots automatically to prevent out of memory.
Title: Re: DB can't even handle a few bots!
Post by: Botsareus on September 28, 2014, 11:44:28 AM
Hey Peter, since you have first hand experiance with this stuff. (I do not because my computer is an old one)
Can you read this formula and tell me what may be better:

The main factor is dna, so currently:

I calculate all dna lengths across robots and sum it (sperm shots and sperm dna not included)

If the dna is greater then 3825000 I do this:

TotalRobotsDisplayed is the total amount of robots on screen (vegys and such)

totlen is as above, a number greater then 3825000

Kill 1500 * (CLng(TotalRobotsDisplayed) * 425 / totlen) crappy robots.
Title: Re: DB can't even handle a few bots!
Post by: Peter on September 28, 2014, 12:08:39 PM
What is CLng?

Is it possible to stop reproduction at that point till it's back to proper levels?
Title: Re: DB can't even handle a few bots!
Post by: Botsareus on September 28, 2014, 12:17:18 PM
That means I have to hack yet another variable into global. Sure can in the next revision.

Oh, good old CLng :redface: Convert to a long number.