Author Topic: Top Ten ways to speed up your Evo sim  (Read 4973 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Top Ten ways to speed up your Evo sim
« on: December 01, 2006, 11:45:59 AM »
10) Decay your corpses faster.  Corpses are less expensive than extant bots, but not by that much and total bots in the sim is perhaps the biggest single determinent of sim execution speed.   Unless you realy want lots of dead bodies lying around stinking up the place, have them decay away quickly or add a scavenger species that can tie feed .body from corpses so they get eaten relatively quickly.

9) Don't use everlasting nrg shots.  Shots arn't nearly as expensive as bots, but a sim with 100,000 shots floating around will feel it.  Use this option only if it is key to your simulation.  If you must use everlasting shots, adding a few shot-absorbing shapes will keep the total number of shots in the sim reasonable.   Fewer total shots in the sim means less work for the simulator code to do with respect to checking for shot-bot collisions and so on.

8) Use fluid density only if you really want it.  Fluid density is more expensive than friction as the mass of the displaced fluid must be calculated for each bot for the various drag calculations.  Use it if you want it - it's not that big a deal - but don't use it if if you don't really need it.

7) Be careful with shapes.  Shapes, especially if they are visible to bots, are expensive both directly and indirectly.  They are directly expensive in that the calculations for bots to see shapes and for determining bot-shape and shot-shape collisions arn't cheap.  The least expensive shape is one that absorbs shots and one bots not only can't see but can actually see through as the calulations for bots seeing shapes and for shapes blocking what other bots the bot can see can then be avoided.   Shapes can also be indrectly expensive in that they tend to group bots together, especially if the shapes are drifting around.  See #6.  That said however, sometimes shapes may actually speed up sims such as when a maze or some other shape heavy sim forces bots to space out as they have to be constantly on the move to seek out food sorurces that may be on the other side of a wall.

6) Spread your bots out by using a larger field (and also by reducing the number of moving shapes).  A larger field speeding up a sim sounds counter-intuitive I know, but the simulaton code can take short cuts in determining whether bots collide or can see each other if they are well spaced out (I.e. farther apart than the sight distance for vision, or twice the maximum bot radii for collisions).  Using a larger field allows bots to spread out, speeding up the sim.  Avoiding moving shapes which can 'sweep' bots together is also a good way to keep your bots spaced out.

5) Keep your autotropic population under control by using Dynamic Costs.  Make the range wide if you like, with lots of room to flucuate, but obviously more bots in a sim equals slower performance.  Population explosions will occurr as new food sources are found or a mutaiton spawns a reproduction explosion.  Using Dynamic Costs to automatically increase the costs when the populaton spikes can bring the population back down faster and help reduce the time spent with a super high popualtion, which will slow the sim to a crawl.

4) Use the 'Cost Reinstatement Threshold' in conjuction with the 'Zero Costs Threshold' to prevent the population spikes which can often follow population crashes that zero the cost multiplier.  Setting a reinstatement level near the lower of your Dynamic costs range will reinstate the costs once the populaton gets back in the range.

3) Turn off vision for bots that don't need it.  If you arn't trying to evolve plants that can see, turning off the vision for that species (before you begin the sim) tells the simulator it needn't bother to execute the costly code to populate the .eye sysvars for any member of that species and for any descendents.

2) Turn off DNA execution for plant species which are only there to provide incoming energy.  If you are exclusivly interested in hetertropic evolution, turning off DNA execution for your veggies turns them into little more than floating food sources, essentially corpses that extract nrg directly from the sim.  This lets the simulator avoid the code for executing the DNA for every bot of this species with dramatic performance benifits.  Note that you should also turn off the eyes for such bots for even more savings.

1) Turn off Planet Eaters.  Calculating the gravitational pull on each bot due to every other bot is incredibly expensive.  There are (relatively) more effiecient ways to do it, but the code the simulator uses currently isn't one of them.  This is huge and can slow down a sim by factors or 2 or more.
« Last Edit: December 01, 2006, 01:07:45 PM by EricL »
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Top Ten ways to speed up your Evo sim
« Reply #1 on: December 01, 2006, 12:09:07 PM »
Good tips, I've learned a lot.  I did not know I could turn off eyes and DNA execution for species.  Where do I find this option?  I have 2.42.9 and there is nothing like that.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Top Ten ways to speed up your Evo sim
« Reply #2 on: December 01, 2006, 12:48:56 PM »
Quote from: shvarz
Good tips, I've learned a lot.  I did not know I could turn off eyes and DNA execution for species.  Where do I find this option?  I have 2.42.9 and there is nothing like that.
New in 2.42.9g
Many beers....