Author Topic: Costs and energy usage.  (Read 9226 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Costs and energy usage.
« on: July 07, 2006, 06:06:05 PM »
I've been wondering about the default cost settings. How did you come up with those numbers as default values? Why I'm asking is that I whould like the default values to be as realistic as possible compared to how living cells work. I was wondering if anybody know something about what values whould be most realistic. I figure that the various commands in a bot's dna are like the metabolism of a cell, so I want to set up the costs to simulate that.

Energy in the human body is measured in joule, so if 1 energy point whould be 1 joule in a bot, then what should I set the costs to. Shouldn't there be costs in all fields? Of course that doesn't work when starting out with primitive bots that can't even reproduce yet, but later it might be a nice idea.

In the mean time I will do a little research on my own and put some values in there wich might make sense.  
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Costs and energy usage.
« Reply #1 on: July 07, 2006, 08:23:00 PM »
The default cost values are those used for the Formula 1 combat bot league.  This is why they are labeled F1 Default.  I have no idea where the specific values came from or why they were chosen as they were.  Before my time.

While we are on the subject, I personally do not favor costs that are directly associated with DNA length, DNA instruction content or specific, lowlevel DNA command execution, at least not for those commands not directly related to a morphological action like all of the current "DNA Command Costs".  Personally, I never use these.  If our goal is to evolve complex behaviour and reward morphological effeciency, then I view DNA command costs as counter productive towards that end in that the selective pressures they create work against the formation of complex cognition.  I much prefer costs on morphology and on morphological actions - taxing the phenotype, not the genotype and not the neurology embodied in the DNA makes more sense to me.

But surely there should be an execution cost you may say.  Thinking longer or more or using more inputs or more calculations to decide on which way to move or face or when to shoot for example, surely that should be taxed more, even if the end morphological result is simply to move or shoot the same as a bot that spent no instructions thinking.  Again, I would disagree.  I want to encourage complex behavior, not select against it.

I am not opposed to say, an abstracted execution cost which taxes cognitive ineffeciency, say a cost on number of genes fired each cylce for example.  After all, there is a biological carrying cost to having more neurons or bigger brains, but that cost should be small relative to morphological actions such as moving or shooting.   I want organisms to be able to evolve a lot of DNA that only rarely gets used, say for mate selection at reproduction time, and not be taxed for simply carrying it around.  The advantages of being smart should far outwiegh the disadvantages.
« Last Edit: July 07, 2006, 08:55:00 PM by EricL »
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Costs and energy usage.
« Reply #2 on: July 08, 2006, 08:45:17 AM »
I think I agree with that. I chosed to have DNA upkeep set to 0.0001 just because once I got bots with so much dna it slowed down the program to a freeze. But I also feel rejected to put cost on DNA. I doubt it works that way in nature. Viruses for instance are just dna capsuls flooting around until they hit a cell. I don't think they spend any energy at all. Just my guess. I think it's the cells that are being infected that do all the job with reproducing new viruses. It's probably very taxing on the cell and they die afterwards.

Hmm... I will think about this a little more and see if I can find something on internet about cell metabolism.
« Last Edit: July 08, 2006, 08:47:27 AM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Costs and energy usage.
« Reply #3 on: July 08, 2006, 10:32:44 AM »
I can't seem to find a way to put costs on movement commands, like .up and .aimdx etc. What are they? basic commands, advanced commands or what? On the wiki it is only categorized as a sysvar. Maybe there should be costs for sysvars?
The internet is corrupt and controlled by criminally minded people.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Costs and energy usage.
« Reply #4 on: July 08, 2006, 11:43:39 AM »
Ok, the only thing I could find on the internet was an article that mensioned that 10% of energy recieved in a bacteria is used for locomotion. I couldn't find anything about where the other 90% goes. So I decided to go with this: I divided 1 point of energy into the different fields to spread out the costs. The basic and advanced commands will be the 10% energy spent, pretending it's for locomotion, so I put 0.0333 into the basic command field and 0.0666 into the advanced command field. The rest I will divide up into the other fields to the left and for body upkeep on the right on that ui. The other right fields I will go with the default except for dna upkeep wich I will have set to 0.0001 just to prevent dna to become to large for the program to handle.

I'm very interested to know what your appinion is on this.
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Costs and energy usage.
« Reply #5 on: July 08, 2006, 04:07:25 PM »
The default costs are quite arbitrary I imagine.  Before my time as well.  Usually when new features are added their costs are "defualted" to 0.

The only problem with the program as compared to real life is RAM.  When certain DNA replicators learn to use viruses, like that short one Testlund evolved a while ago, DNA length starts to grow non stop.

This is exactly what real viruses are thought to do (hence the long portions of non coding, repeating patterns in many different genomes), so it's actually kind of cool.  Unfortunately, RAM on the system eventually runs out, windows forces some of the program into virtual memory, and the whole program crawls to a standstill.

So I think it's wise to place at least a moderate cost on DNA length to prevent potentially megabytes of DNA data per bot, even if it's not necessarily mirrored in nature.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Costs and energy usage.
« Reply #6 on: July 08, 2006, 04:17:31 PM »
FYI, there's a limit on DNA length of 32000 base pairs currently.  Operations which try to take the DNA beyond this are prevented.
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Costs and energy usage.
« Reply #7 on: July 08, 2006, 06:00:27 PM »
Ok, this is what I have come up with. Check the screenshot. 10% is going to basic and advanced commands, 10 % I imagine goes into the bot's body with that slider set to 10. 80% is divided into the fields wich you can see are not the default values. I've calculated the percentage for 1 energy point per cycle. Seem to work nice with Alga Minimalis, Animal Minimalis and R Fisannis. I start with 60 veggies and 30 bots. I have it set so there should be no costs applied if population goes below 30. I decided to not have any cost for dna upkeep this time until the dna gets too long.

If you have a better suggestion what values to set I whould like to know.  
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Costs and energy usage.
« Reply #8 on: July 09, 2006, 01:32:04 AM »
What exactly happens when bots hit that 32000 wall?  I think it mainly has to do with viruses and additive mutations.  Does the virus just fizzle?

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Costs and energy usage.
« Reply #9 on: July 09, 2006, 03:24:06 AM »
Are you asking me? I don't know. I don't think I got that far in that sim. I think the program will freeze LONG before then. Maybe I got to about 1000 dna length or so.
« Last Edit: July 09, 2006, 03:36:59 AM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Costs and energy usage.
« Reply #10 on: July 09, 2006, 09:39:02 PM »
Quote from: Numsgil
What exactly happens when bots hit that 32000 wall?  I think it mainly has to do with viruses and additive mutations.  Does the virus just fizzle?
I haven't tested it thouoghly execpt as a part of a bug one of Testlund's sims hit a while back where some of the bots had DNA approaching 32000.  I added a bunch of code here and there in the virus and mutation routines to ignore stuff past 32000 and not add it if it were to take it over 32000 but probalby did not plug all the holes.  To answer your question as succintly as possible, the DNA is treated as if it ends at the 32000th base pair and not allowed to exceed 32000.  In practice, things will probably crash still as Testlund says.
Many beers....

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Costs and energy usage.
« Reply #11 on: August 23, 2006, 01:24:43 PM »
Quote
I've been wondering about the default cost settings. How did you come up with those numbers as default values?

AFAIK default costs come from the first time PY created a new version of DB. The costs were, or were representitive of, the costs of the previous version by Carlos.

The idea was to keep the default costs the same each time so that you had a point to compare newer bots with older bots. It meant the leagues didn't have to be redone with each new version.

So yeah, they are pretty arbitary!
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline Ramiro

  • Bot Neophyte
  • *
  • Posts: 25
    • View Profile
Costs and energy usage.
« Reply #12 on: August 28, 2006, 05:05:03 PM »
total newbie question!!!

The nergy cost is calculated for the total amoun t of genes or for the genes that are activated each cicle?

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Costs and energy usage.
« Reply #13 on: August 28, 2006, 05:41:35 PM »
The energy cost is calculated from several factors, that you can control on the 'Costs' tab
Usually, there's a cost for stores, movement and production of shots, shell, venom etc.

2.4 adds some more costs, such as an age cost

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Costs and energy usage.
« Reply #14 on: August 29, 2006, 09:04:59 AM »
OMG an age tax!!  

As if getting Altzhimers wasn't enough.  
I've searched for 'age cost' but not found much, what were the reasons for putting this in please?
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams