Bots and Simulations > DNA - General
Limits and costs
PurpleYouko:
--- Quote ---- .up .dn .sx and .dx are not limited
Sorry PY, it looks like your fix became 'unfixed' somewhere in development sad.gif
--- End quote ---
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: ---cond
start
32000 up store
stop
end
--- End code ---
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.
Elite:
--- Quote ---Build a robot with one gene that goes like this.
--- Code: ---cond
start
32000 .up store
stop
end
--- End code ---
--- End quote ---
: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.
Navigation
[0] Message Index
[*] Previous page
Go to full version