Author Topic: A new shock system  (Read 1565 times)

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
A new shock system
« on: February 22, 2005, 10:32:32 PM »
Or it should be simple.
Unless you guys totally turned the source code inside out. :P

Anyway, the idea is that, rather then dealing instant death when a robot loses half it's energy in a single cycle, it'll simply be confused when it takes a good amount of body/energy damage. By confused, I mean this value will be added to the bot's waste/pwaste when determining alzheimers effects.

I'm not sure how easily it'll increase or decrease, but I think it should be able to kill a bot if they lose half their energy/body, or possibly deal major damage even if they have no waste. But here's the idea I've got in mind:

(See next post.)

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
A new shock system
« Reply #1 on: February 22, 2005, 10:34:27 PM »
(Disclaimer: This is just my idea/example of how it could work. If you like the idea, but not the example, then say so, rather then critisizing the idea and example.)
(Also, remember, in the following example, the exampled bot was dealt damage that would, in the current system, kill him instantly.)

Every 0.1% energy and 0.2% body lost in a single adds 1 to a shock variable (which can be read via .shock, to allow some bots to have mild defenses against it to prevent death.)
This means if you lose half your energy and a tenth of your body (ouch!) in a single cycle, your shock becomes 550. That, however, is far from the worst of it.
For every quarter of your energy, or half of your body that's lost (basically, every 250 shock you gain), the gain doubles. (I'm sure it's not that hard to figure out how to do this without making an infinite loop. :P )
So that means you just got a painful 2200 shock.
But it's only temporary, luckily! Every cycle, you lose 20% of your current shock, as well as an additional 1 per 20 energy gained (though this doesn't count if you've lost energy). So that'd go from 2200 to 1760. Then down again to 1408. Then 1126. And so on, until it's all gone. (That is, assuming you didn't gain any energy.)
Unfortunately, each cycle you recover from shock, you gain some permanent waste to simulate permanent damage. Probably 0.2*(Shock/100).

(In the above example, it'd take 31 cycles to completely recover. But you'd be back to normal in about 4-6 cycles. Unless you had a major amount of waste/permanent waste built up.) (Note, that also acts as if you didn't gain any energy.)
(As yet another note, you'd estimatingly gain around 21.73 permanent waste.)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
A new shock system
« Reply #2 on: February 22, 2005, 10:48:24 PM »
I like the idea.  I think we'd have to add a random possibility of death into the altzheimers function ( I think there was supposed to be originally.  Hot topic).

Or maybe if you double the altzheimers level then its instadeath.

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
A new shock system
« Reply #3 on: February 22, 2005, 11:03:57 PM »
Eh. From what I see, most bots die from alzheimers in a few cycles.
Perhaps you could make the random number go up to 32000 instead though, rather then 1000.

Oh, as a side note, permanent waste never seems to build up.... Though I probably already mentioned this thrice or so.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
A new shock system
« Reply #4 on: February 22, 2005, 11:28:16 PM »
Permanent waste should accumulate whenever you expel waste.  That's fairly old code though, so it's possible something else's screwing with it.