Spring Challenge 2022 - Bugs & questions

I see that you’ve been promoted to Wood 1 already. Anyway, league promotion occurs after you are ahead of that league’s boss AND 100% of the battles have been resolved. You may check the percentage of completion of the battles by clicking LAST BATTLES or LEADERBOARD to the left of the challenge statement.

Ok, so I’m out here trying to program in C because I hate myself (and want to practice with it). I was having an issue where I could output my first 3 instructions in the first round fine, but fail to provide the instruction in the second round.

My first thought was that something in my code was taking longer than 50ms but shorter than 1000ms. To debug I started using perror() statements; I put one at the very start of the game loop (before anything happens) and one at the end (just before it reruns the loop). When I ran it again, I saw both my standard error messages show up the first round and neither the second. I didn’t even see the message I put at the start of the game loop print.

Am I dumb, or is there something wrong.

Edit: I’ve fixed my code, but I’m still curious as to the reason why the error message didn’t print. Are there possible errors that don’t show up in the stream?

Yeah, when running in the arena, even simple clojure solutions frequently fail to even start with “Code failed: main entry point was not reached in time”; that doesn’t seem to happen while running the same code in the sandbox.

We’ve had many issues with Clojure during previous challenges and we have been unable to fix it. I advise you not to use it, sorry :frowning: cc @vlad107 @spicausis

okay understood, thanks for confirming :slight_smile:

Bug report: It seems that the game code is not 100 % symmetrical for the two players; this seems like an “off-by-one” bug to me. In particular, part of the game code assumes that the valid game zone extends from 0 to WIDTH-1 / HEIGHT-1 inclusive (see e.g. SpringChallenge2022/Referee.java at fbb4d12a07aa632b632d748d6c9a78a2b25e50ea · CodinGame/SpringChallenge2022 · GitHub or SpringChallenge2022/Referee.java at fbb4d12a07aa632b632d748d6c9a78a2b25e50ea · CodinGame/SpringChallenge2022 · GitHub). However, the bases are located at (0,0) and (WIDTH, HEIGHT) respectively (SpringChallenge2022/Referee.java at fbb4d12a07aa632b632d748d6c9a78a2b25e50ea · CodinGame/SpringChallenge2022 · GitHub), relevant e.g. for the initial placement of the heroes and for within-range tests.

7 Likes

This is my challenge. This morning the times for the arena fights are very long. I beat the boss of Wood 1, but since the “matchs” are no longer progressing, I’m stuck in Wood 1.

2 Likes

Oh, and the “symmetricTruncate” is also not 100 % symmetric, because the “symmetryOrigin” it uses is not symmetrically between the two edges of the game zone (off by half a pixel). I acknowledge that these one-half and one-pixel bugs probably have very little impact on the overall game at all, but it makes it much more difficult than necessary to implement a pixel-perfect referee in any other language.

3 Likes

Same issue, gray screen, it’s not intentional, idk how to fix either.
Chrome, adblock turned off

Hi @Milanovich, in my case the root of the problem was the fact that I had webgl disabled in my day-to-day firefox. I can see animations when running on browser with webgl enabled.

1 Like

I think I already left my current submission for 3 hours and I only got 6 battles of progress. Is this a server problem or battles are just computationally heavy and take a long time to generate? Thank you

1 Like

Same here. I submitted a while ago (in Go), progress went up to 33% quite quickly and is stuck there for half an hour at least.

image
This input function (Python3) often takes over 50ms to return a value, and I’m losing my games due to not returning a value quickly enough. Is this a bug or in any way related to other parts of my code? (The rest of my code executes in well under 1ms so it seems pointless to try to optimise that).

Start the timer after reading my_health and my_mana.

1 Like

Thanks I changed a different part of my code and it magically started working again.:person_shrugging:

I’m using Python.
I have a class defined that I’m using to keep track of the state of the game and to define methods for my heroes. Nothing in creating an instance of the class “prints” anything.
If I try to create an instance of the class before the game “while” loop that reads each round’s input (e.g. during the first turn only), I get the warning “Warning: your code did not read all available input before printing an instruction, your outputs will not be synchronized with the game’s turns and unexpected behaviour may occur.”
If I create the instance of the class within the “while” loop, then I don’t get this error.
Why would creating an instance of a class cause a sync issue if it doesn’t print anything? Thanks!

I am encountering what I believe to be either a huge bug, either a documentation problem :

it is said in the rules that

Après la phase de déplacement d’un héros , tous les monstres situés dans un rayon de 800 unités subissent 2 points de dégâts, même s’ils n’ont plus de vie.

That I understand as “once the hero moved, all monster 800 units far are hit”. However, I invite you to check my current IDE AI, with seed : seed=-5879542629183289300

At move 91, you can see the hero 2 following a monster :


As you can see, the distance is indeed < 800 :
image

…But the monster took no damage (and you can check other frames, it’s the same, my hero stay aside but won’t hit it)

If you post a replay link it will be easier for others to see what is going on.
In any case I have been reading the referee.
If your hero’s new position is less than 800 from the monsters old position, then damage is dealt.

2 Likes

Oh sorry haven’t noticed I could share the replay : Coding Games and Programming Challenges to Code Better

If your hero’s new position is less than 800 from the monsters old position, then damage is dealt.

Do you have the link to the referee ? This is indeed very interesting and would explain much of the problem