Halite Home

Possible to get self-made logs?


#1

In the docs, we're advised to "print to a log file". However, there's no way for me to get a bot's own self-made log off the server, is there?


#2

There is currently no way to get your logs off of the server.


#3

Is this still the case?

I'm trying to work out why my bot sits still for all of this game:

https://2016.halite.io/game.php?replay=ar1483824186-3180631494.hlt

There would have been info written to the log file which might help me. I haven't been able to reproduce the issue locally yet.


#4

I believe so and I haven't heard of any plans to make them available.


#5

Okay, thanks for letting me know - my searches implied it probably hadn't changed, but I was hoping I might have missed something. :slight_smile:

I'll continue trying to find a local game in which it happens.


#6

@smiley1983 you can recreate games on the server by feeding the same seed, dimensions and number of players to your local halite call. This may help you reproduce the bug. The seed is the number after the hyphen in the replay URL.

halite -d "40 40" -s 3180631494 "run mybot" "run mybot" "run mybot" "run mybot" "run mybot"


#7

Thank you, that's really good to know.

I tried it locally a few times, and still didn't reproduce the issue (the bots moved as I would normally expect) but at least that's useful information - it isn't some fundamental quality of the map or opening position causing the failure.

I'm just going to ignore it for now, since really if I'm going to put more work into this, I should begin implementing new ideas from scratch rather than hacking around with the horrible expermiental code I have already. :slight_smile:


#8

I assume the answer is still the same, but I would love to know if anything changed.

I seem to have found an effective strategy to finish 2nd against the top players...

1) https://2016.halite.io/game.php?replay=ar1486420755-1294622514.hlt
2) https://2016.halite.io/game.php?replay=ar1486347826-1379372753.hlt

I can't reproduce the behavior locally on the same maps. I attached one with the same number of players and same starting position for my bot.

139803-1294622514.hlt (2.7 MB)


#9

Nothing will probably change before the end of the competition.

In the past, when I've seen bugs like that, it's usually because the competitor had made an assumption about their playerID, but I doubt that that's the cause of your bug.


#10

I buy the ID being the issue - maybe some really rare bug pulling back the ID in the underlying Java networking code. Thanks.


#11

Yikes - maybe it is not as rare as I thought. I looked through the games that I lost since 4:45 this morning and found 11 more games like this:

https://2016.halite.io/game.php?replay=ar1486408261-1685460526.hlt
https://2016.halite.io/game.php?replay=ar1486432340-4289031514.hlt
https://2016.halite.io/game.php?replay=ar1486430961-2910528451.hlt
https://2016.halite.io/game.php?replay=ar1486400189-2203469377.hlt
https://2016.halite.io/game.php?replay=ar1486389200-4099168417.hlt
https://2016.halite.io/game.php?replay=ar1486383684-2878066064.hlt
https://2016.halite.io/game.php?replay=ar1486381718-912202167.hlt
https://2016.halite.io/game.php?replay=ar1486380255-3743829667.hlt
https://2016.halite.io/game.php?replay=ar1486378231-1719720122.hlt
https://2016.halite.io/game.php?replay=ar1486377219-707785795.hlt
https://2016.halite.io/game.php?replay=ar1486374611-2394777981.hlt

I might try to update my code so I can use the latest Java starter package code. Is anyone else seeing a similar problem? I had not seen this at all prior to yesterday.


#12

I found a pattern this morning. It looks like mzotkiew submitted a new bot and is pulling me into a bunch of games.

There are 21 games in that image below - My bot plays against mzotkiew in 15 of the 21 games. All 15 of them my bot does nothing. The other 6 games my bot plays normally. It is reminiscent of the init timeouts I was seeing only against certain players which ended up being related to JVM start up times. I think I could add some code that could check if there is exactly one bot not moving after frame 1, set my ID to that and play on that would work in most circumstances. But I would really love to be able to figure this out. It would be nice to compete against mzotkiew.


#13

Do you have timeout protection code? That is actually the first place I would suspect since there have been a number of cases with that going subtly wrong. Most commonly by starting the turn time before calling get_frame.


#14

Yes, I noticed my call to getInit is within a try which is trapping any exceptions. I'll submit a new bot tonight with that part taken out of the try block, so if any exception occurs within the getInit call my bot will error out and I'll see what happened. Thanks.


#15

I moved the call to getInit outside of the timeout protection code and haven't noticed that behavior in any games I looked at or any exceptions being thrown. Thanks for the response.