I uploaded my boss that came in 2nd place in the C1Ryan competition onto the playground. Have fun beating it!
I look forward to my algo suddenly losing its place in the top 10.
Also we cleaned up the boss names and removed the LX_ prefix as it seemed redundant.
Does that mean you’re cooking up a new algo for the C1Junaid challenge?
First try. Are you completely sure you uploaded your latest version?
I played against it by hand and the algo crashed xD. Below is the error message. I hope it helps you find the bug.
Traceback (most recent call last):
File “/tmp/algo2744605816438742969/madroxfactor/algo_strategy.py”, line 547, in
File “/tmp/algo2744605816438742969/madroxfactor/gamelib/algocore.py”, line 69, in start
File “/tmp/algo2744605816438742969/madroxfactor/algo_strategy.py”, line 103, in on_action
game_state = gamelib.AdvancedGameState(self.config, action_string)
File “/tmp/algo2744605816438742969/madroxfactor/gamelib/game_state.py”, line 83, in init
File “/tmp/algo2744605816438742969/madroxfactor/gamelib/game_state.py”, line 111, in __parse_state
File “/tmp/algo2744605816438742969/madroxfactor/gamelib/game_state.py”, line 126, in __create_parsed_units
self.game_map[x,y].pending_removal = True
IndexError: list index out of range
I think that I know the bug. When I started getting results from the action phase, and processed the
game_state, I ran into this bug. I fixed it by simply placing a
try / catch around the line that errored (
self.game_map[x,y].pending_removal = True). If you want a quick fix so that your algo doesn’t crash, @C1Junaid, you can just do this. I have, without any apparent bad effects. However, I didn’t actually fix the source of the issue, mostly because I could fix it that easily. If anybody knows what the source is, I would love to fix it properly.
Ya it looks like the general issue is a removal existing when the firewall its trying to remove is already gone. Gonna look at it today.
it should be simple, just add a
contains_stationary_unit check before the removal