Mad Pod Racing - Puzzle Discussion

Hi! :slight_smile:

It’s hard not to start talking about turns when speed is discussed.
But it make things more complicated.
I will return to my original post I hope.
For now this is only about debug output X axis speed in wood 2 league. :slight_smile:

I am also using 15% for friction. That is why I changed thrust from 85 to 88 so it wouldn’t make things more confusing. And I didn’t want to “spoil” it for anyone.
And thrust 88 had the same situation to be discussed for the continuation of the original post.

When debug output calls it speed when it’s not, isn’t that just a mistake?
It’s printed in debug at a point when friction is added to it.
It’s a preparation of speed before the next speed calculation.
So when next speed calculation is to be done, friction is already added and the game just adds thrust to it.

We can’t move 88 at the speed of 74.
74 might be interesting for someone but speed must have been what was intended to print?

Best regards! :slight_smile:

Consider friction a natural consequence of movements… Friction builds up while moving, so it happens during the current turn, not the next turn. And no matter you like it or not, this is the logic used by the game engine :person_shrugging:

Anyway, let’s not discuss whether it is right or wrong for the game engine to be coded that way. Let’s focus on playing the game based on the given rules.

How do I get the coordinates for the next checkpoint in gold league? I don’t see a variable for that.

You have to reset the code to get a new template for getting the inputs for this league.

That is what I did.

And if you have done so, you will have the coordinates of all the checkpoints at the beginning. You have to store them for later use, because in this league, you are given the next checkpoint ID instead of the next checkpoint coordinates.

Ok, Thank you.

EZ WIN IF YOU SET THRUST TO 150! Its overpowered.

I am 1st in my ranking in Wood 3 league, why i am not promoting to wood 2???

There is a bug in promotion. You may try submitting your code again, and if that still fails to promote you, please contact Thibaud of CodinGame to fix the issue for you.

I couldn’t know how to beat the boss 2 in mad pod racing problem although i have followed the pseudo code as is, here is my code

...
if (nextCheckpointAngle > 90 || nextCheckpointAngle < -90)
                {System.out.println(nextCheckpointX + " " + nextCheckpointY + "0");}
            else 
                {System.out.println(nextCheckpointX + " " + nextCheckpointY + "100");}
            // You have to output the target position
            // followed by the power (0 <= thrust <= 100)
            // i.e.: "x y thrust"
            System.out.println(nextCheckpointX + " " + nextCheckpointY + " 80");
...end of class

can anyone help? Thanks in advance

Where does the third System.out.println belong to?

if (nextCheckpointAngle > 90 || nextCheckpointAngle < -90){
                System.out.println(nextCheckpointX + " " + nextCheckpointY + "0");
            }
            else {
                System.out.println(nextCheckpointX + " " + nextCheckpointY + "100");
            }

I have removed it. now the video doesn’t even start it gives the result right away.

You have missed the spaces before “0” and “100”. You should include add a space there, similar to how you include a space between nextCheckpointX and nextCheckpointY.

Hello,
I reached silver league . without using AI, but “ordinary” code compensating drift and so , and I have 2 questions ?
Now I see than the angle parameter has changed , and I must be dumb or too tired because , I don’t see how to use it ??
Second , do i need to code an AI to pass to gold league (in other words , did I missed the purpose of this challenge )?

  1. Angle: You may read Magus’s explanation on how to use the angle parameter here: http://files.magusgeek.com/csb/csb_en.html

  2. You may still use “ordinary” code to reach Gold league.

1 Like

A post was merged into an existing topic: New to codingame

Screenshot 2022-05-09 9.31.59 AM

i need help it wont let me import it how do i fix this issue?

There is no such library available on Codingame, but you can use numpy instead.

ok thank you