Spring Challenge 2022 - Bugs & questions

I faced the same symmetry issue… Replay link turn 189… not sure why there is an asymmetry suddenly…

We’ve released a few fixes:

  • symmetry issue reported by @burnpanck
  • wrong input after control reported by @struct
  • prevent interactions with out-of-bounds spiders reported by @blasterpoard
  • threatFor issue reported by @aropan
6 Likes

Hi using Python3 here and I think there’s a small bug, but it’s really preventing me from advancing further.

I’m on wood1 league and when I try to print the mana (already in the initial code given from input) it shows the opponent’s mana instead of mine… I see no way of going around this since my own mana is nowhere in the input…

It’s inside a loop you are given the health and mana for both players, first iteration of the loop you will get your health and mana, on the second iteration you will get opponent health and mana.

2 Likes

Thanks for the super quick reply! I just figured it out as well, it was written in such a way that it’s overriding the same variable twice so that kinda threw me off…

Could someone explain me the off-by-one position error I have on the mob #18 (the one my top blue hero is chasing)? The given x velocity remains constant for the three turns, i.e. 398, while the actual velocity is 399. Since velocities are normalized then truncated, the position at next turn should be the position at previous turn + the velocity at previous turn when there is no wind nor control. Am I missing something?



You have not specified in the description that a hero cannot cast a spell (for instance a shield) on himself.

But it can cast spell on himself, unless shielded

These need truncate(). It may be the cause of this comment.

3 Likes

hum, you are right. That mob just got pushed out of my base, its speed has been randomized but not correctly truncated. So the referee sends me the double values downcasted as integer while it uses the real values to move the mobs.
I guess I’ll allow a ±1 offset in my validation tests ^^.
Thanks :-}

1 Like

C’été 100ms au début puis 50 en Argent, je venais parlé de ça c’est juste n’importe quoi, ont passe son temps a essayé de gratté 2 ms au lieu de codé de la stratégie et vrai IA :confused: C’est completement débile.

Surtout que l’époque d’optimisation de code c’été en 1970, j’ai fais un DUT & License et il doit y avoir a peine 1% de métier de dév qui nécessite des optimisations aussi énorme. (Coding Hardware généralement).

Sérieux faut arrêté :confused: En + vous avez pris en compte le temps de travail de vos serveurs avec tous les scripts combiné ?? Sans compté que certains langage sont censé être multi-threadé (comme le C#que j’utilise). Et du coup ont peut même pas utilisé un try-catch ou des fonctions de Math / List :confused:

C’est plus du coding d’IA là mais du pinaillage de milisecondes… Et des code d’IA de gaming qui mettent - de 50ms j’aimerai voir si ca existe seulement :smiley:

It’s always been 50ms in the code of the referee for every leagues but was mistakenly written as 100ms in the :fr: subject and was only fixed recently.

Most gaming AIs share the 33ms for 30fps or 16ms for 60fps along with input, rendering and the myriad of things a game have to do every frame :sweat_smile:

2 Likes

Rules say that Heroes attack monsters in range and produce mana for each hit.
But in referee mana gain happens after whole update cycle, so newly produced mana available only for the next turn.
In my opinion either rules or referee should be corrected

Currently I am facing one issue, images not loading at all. Can you please help me here

Probably but the code is compiled and launched only 1 time ^^ i bet here our “time” used by our script is shared between 1000’s of user on same server compiling all in same time (around 20 000+ user, so 20 000 compilations).
I can’t even use 2 List in C# because it s more than 50ms… i even had to remove the Math.Sqrt for distance & etc… it’s Pig Coding, at the end it look like Code made by people who didn’t got their degree at university…

Well this challenge finnaly disgust me for good i think, we can’t even do technical stuff & other , the only thing who work is to go and put shield & push… Apparently same in gold lol, there is one who go push with 2 ppl but the other guy don’t move … i guess the code to make him move spend too much time…

Don’t compare real IA code launched 1 time on 1 machine with this where our script is re-compiled among 20 000 others, i bet 80% of the “time” is the server who have problems with multiple compilation…

Well i finish 250th in Silver League , but it’s just “luck” to go better like Gold. I looked them it’s same scripts… Just their match had a different Seed…

All of this because of this stupid useless 50ms…

That seems weird. :thinking: Are you properly reading all the input and outputting only your heroes commands?

There are plenty of people using non-compiled languages like JavaScript, Python or even Ruby just fine.

Heck, 2 of the current top 3 players use JS :sweat_smile:

2 Likes

Can you play red outside of the arena. It seems my spells are targeted in the wrong corner when I play red in the arean. So I want to test it.

In Python I have this code to determen the cordinates of the opponents base

base_x, base_y = [int(i) for i in input().split()]

opp_base_x = abs(base_x - 17630)

opp_base_y = abs(base_x - 9000)
----
print(f"SPELL CONTROL {target.id} {opp_base_x} {opp_base_y} {target.id}")

Anyone can help?

You delete both players and then you can choose your opponent and whether you are red or not in the PLAYERS tab to the left of the PLAY MY CODE and other buttons.

1 Like

Thank you!

So can I use code from referee in my solution - like the Vector class and the way you calc new speed for monsters?