Code center > Bugs and fixes

Another infinite energy? OPEN

<< < (2/2)

EricL:
Yea, the rob array is capped at 10k.  Used to be 5k.  I increased in a while back, before I did some perf work.  Now it stays compacted and the loops only iterate through the occupied portion.  Would be easy to grow and shrink it dynamically and lose the cap completely or at least make it 32000.  I suspect we will have lots of integer related problems pushing it further than that even if someone had the horsepower to run it.  Things like ties refernecing bots and the like....

shvarz:
My thoughts on limiting reproduction:

We can impose some extra-time being required between reproduction events. It would be a bit artificial, but you can make it proportional to the length of DNA, so that it would be "time to copy DNA".

We can also impose some minimal nrg level for a bot to be alive. Say if nrg falls below 10, then the bot dies. Again, this is an imposed rule and we don't like that, but here some logical approach: We used to have a rule (not sure if still do) that if a bot looses more than 25% (or something like that) of its energy in a single cycle, then it dies of "shock". Well, make reproduction cost something, some small amount, say 3 nrg and charge it to both parent and off-spring. Then if a very small bot repros, it looses >25% of its energy and dies.

EricL:
I like the time to copy DNA idea.  It places a cost on DNA length that is morphologically derrived.  I had considerred a count down timer for reproduction based on bot size or one that requires more nrg to reproduce before the timer expires, but not on DNA length.

There is a minimal nrg level for a bot to be alive.  It's 0.  Having your nrg go to zero is the definition of death in most of the code.  That are places however where the rule is violated.  Nrg sharing via ties for example.  If a bot with a low number in the rob array sucks another down to 0, I have to keep the bot alive until he gets a turn to suck back.   Things like that.  That is where the energy leaks lurk I.e. a bot tryign to suck another guy's nrg below zero, gaining more than was there in the first place then the code setting the suckee's nrg at zero.  That kind of thing.  Hard to find.  Order of operation stuff bites.

Shock still exists.  The way the code reads, if a bot has nrg > 3000 and looses 50% or more in a single cycle, then all that bot's nrg is turned into body.   The shock code comes after the code that handles body feeding, so this essentially kills the bot, even if it has a body feeding gene.  Reproduction is a special case where shock doesn't apply.

Reproduction does cost something today actually.  It costs 0.1% of the nrg given to the offspring.  The parent and the offspring each pay the percentage.

The thing that keeps small bots from reproducing today is the body limit.  You have to have body > 2 to reproduce.

Numsgil:
You want to be careful penalizing DNA length.  Most other sims that let bots run only X commands in a cycle or whatever suffer from problems.  The push to shrink the DNA overpowers any push to make the DNA more sophisticated.

Our own DNA is billions of base pairs, and easily the majority of it doesn't really do anything.  And copying DNA is usually done in massive parallel.  I like the idea of complex and simple DNA being on the same footing.

I do think that reproduction delay is a good way to go, but maybe it should be a ramping nrg cost.  Like the shorter your generation time, the less time the repro mechanisms have had to recover, and the more cost you have to pay.  Wait a hundred cycles and reproing is almost free.  Try to do it every cycle and you have to pay X for every body you have, or something like that.  Some sort of atan relationship.

Navigation

[0] Message Index

[*] Previous page

Go to full version