Darwinbots Forum

Code center => Suggestions => Old Suggestions Awaiting Programming => Topic started by: shvarz on April 12, 2005, 12:27:28 AM

Title: Limit on number of bots
Post by: shvarz on April 12, 2005, 12:27:28 AM
I just lost about 3 million cycles of evolution sim due to overflow caused by the number of bots going above 2000.  Can we fix it somehow?  I understand that it might be difficult and/or cpu-time-consuming, but maybe we can have some temporary fix?  Like make the program check for the total number of bots and prevent any further reproduction once it reaches some level (like 1800 or so)?

Please...
Title: Limit on number of bots
Post by: Numsgil on April 12, 2005, 12:47:26 AM
I'm actually going to be eliminating the limit probably for the next major release (probably 2.4?).
Title: Limit on number of bots
Post by: Endy on April 12, 2005, 02:03:57 AM
How are you going to manage that? There is still a very real limit based on memory limitations.

Endy B)
Title: Limit on number of bots
Post by: Numsgil on April 12, 2005, 02:10:52 AM
Most systems have oodles and oodles of RAM.  I doubt any system is ever going to run out of memory to store these bots.  I think the physical limitations of fitting that many bots in even a 12 sized sim will be the ultimate limit.  How many bots can you cram in a phone booth?
Title: Limit on number of bots
Post by: Endy on April 12, 2005, 02:12:58 AM
Since bots are 2d and a phone booth 3d, I have no idea :lol:
Title: Limit on number of bots
Post by: PurpleYouko on April 12, 2005, 09:13:08 AM
Should be infinite as they have absolutely no size in the z dimension  :D

Seriously though Num is right.
The biggest problem with larger robot arrays is that when you run the program at first, it reserves a massive amount of space for the array and this has occasionally been known to crash a program.
By making it a dynamic array, we can bypass this problem because we only need to reserve a small amount of space then dynamically change it throughout the sim.
There may be a potential for running out of memory on some systems at really large numbers of robots but that will be exceeedingly rare.