Spring Challenge 2022 - Bugs & questions

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

If I am reading this right, in the Referee around line 320…
If two monsters on the same turn are pushed by wind into exactly the same OR exactly symmetric positions, then their randomised directions will be exactly opposite.

An amusing if pretty improbable detail.

Indeed, it’s written in the Bronze documentation too, but not in the Wood one >.<

One of the many strange details in the game implementation. Likely, this is a left-over from an earlier version of the mob spawning routine, where you want symmetric mobs to be spawned.

Another strange detail is that this section is the only section, where mob speed is not truncated at the source, but kept as floating point; the coordinates will then be truncated using a different method when the mobs are moved. In all other cases, the speed itself is truncated beforehand.

There is a typo in fr statement : it says 100ms for a turn !

I am being stuck in wood1 league even though, I have beaten the boss, and all my games are processed,
Is it a known bug ?