Spider Attack (Spring Challenge 2022) - Puzzle Discussion

Feel free to send your feedback or ask some help here!

Game link: Spider Attack

Don’t hesitate to check out the topic for the contest of the same name: https://www.codingame.com/forum/t/spring-challenge-2022-feedbacks-strategies/195736


There was an issue during the copy of the challenge.

At first, around 2k players weren’t in the leaderboard. We’ve managed to fix it but if you’re one of those 2k players and you entered the game before we fixed the copy, you will be in the proper league but will need to resubmit to appear in the leaderboard.

I’m sorry about this. Your code should be in the IDE. Else, you can get through Activities > Compete > Contests > SC2022 - View Report


Hi, I think I’m experiencing a bug with this challenge.

Example for seed=-7521358089716476900, round 78 (although for some reason rounds are only deterministic for monsters, even though I call random.seed(333) myself...): I parse four heroes, first three heroes are mine and fourth is attacking boss.

  • Parsing 0 (4368, 2598)
  • Parsing 1 (2066, 1267)
  • Parsing 2 (1197, 4601)
  • Parsing 3 (3406, 2155)

My hero #0 is trying to cast wind against hero #3 towards (17630, 9000). Distance is math.dist((4368, 2598), (3406, 2155))==1059 which is less than 1280. So hero 3 should be pushed by 2200, however it is not.

Am I missing some rule which would prevent hero 3 from begin pushed as expected?

It is better if you could provide a replay. For now, I think that this might because heroes move before the “WIND” spell, so the hero could move out of the range before your hero “WIND” spell take affect.

I went back to the rules and this time paid attention to order of applying them during the game. I then checked my examples and indeed, hero was moving away and since wind is applied after move it is possible to dodge wind by simply moving away. Thanks for pointing this out, I should have checked the rules before posting.


I have a really silly question, but one that annoys me.
How does the code know if the first command is for such hero (hero 0,1,2)?

Let’s say the bot wants to write its first impression as soon as possible but has chosen hero 2 . How does the software understand that the bot sent a command for hero 2? Unless he necessarily waits for the order of hero 0 first?


That’s how it (the game engine) reads it, first output is for hero 0 then 1, then 2 (respectively 3, 4, 5 for blue player). You would have to store the output of hero 2 until it’s the right time to write it.