Coders Strike Back


#1

Salut à chacun,

J’ai une question sur le règlement du concours,

Es ce qu’il faut que chaque pod passe par son prochain point en moins de 100 tours ou un seul pod suffit ?

Je vous remercie,


#2

The rule states: If none of your pods make it to their next checkpoint in under 100 turns, you are eliminated and lose the game.


#3

Es ce que c’est possible de savoir pour quelle raison nous sommes éliminé ? Par exemple dans la console ?


#4

You should switch to debug mode.


#5

oh, yes, Thank you.


#6

Hello,
In relation to what is given then angle value in input ? In other term, what is 0° ?
Also the angle value seems unvalid at first turn (-1 for all pods), is it normal ?

Thanks :slight_smile:


#7

The 0° angle is horizontal to the right clockwise


#8

Thanks for your reply. I agree that the measure is clockwise.
Nevertheless from what I see, horizontal right is more like 20° or so…


#9

@MaximeC
It’s missing in the Rules that pod speed is multiplied by 0.85 after each turn (drag).


#10

Can you tell me whether angle value is rounded or truncated after all the math?


#11

Hello.
The animation sometimes stop working and I need to refresh the browser (I use a webkit-based browser).
There are some errors in the browser console:

TypeError: undefined is not an object (evaluating '$("#navigation").position().left') 4fbf7562.codingame.js:46
TypeError: null is not an object (evaluating 't.worldTransform.applyInverse') undefined:8
TypeError: undefined is not an object (evaluating 'frames[frameNumber].currentKeyFrame') undefined:1765
TypeError: undefined is not an object (evaluating 'frame.collisions') undefined:1909
TypeError: null is not an object (evaluating 't.worldTransform.applyInverse') undefined:8

It would be nice to fix these issues.
Thanks.


#12

Thanks for the bug report @bouanto. Do you have a process that could help us to reproduce the problem? Is it with a particular code or against any particular opponent ?


#13

I play against the default AI in the IDE.
I paste code in the editor and click on “Lancer mon code”.
After a couple of times, the animation stop working.

I’ll try to notice when I see these errors.


#14

Tanks! We are going to start from these steps


#16

I think I found what causes this issue.
I clicked on “Lancer mon code” as usual and the following error was shown:

main is not a function

So, perhaps when there is an error (from the compiler), the challenge stop working.

By the way, it happened using the Rust programming language and the code compiles. Clicking on play again shows the output (but not the animations).
I’ve often seen this error (main is not a function) when doing previous challenges.

So here are the steps to reproduce this issue:

  • Choose the C++ language.
  • Remove all the code in the editor (to cause an error).
  • Click on play.
  • Put the code back in the editor.
  • Click on play.

You will see that the animations are not working and the errors in the browser console (I was able to reproduce this issue in Firefox and a webkit-based browser).

Thanks to fix it.


#17

The rule is not correct in all the situations :smiley:
Not a big deal tho


#18

What’s the problem with this replay?


#19

I think that it breaks the 100 turn no checkpoint rule
{I might be wrong though}
pls dont get angry on me
I am sorry if I am wrong :slightly_smiling:


#20

No it’s not breaking the rule, as at least one pod is passing through checkpoints.

I have a question about the power, how is it related to the change of speed ?
I mean if I have a speed of 1,and a power of 100,how do I estimated my next turn speed ?


#21

Suppose the pod is at 1000,1000 (x, y), the speed is 1,0 (vx, vy) and you want to go to 2000,1000 with thrust 100.

At end of the turn you have:

Pod at 1101,1000 ( 1000 + 1 + 100) (only horizontal move, because angle is 0)
Speed = 85,0 ( 1+100 = 101 -> 101 * 0,85 = 85 (trunc) )

0,85 is the “drag coefficient” after each turn.