Author Topic: Limits and costs  (Read 3898 times)

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Limits and costs
« on: February 12, 2006, 01:42:21 PM »
Two questions:

Question number one:
Are .strvenom, .strpoison, .mkshell etc. all limited like .strbody and .fdbody are? Memory shooting 32000 into .strpoison or .strvenom etc could be a problem if they aren't.

Question number two:
How much do venom, poison, and shell cost in terms of nrg? It says that they cost 2 nrg per point in the help file but when tested it with a bot they costed 1 nrg per point.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Limits and costs
« Reply #1 on: February 12, 2006, 11:06:50 PM »
I believe they all cost 1.  It may have changed to 1 sometime during the process, though I'm not sure if it was me or PY who did it.

I'm really not sure about limits to making venom etc.  Test it and tell me what you find.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Limits and costs
« Reply #2 on: February 13, 2006, 09:07:51 AM »
I think what he was referring to is the limit to how much can be stored into the memory locations on any given cycle.

I am pretty sure that there is a ceiling of 100 energy points for all of them. I added these ceilings about a year ago as soon as it became evident that they could be weaknesses against information shots, viruses etc.

Please let me know if I missed one so that it can be fixed
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Limits and costs
« Reply #3 on: February 13, 2006, 11:35:38 AM »
I ran some tests in version 2.37.6 [span style=\'font-size:8pt;line-height:100%\'](made a bot store 32000 in .strpoison. Another store 32000 in .strvenom etc.) [/span]

Here's what I found:

- .fdbody and .strbody are limited to 100 per cycle

- Poison is limited to 1500 per cycle

- Venom is not limited

- Shell is not limited

- Slime is not limited

- .up .dn .sx and .dx are not limited

Sorry PY, it looks like your fix became 'unfixed' somewhere in development  :(

----

Ran a test in version 2.4.A

None of the bots did anything at all, then suddenly half the bots started moving upwards, seemingly for no apparent reason (I had gravity turned off).
It didn't make any sense  :wacko:

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Limits and costs
« Reply #4 on: February 13, 2006, 12:46:34 PM »
Dang :/

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Limits and costs
« Reply #5 on: February 13, 2006, 02:58:32 PM »
Quote
- .up .dn .sx and .dx are not limited

Sorry PY, it looks like your fix became 'unfixed' somewhere in development sad.gif

I know you can make them store these values. That has never been the issue.
The restrictions are on how much of the stored value can actually be changed.

For example. Build a robot with one gene that goes like this.
Code: [Select]
cond
start
32000 up store
stop

end

run it in a sim and measure exactly how much energy is spent on each cycle.
You should find that initially, for the first cycle, it will be about 100 or so but after that it will be no more than a point every few cycles.

The reason?

The code will not allow a robot to actually convert more energy to a resource (like up dn etc.) than is actually spent by changing its kinetic energy so if a bot is already moving at full speed and saves 32000 into .up, the resultant change in kinetic energy will be zero so the cost will be zero.

I suspect that all the others work the same way. You would have to check the bots from the console to see how much energy is charged per cycle when you put 32000 into a memory location.

Remember there are no restrictions on storing values, just on energy expenditure.

I have a couple of minutes so I will go and check the code too.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Limits and costs
« Reply #6 on: February 13, 2006, 04:07:40 PM »
Quote
Build a robot with one gene that goes like this.

Code: [Select]
cond
start
32000 .up store
stop

end

 :huh:

I did that and measured how much energy it lost. I did the test again three times.
TEST1: The bot lost exactly 20363 energy points per cycle
TEST2: The bot lost exactly 11637 energy points per cycle
TEST3: The bot lost > 20363 energy points per cycle

I think that the exact value depends on mass, but the bots in my test all died pretty quickly.

 :blink:

Same with the others in my first test: they all died in the first cycle except for the .strpoison bot, which died on the second cycle, and the .strbody bot, which lived for a few hundred cycles.
« Last Edit: February 13, 2006, 04:11:31 PM by Elite »