Author Topic: Some thoughts on autocosts  (Read 3190 times)

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
Some thoughts on autocosts
« on: October 23, 2007, 05:21:46 PM »
First off, I think autocosts are wonderful feature and I've so far used it in my every sim. However, I think it should be used carefully.

A couple of my first evosims all evolved conditionless reproduction very quickly, it probably spread at the first time repro-gene mutated. After some pondering on why that happened, I realized that I had set autocost sensitivity pretty high, in the center section of the slider. Because a quick (or continous) reproducer increases population extremely fast, costx skyrockets. Quick reproducers get more coverage to find energy to fight rising costs than their slower cousins and their generation time is shorter allowing faster mutation to cope with the changes. (By the way, don't bacteria too benefit from short generation times in exterme conditions?). As this happened, the original strain died out. Now that I've set sensivity lower (the lowest possible) in my never sims none of this has happened. The bots still hold on to conditional reproducing after 1000 generations and nearly 500 mutations in the latest sim.

Another thing that I thought of, is that doesn't autocost hamper adaptation? For example: When a bot mutates in a way that allows it to save energy and not to lose it's effectiveness it probably has more energy for reproducing, resulting in higher population. But as population rises, so do the costs so that the mutation loses much of it's significance. My point is, doesn't that cut "the reward" for adapting to situations compared to sims where costs stay the same?

One effect this has is that program puts constant evolutionary pressure on saving more energy. In real life (as far as I know), better times that come with higher population size, allow DNA to be more sparing with energy - or food or whatever - and when times are hard, there's pressure to use energy more effectively. In darwinbots this could mean when there's been some beneficial mutations evolving new, more complex features could be easier to develop than "normally". Reason for this being that some of more advanced actions (think viruses or tie feeding) require a number of stores, which are not all directly useful.

I'll stop now or I'll ramble on forever.

Any thougths?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Some thoughts on autocosts
« Reply #1 on: October 23, 2007, 07:00:26 PM »
Most of the reasons you outline are the reasons I don't personally use autocosts.  They can be helpful when you have runaway reproduction in your strain, but mostly I think it's too easy to "game" in a way that the evolver doesn't want.

Instead, I evolve canni species (Enitor Comesum usually) that limit their own populations by eating anyone and anything that doesn't register as too strong to take down.  The result is the same highly competitive environment autocosts try to create, but without any overt means of taking advantage of the system, since your actions only have local consequences.

Since conspec recognition is usually one of the first things to break under evolution, it makes sense to bite the bullet, accept it as inevitable, and code the bot around that idea.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Some thoughts on autocosts
« Reply #2 on: October 24, 2007, 12:43:25 AM »
I agree and second both your reasoning.  I implemented autocosts early on as a poor man's population control mechanism.  It has many drawbacks, not the least of which is non-locality and that from a particular bot's perspective, costX spikes are unpredictable and essentially random.    The run away reproduction of a single parent bot with even modest amounts of stored nrg at the other side of the sim can cause utterly dramatic changes to the world view for every other bot.  If our sims were orders of magnitude larger or the nrg needed to reproduce significantly higher such that the nrg a given bot can possess would not allow exponential reproduction, no single bot could spike CostX.

Personally, I don't like costs of any sort.  None of them, at least not when used as a significant driver or determinant of fitness in evosims.  IMHO, co-evolution (prediation, symbios, parasite resistance, compitition for limited resources, etc.) rather than nrg effeciency should be the main driver of evolutioon if we are to evolve anything more complex then mearly the most simple, most effecient replicator.   Peksa is right.  When bots die from starvation (as opposed to being eaten) selection favors nrg effeciency which can work against the evolution of complexity.  Complexity is an asset only in environments where complexity is an asset (circular but true) and where nrg effeciency largly dictates reproductive success, complexity is a liability and will be selected against.  But in sims where being more complex lets you evade/hide/attack/counter/confuse/etc better....the sky is the limit.

This is why I implemented .totalmyspecies and .totalbots I.e. so that self-throttling preditor bots can be written and prediation then used as the main or exclusive force driving selection rather than nrg effeciency.  I use absolutely no costs in my evosims theses days.  Preditors are much better.
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Some thoughts on autocosts
« Reply #3 on: October 24, 2007, 12:39:55 PM »
I think the solution here is to drive autocosts not from bot numbers, but from total energy in the sim.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Some thoughts on autocosts
« Reply #4 on: October 24, 2007, 03:34:54 PM »
Quote from: shvarz
I think the solution here is to drive autocosts not from bot numbers, but from total energy in the sim.
This doesn't work as well as you might guess due to the time lag between incoming nrg reduction and population impact.  The main reason we have any mechanism for population control at all is largely due to our limited computation resources.   It can take a very long time (in terms of cycles) after you decrease or stop the nrg coming into the sim (via veggy feeding) for that the trickle down to impact the population with a corrosponding longer period in real time.

The relationship between population and sim speed is non-linear.   Doubling the population slows a sim down more than 2X due primiarly to increased bot density and the O(n^2) nature of computing such things as vision.  Given the finite capabilites of today's CPUs, we unfortunatly require a faster acting population control mechanism if we are to prevent sims from grinding to a complete halt during bouts of explosive reproduction, a mechanism which acts to impact the population in a relatively small number of cycles after it grows beyond some limit.

Limiting nrg has other drawbacks as well.  IMHO, we want there to be lots of untapped resources in the sim - new frontiers, new reserves of nrg for selection to discover and mine over time.  We don't want to kill off pockets of untapped nrg as an unintended side effect of trying to limit the uncontrolled reproduction of one particular bot of subspecies (think poisonous veggies that other bots have yet to learn how to feed upon successfully or veggies growing on the other side of a shape bots have yet to reach).  Additionally, I think it is important to have a local resopnse to a local problem.  

Preditors are the answer in my mind.  They can follow bots around, lions following the herd, prodicing local thinning, only becoming active when needed, when populations spike.   They can control their own numbers and voracity through the above sysvars until that is no longer necessary - until our sims support a complex enough ecosystem to naturally support a more diverse set of species without artificial throttles where co-evolved preditor/prey relationships naturally maintain population balance....
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Some thoughts on autocosts
« Reply #5 on: October 26, 2007, 06:13:16 AM »
Well, it would be wonderful if a carnivore could just evolve out of my zerobot population. I don't want to use a handcoded one. I've been thinking about using the 'Randombot Generator' site which gives random genes you can use for an evosim.  Maybe one could get lucky to immedeately have a bot which can hunt, or soon evolve to.  

http://www.franontanaya.com/randombot/
« Last Edit: October 26, 2007, 06:14:45 AM by Testlund »
The internet is corrupt and controlled by criminally minded people.