Fall Challenge 2020 - Bugs & Questions

My point was: AI that crashed should lose, doesn’t matter how it got its score.
Otherwise there is easy-to-use hack: track scores, and if my score > opp score and opp can not brew something now then make timeout.

1 Like

Sometimes, player spells disapear from the viewer. It seems to happen after Learn action and to only affect the viewer because a can still see the missing spells in the turn input.
You can see it between turn 11 and 12 in the following replay: https://www.codingame.com/replay/500185601

I can’t reproduce. Unless someone else can confirm a problem with the stub in Python, I think we can remove it from the list of problems to fix.

1 Like

Okay guyz, sorry for being a newb, but I have a huge problem on my hands. I am working with C. I downloaded the github repo for the fall challenge. Maven got all the dependencies with just 1 warning.

Running the server and replacing the BasicAgent with a command line for my C program, just doesn’t work. And it is verbatim the code running in the online IDE, that I compile with GCC locally.

I can interact with my program just fine at the command line. For example I can copy-paste the output of the referee (I think it’s the one giving us input I think…) and my program just goes on and says the BREW 71 (since with this seed we got a full inventory at the start ?).

Anyway it makes no sense to me, why Java would not be able to launch the process (it seems he does in fact) but not receive any output. I even added an output to stderr just after “int main()” to check that something happens but when I start the whole thing, it says my program is silent (and therefore times out).

If I knew the codingame game engine better I might be able to figure something out, but it’s my first time using it… help ? Also I am under Windows, MinGW-w64, GCC 10.2.

public class Fall2020Main

gameRunner.addAgent("C:/dev/codingame.com/fall-challenge-2020/game.exe");
gameRunner.addAgent(BasicAgent.class, "Koume");

I came across an issue where the visual crashes when learning the top tome spell for the second time. This doesn’t happen when I do the same testing with the 5th tome (index 4).
I was trying to figure out whether the tax of learning (e.g. -3) is subtracted before obtaining the tax of the learnt spell (e.g. +2).
The text seems to imply that you first get the tax (+2), with extras discarded, and only after you pay the tax (-3). However, it looks like the excess is temporarily kept outside the inventory to pay for the tax.

Edit:
To elaborate on the visuals crashing; It is stuck in a REST (performed before learning the spell), all spells are gone, as well as all recipes. The tome still shows the tome spells.

Edit 2:
The visual glitch does not appear to be caused by learning the top tome spell. I only get the glitch (repeatedly) with specific conditions. However, I do not know what those conditions are. If requested I can provide all input data for the round where it glitches.

When there are a lot of spells to display, we stop showing the exhausted spells

Oh ok, good to know. Thank you.


https://www.codingame.com/replay/500307310
This replay crashes something in the JS if played until after round 40 or something

 
VM40542:3 TypeError: Cannot read property 'start' of undefined
    at eval (eval at <anonymous> (50c50bde2b0f1caac4d61d82e49e2838.html:63), <anonymous>:3:26493)
    at Array.forEach (<anonymous>)
    at eval (eval at <anonymous> (50c50bde2b0f1caac4d61d82e49e2838.html:63), <anonymous>:3:26448)
    at Array.forEach (<anonymous>)
    at n.Yn (eval at <anonymous> (50c50bde2b0f1caac4d61d82e49e2838.html:63), <anonymous>:3:26374)
    at n.value (eval at <anonymous> (50c50bde2b0f1caac4d61d82e49e2838.html:63), <anonymous>:3:34479)
    at n.value (eval at <anonymous> (50c50bde2b0f1caac4d61d82e49e2838.html:63), <anonymous>:3:95837)
    at n.value (eval at <anonymous> (50c50bde2b0f1caac4d61d82e49e2838.html:63), <anonymous>:3:101850)
    at p.update (50c50bde2b0f1caac4d61d82e49e2838.html:67)
    at v.updateCanvas (50c50bde2b0f1caac4d61d82e49e2838.html:67)
1 Like

Keep track of the opponent score, you’ll know he brewed something when it changes.

Hello,

As mentionned by @Mastard, in this replay:


After frame 35, it seems there is a +1 bonus for the first & second command, while I think it should only be for the first command.

This seems to only be a visual bug.

1 Like

Just in order to complete @PED post, I have the same issue in this replay :
https://www.codingame.com/replay/500347966

Although there is a slight difference. Actually, in @PED replay, the (+1 bonus) is mentionned when your mouse is over the 2nd order, but in my replay, it is not mentionned.

2 Likes

you should put your package import in com.Fall2020._

we only put in the cache class files and things com folder (in Scala)

About the urgency bonus, we’ll add the info in the input so you noone has to compute it.
Check the original post to track existing bugs.

This is my log output. Can anyone experienced with the SDK tell me why Java says my bot is silent when it isn’t ???

------------------------------------------------------------------------
Building fall-2020 1.0-SNAPSHOT
------------------------------------------------------------------------

