riddlesio / issues

Bug reports and starter bot submissions for the Riddles.io platform
0 stars 0 forks source link

Input test fails with zero output #10

Closed melsonius closed 7 years ago

melsonius commented 7 years ago

See: https://starapple.riddles.io/competitions/light-riders/my/bot-revisions/22e26f25-1d13-4a0c-a9c5-8e31f3ab81ed/submission-logs

The input test is failing (probably legitimately), but I can't see any output in the input test logs, even when the very very first thing my main method does is print something to standard error. On the other hand, a different, working, version of my bot prints out everything in the input test logs just fine. It only seems to break when I actually need to see the output.

melsonius commented 7 years ago

For what it's worth, I figured out my problem, but the no output thing makes it very difficult to figure out what's going on.

JimVanEeden commented 7 years ago

Thanks for your report, there is probably something wrong with the logging. We'll look into the problem and sorry for the inconvenience.

RenegadeLucien commented 7 years ago

If it helps, two old versions of my bot (v8 and v9) also failed with no output.

nikovanmeurs commented 7 years ago

I'll be fixing this issue somewhere next week.

jabbink commented 7 years ago

Subscribing to get notified when this gets fixed

nikovanmeurs commented 7 years ago

No fix yet, unfortunately. I haven't been able to consistently reproduce this yet.

jmerle commented 7 years ago

Just throwing ideas here:

https://starapple.riddles.io/competitions/light-riders/discussions/discussion/95e2df28-e2fe-4765-ba3c-1ae8dbfa75e3/1

The input test now correctly gives a 0ms timebank and 1000ms to make your move.

If your first move takes more than 1000ms, it seems like it could be a reason for the input test to fail (note that bots can run slower on the Riddles.io servers than when you run them on your local machine). This seemed to be a possible cause of the issue where my bots would fail due to failed input tests.

Correct me if I'm wrong though, obviously I can't see how the input tests are actually ran.

nikovanmeurs commented 7 years ago

Yes, that's certainly possible. For the input test we simply feed your bot several commands from a file and wait to see if your bot reacts within 1000ms. This is mainly done to catch errors in initialisation logic without having to run a full test match. The actual content of the test script is as follows:

settings player_names player0,player1
settings your_bot player0
settings timebank 0
settings time_per_move 200
settings your_botid 0
settings field_width 16
settings field_height 16
update game round 0
update game field .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,0,.,.,.,.,.,.,.,.,1,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.
action move 1000
jmerle commented 7 years ago

As I also posted here, giving 1,000ms on an input test but giving 10,000ms in an actual match might cause issues related to this if a bot does some heavy calculations in the first round (which take longer than 1,000ms) for later use.

melsonius commented 7 years ago

I'd like to second @jmerle 's observation.

Some of my bot's crashes on the input test now makes perfect sense. Because I use java, which has unpredictable garbage collection, I hold a reserve of several seconds. This, combined with java's inherently slow initial startup, causes "allowed time" ends up being negative if the time bank doesn't start near where I expect it to.

Doing anything other than playing the first turn of an actual game provides an incentive to "cheat" the input test: if (round == 0 && timebank == 0) return "RIGHT";

jabbink commented 7 years ago

if (round == 0 && timebank == 0) return "RIGHT";

I did almost this at one point. 🤷‍♂️

nikovanmeurs commented 7 years ago

We'll be updating the input test runner this week so your bots can make use of the timebank for the first move.

nikovanmeurs commented 7 years ago

We just deployed an update which fixes several bugs, any of which could cause a log to not be shown. The update also contains the fix for the test runner, so bots should now be able to make use of the timebank during the input test.

Please let us know if you are still experiencing issues.

melsonius commented 7 years ago

Great!

jmcarthur commented 7 years ago

I'm still seeing this issue. When running the test locally (that is, passing the input from earlier in the thread to my bot), it passes. On the server, it fails, and it doesn't give any reason.

JimVanEeden commented 7 years ago

I'm reopening this issue. Seems to be caused by something else than before. We'll try to fix it asap, because this one is pretty annoying.

nikovanmeurs commented 7 years ago

Fixed. @jmcarthur please let us now if you're still experiencing issues.

barisdemirdelen commented 7 years ago

I can confirm, it is fixed for me. Thanks.

jmcarthur commented 7 years ago

I see output now! (Apparently it's just timing out, which seems crazy to me, but I guess that's a separate issue.)