Tiny bug / asymmetric behavior

While trying (and failing) to reproduce the conditions of this bug with my algo playing against itself in the playground, I ended up seeing an asymmetric behavior from my deterministic algo. Upon inspection of the debug log, I think I guessed what happened:

I think when several firewalls are destroyed in the same frame, particularly when they are destroyed by an unit self-destruction, the order in which those destructions are written in the game_state_string is asymmetric (ie it differs depending the side). I implement an on_unit_death() method which help my algo predicting it’s opponent’s defense (enemy will probably rebuild recently destroyed firewalls). So the two sides thought their enemy was gonna rebuild a group of recently destroyed destructors over the following turns, but imagined it was gonna be in a different order (I know that from the debug log), and so adopted a different strategy.

Of course it could also come from a bug in my algo, but I’m pretty confident that it’s not the case.
I don’t know if that ‘asymmetric order of deaths in the same frame’ should be considered as a bug, if it is a bug I don’t think it is too problematic.

I don’t say the order of destruction should be considered as relevant to an intelligent player, just that it is asymmetric, which is strange considering everything else in the rule is trying to be symmetric (for instance the fact that the coordinates are relative to the player, or that you are always player1).

This is a ‘polish’ change that would probably take some investigation to fix, but currently does not hinder functionality. I’ll add it to our wishlist.

1 Like