[Unleash The Geek] Bugs/questions thread

complex one:
4 10 has 2 ore
turn 17:
R6 dig 4 10 and get 1 ore (your Robot)
R3 dig 4 10 drop a trap in 4 10 and get 1 ore
R4 dig 4 10 and drop an ore in 4 10
So here: 4 10 has a trap, and only 1 ore. So effectively 2 ores were collected from the hole, but 1 ore was buried by R4.

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!

Edit:
I checked again, it was just random T_T

Screenshot_2019-10-09%20Coding%20Games%20and%20Programming%20Challenges%20to%20Code%20Better

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.

3 Likes

Thank you very much! :bowing_man:

Hello,
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?
Thanks

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

Hi,
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.

Cheers

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:

2 Likes

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)