Feel free to send your feedback or ask some help here!
Puzzle link: Bender - Episode 4.
There seems to be some odd bug - and Iām not sure if it is on my side:
Submissions almost always fail on validator 30, while the solutions pass locally.
It didnāt happen before my last update of the game, but Iām pretty sure that my changes are not related to crashes on that validator.
@dbdr scraped an error message implying, that this line gets no testcase input, resulting in a crash at get(0)
.
Hello eulersheZahl,
First, I would like to tell you I like this puzzle very much. Iām not convinced with the function thing but I guess the best coders will get an equal optimize solution without it.
For my part, I donāt pass the validator you mention (30) but donāt pass neither the validator 16 but I pass all tests!
Is there something special with validator 16?
I wrote my solution in python 3.
Thanks
I generated all but the first 5 introduction testcases by the same script, so validator 16 should not be special. You can see the input on github.
To test locally, clone the repository, import it as a maven project (e.g. with eclipse or IntelliJ) and call your bot like this + outcomment line 7.
Hereās a screenshot:
Thank you! Found the problem.
I just copy the input in my code because I couldnāt make it work with eclipse (the method addAgent is undefined).
whoops, should be setAgent
.
The comment is from a previous version of the SDK, the method name for single player games changed.
Yep I supposed that and try with setAgent but it didnāt work neither but I donāt know eclipse so thereās probably something I missed.
PS: I just get the following error on test 30
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at com.codingame.game.Referee.init(Referee.java:39)
at com.codingame.gameengine.core.GameManager.start(GameManager.java:111)
at com.codingame.gameengine.core.RefereeMain.start(RefereeMain.java:69)
at com.codingame.gameengine.core.RefereeMain.main(RefereeMain.java:52)
You were able to reproduce that crash locally? Because I failed to do so.
Only for the last validator, or others as well?
How does your setup look like?
Namely operating system, Java version
Just get the error on the test 30 (not validator). It happends twice.
Windows 10 and Java 8 JRE and last version of eclipse
Hm, interesting.
Iāll see if I can somehow reproduce these crashes too. For now Iām completely clueless
Edit: for testing purposes I made the last validator a regular testcase, not crashing either
Ok I tried and everything is ok for me too
I just re-uploaded the game without any changes, seems to work again.
First submit: crash on validator 27 and 30 and second submit crash on validator 30
(āÆĀ°ā”Ā°ļ¼āÆļøµ ā»āā»
My python3 solution with some not well bounded DFS searches often gets an āInvalid pathā from the game, even though likely it is in fact timing out or some other crash (OOM?). Furthermore, it seems to be scrapping most of the log-output, which all together is somewhat misleading and not very helpful during debugging. Did anyone else notice a similar behaviour, or did I maybe miss something else somewhere?
Looking at the puzzle again, I admit that the error message isnāt helpful: it doesnāt distinguish between timeout, no answer at all, a path that is too long, a path not leading to Fry.
But Iām scared to change it and update the puzzle, that would wipe out the leaderboard
Ah, makes sense! Anyway, the missing log messages on the other hand were simply one very long line of output running into the limit. Together they confused me, but as long as one keeps the output short enough, having some log close to the final submission of the answer is easy enough to determine a timeout.
I do not understand how functions in the output work. Can anyone please provide an example? Thanks.
1DD2UD44U4443LR111111222LL3323UU;DDD;LLLL;UUUU;RR
This solves the 14th testcase (named āTestcase 9ā) using functions.
Thanks, I get it now.