[Unleash The Geek] Bugs/questions thread

Oh thanks a lot, that explains everything.
Clever and perfidious move :wink:

Yes, @LPAlex is perfidious (and clever) !! :stuck_out_tongue_winking_eye: @LPAlex

Here is a replay of one of my game, in which one of my radars is destroyed when its cell is dug for ore (turns 25, 26, at coords [9, 11]). The same situation arise later (turn 44, at [25, 11]) without destroying the radar.
Radars can never be destroyed, right ?

They can be destroyed by the opposing team.

[Solved] I have made a mistake and went into an infinite loop.
The debug info seems not fully shown also due to the infinite loop, a bit weird as the infniite loop should be after the print to debug info. Thanks.


Hi, I have encountered a weird problem.
I am writing using python 3 and on top of the default framework. The entityCount is 13 however only 12 lines are fed to input so my problem got an error of not providing 5 outputs (or just the line feed is 1 less than the entityCount provided in input). It happens like 50% of the games when I submit the same piece of code. Please help! Thanks!

I checked again, it was just random T_T


Edit again:
It always happens in the step that I requested a radar and just received that radar. And the chance of problem is random, it can happen from step 12 to step 120.

python3 internally buffers printed data so sometimes it hasn’t been sent when you timeout - if you add flush=True to the print statement (or call sys.stderr.flush() after the print) it’ll make sure the print data is sent to the server.


Thank you very much! :bowing_man:

How to avoid opponent’s traps?
I don’t see any way to see opponent’s traps even if they are in one of my radar’s range. Did I missed something?

radars only detect ore

While you cannot see opponent traps, you can make some educated guess by checking what you see: opponents’ robots and its mined ore count. To put a trap, a robot needs a request at the HQ and the same robot needs to dig while standing next to the trap position. While doing both actions, the robot is not moving.

1 Like

I am coding in Typescript and I am encountering a lot of timeouts issues on the arena that I don’t have in the IDE when I replay. Is it possible that the arena environment has more constraints than the IDE one? If you have solutions to debug the issue, I am opened to try it.
EDIT: Issue was from my code, sometimes I use computation time very close to 50-60ms which by chance runs well on the IDE from time to time.


There are some map configurations where your bot take all the 50ms (before printing the output) in the IDE which could lead to a timeout in the arena. If you can’t reproduce the timeout, you can reproduce the match and try to optimize your hot code path for this specific turn. I’m sure it’s just matter of a few ms :stuck_out_tongue:


I have faced the same problem and as others have pointed you cannot detect enemy traps BUT you can prevent your bot from digging where a trap might have been placed.
In other words: when a hole is detected, and none of your bots is responsible for that, you have to check if there is an enemy around that came directly from base (without doing holes in the way, that is, the enemy could have placed a trap).
It is a guess, but it is better than nothing.

I have written a few articles about this and other challenges I have encountered in the last 3 days:
Day One: https://salvatorelab.com/2019/10/coding-game-unleash-the-geek-day-i/
Day Two (here I implemented a simple trap avoidance that worked most of the time): https://salvatorelab.com/2019/10/coding-game-unleash-the-geek-day-ii/
Day Three (this one explains what I just said about guessing enemy traps to never die again): https://salvatorelab.com/2019/10/coding-game-unleash-the-geek-day-iii/

Indeed. Since it was working in the IDE and my usual turns take less than 10ms I thought it was a random timeout problem. But in the end, it is definitely my code that takes too much computation time in some cases.

I’m coding in Python3 and I have random timeout issues. In the IDE I isolated a snippet that alone takes at random between 10 and 100 milliseconds. Notice that it is taken from the officially provided AI.

while True:
    t0 = dt.now()
    turn += 1
    # my_score: Players score
    # game.my_score, game.enemy_score = [int(i) for i in input().split()]
    _ = [int(i) for i in input().split()]
    #game.prev_grid = game.grid
    #game.grid = Grid()
    print('t0.5 = {}'.format(dt.now() - t0), file=sys.stderr, flush=True)

These are the times over a few turns:

If I run again I get different values.
Any idea what the problem might be?

You have to start your timer after the first reading.

Ok thanks, that was not really clear from the instructions.

Is there no serious interest of the Codingame staff to fix the Clojure timeout bug?
A year is pretty long duration to find some time to investigate the bug.
I have a lot of Clojure software in production that does not exhibit such random runtime effects, especially if not much data is involved. So it is unlikely that this is a Clojure-inherent problem.

A post was merged into an existing topic: Crystal Rush - Puzzle discussion (previously Unleash The Geek)