--- exec-maven-plugin:1.5.0:exec (default-cli) @ fall-2020 ---
[11:55:22] INFO  : GameManager - Init
[11:55:22] INFO  : GameManager - Turn 1
[11:55:22] INFO  : GameManager - [[VIEW] 2]
KEY_FRAME 0
{"global":{"graphics":"2\n0\n0\n0\n5 71 -1 -1 0 -1 _ 17 77 0 0 0 -1 _ 20 70 -1 0 -1 -1 _ 15 42 -1 0 -1 0 _ 6 73 -1 -1 -1 -1 _ 12"},"frame":{"duration":500,"graphics":"0\n0 0\n2\n\n\n\n71 77 70 42 73\n2\n2 2 3 3\n2 2 3 3\n\n\n\n"}}
[11:55:22] INFO  : GameManager - [[NEXT_PLAYER_INPUT] 8]
5
71 BREW -1 -1 0 -1 17 -1 -1 0 0
77 BREW 0 0 0 -1 20 -1 -1 0 0
70 BREW -1 0 -1 -1 15 -1 -1 0 0
42 BREW -1 0 -1 0 6 -1 -1 0 0
73 BREW -1 -1 -1 -1 12 -1 -1 0 0
2 2 3 3 0
2 2 3 3 0
[11:55:24] INFO  : GameManager - [[VIEW] 1]
INTERMEDIATE_FRAME 1
[11:55:24] INFO  : GameManager - [[NEXT_PLAYER_INPUT] 8]
5
71 BREW -1 -1 0 -1 17 -1 -1 0 0
77 BREW 0 0 0 -1 20 -1 -1 0 0
70 BREW -1 0 -1 -1 15 -1 -1 0 0
42 BREW -1 0 -1 0 6 -1 -1 0 0
73 BREW -1 -1 -1 -1 12 -1 -1 0 0
2 2 3 3 0
2 2 3 3 0
[11:55:24] INFO  : GameRunner - 	=== Read from player
[11:55:24] INFO  : GameRunner - WAIT
[11:55:24] INFO  : GameRunner - 	=== End Player
[11:55:24] INFO  : GameManager - End
[11:55:24] INFO  : GameManager - [[VIEW] 2]
KEY_FRAME 2
{"duration":1000,"graphics":"0\n-1 0\n2\n\n\n\n71 77 70 42 73\n2\n2 2 3 3\n2 2 3 3\n\n\n\n","endScreen":[[-1,0],"logo.png",null]}
[11:55:24] INFO  : GameManager - [[UINPUT] 1]
[11:55:24] INFO  : GameManager - seed=5842184981578562716
http://localhost:8888/test.html
Exposed web server dir: C:\dev\codingame.com\fall-challenge-    2020\FallChallenge2020\src\main\resources\view
[11:55:25] INFO  : xnio - XNIO version 3.3.8.Final
[11:55:25] INFO  : nio - XNIO NIO Implementation Version 3.3.8.Final
[11:55:25] WARN  : Renderer - Run successful but port already in use. If you are running a different game, please restart the server.
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 6.878 s
Finished at: 2020-11-13T11:55:25+01:00
Final Memory: 9M/220M
------------------------------------------------------------------------

The command line:

public class Fall2020Main
gameRunner.addAgent("C:/dev/codingame.com/fall-challenge-2020/game.exe");
gameRunner.addAgent(BasicAgent.class, "Koume");

Could you please update referee sources on GitHub?

I think there still at least one tome spell where tier2 and tier3 are inverted:
-1 0 -1 1 should probably be -1 -1 0 1

I found it in this replay since my code right now crash if an unexpected spell is found in the list:

1 Like

thanks for the workaround ! that’s a really nasty bug though, random fails in the arena are never fun :frowning:

Timeout in java

I do not know if it is linked to timeout with scala and other langages using jvm but it occurs in java and i have just an heuristic very light currently only using some streams to filter and sort some actions. my elapse time is always under 1ms but sometimes i encounter timeout.

If i run the same game on the ide it works.

Sample : https://www.codingame.com/replay/500885189

1 Like

Hi, how to know if the opponent cast the same spell? I am getting this error while trying to cast the same in the same round:

### Standard Output Stream:
CAST 83
### Standard Output Stream:
CAST 83
### Game Summary:
GG1991 attempted an invalid action:
Tried to cast an opponent's spell...
Bosstorock cast spell 83

Your spells have actionType==“CAST”, your opponent’s spells have actionType==“OPPONENT_CAST” in the input. Even if the available spells are identical for the two witches (at least initially), they have different actionIds. What is 83 for Bosstorock, same spell is 79 for you.

2 Likes

More testing today … looks like IDE Play is now performing like Submitted code yesterday. Reading input on the first turn takes ~200 us. Then, my program can simulate about 50K moves. Total, ~1000 ms. The second turn takes over 10 ms to read input, and sometimes does not complete before the timeout. When it does read the input, my program can’t get through more than 41 simulations before timeout. It should be able to do ~2500, with 1/20 the time.

1 Like