[Unleash The Geek] Bugs/questions thread


#24

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.


#25

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


#26

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


#27

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 ?


#28

They can be destroyed by the opposing team.


#29

[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.


#30

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.


#31

Thank you very much! :bowing_man:


#32

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


#33

radars only detect ore


#34

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.


#35

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


#36

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:


#37

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/


#38

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.


#39

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?


#40

You have to start your timer after the first reading.


#41

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