Will onRobotDeath event miss due to skipped turns?

Fragment of a discussion from Talk:Robocode
Jump to navigation Jump to search

Anyway, I see some alive bot not getting scanned for 10+ ticks, are you handling this case correctly?

Xor (talk)05:06, 30 December 2017

It should no be a problem if a "robot" reappear on scan, it is added back to the alive pool.

Hm, I could not find the code which is in charge of it. I vividly remember programming it several years ago. This might explain some quirks which I saw in melee, when my bot fires into a dead bot last seen location. I.e. if I miss robot death event, I still count enemy alive for quite a bit and keep firing at the "gost" till some timer expires.

Beaming (talk)05:34, 30 December 2017

well, firing at some "ghost" when missing onRobotDeath is unavoidable. Anyway we could set different timer for radar & gun. e.g. for radar, choose 8k ticks, where k is large enough to avoid marking alive bots as dead. And for guns, use a small k, e.g. 1, to avoid shooting at targets that we don't have new information.

Xor (talk)06:06, 30 December 2017
 

Just found that even onDeath can be missed, via either calling execute before it's fired (via experiment result) or skipping turns (guess, but I'm pretty sure).

And when onDeath event is missed, SYSTEM: *** has dead will also be missed.

Xor (talk)09:23, 30 December 2017