Mad Pod Racing - Puzzle Discussion

You may read here for some explanation on how bot programming games work:
https://www.codingame.com/forum/t/how-is-the-rank-for-single-finished-bot-programming-computed/194147

For strategies to advance in Mad Pod Racing, you may read the “External Resources” on its front page for a start.

How can I remember each checkpoint can you explain in some algorithmic way.
And please also explain this point also “you should skid through the checkpoints instead of going into them and then turning (hint: your current speed is useful for figuring out when to start turning)”.

Yesterday evening, I was about 38000/39000, I went sleeping, this morning I’m 3165/39000. And no, I didn’t code during my sleep, the code is what it was yesterday.

A trigonometric circle is always anti-clockwise. In math course anyways.

Not sure about the timing of the events mentioned in your post, but after you submit your code, your bot has to go through a hundred or more battles against other players’ bots, during which your rank will be continually affected by the performance of the bots. Your rank will not be stabilised until all these battles are finished.

Similarly, other players can submit their code and in some of their battles your bot may be chosen as their competitor (it is semi-random). Your rank will also be affected by those battles.

Even if your bot is not chosen, your rank may still be indirectly affected, because at the end of the day, rank is determined by the value of Trueskill points. If other bots improve or deteriorate in performance and their Trueskill points increase or decrease, your rank may change too.

Can anyone help me how to clear silver league? can anyone give me some hint in algorithmic way?

Why sometimes my pod turn around the checkpoint instead of passing it?

How it works with javascript? It seems that I am not allowed to put something after X Y Thurst.

What make the pod turns around the checkpoint without enter it?

The output format is specified in the statement. You have to follow it exactly otherwise the instruction will fail.

You may want to check out the link “Genetic Algorithm post-mortem by Magus” on the cover page of the puzzle for an explanation of the maths/code for pod movements.

I’m not sure if I’m missing something but how do you finish wood 2 league. I’ve been trying to optimise the pod but I can’t beat, Boss 2.
When I increase my turning speed, I fall behind in the long stretches, and when I increase my normal speed I fall behind in the sharp turns.
This is my code:

import sys
import math

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.


# game loop
while True:
    # next_checkpoint_x: x position of the next check point
    # next_checkpoint_y: y position of the next check point
    # next_checkpoint_dist: distance to the next checkpoint
    # next_checkpoint_angle: angle between your pod orientation and the direction of the next checkpoint
    x, y, next_checkpoint_x, next_checkpoint_y, next_checkpoint_dist, next_checkpoint_angle = [int(i) for i in input().split()]
    opponent_x, opponent_y = [int(i) for i in input().split()]

    # Write an action using print
    # To debug: print("Debug messages...", file=sys.stderr, flush=True)
    if abs(next_checkpoint_angle) >= 25:
        thrust = -65
    else:
        thrust = 100
    # You have to output the target position
    # followed by the power (0 <= thrust <= 100)
    # i.e.: "x y thrust"
    print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + " 100")

Please read the hint in the form of pseudo-code in the statement. You should be able to pass Wood 2 by implementing that in your programming language.

How did you beat the boss? I’m trying everything and I can’t do it. Could you give me a few tips?

I used it but the boss is still faster and better at turning. I have also tried modifying the code they gave but that also didn’t work.

this is my current code based on pseudocode hint:

import sys
import math

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.


# game loop
while True:
    # next_checkpoint_x: x position of the next check point
    # next_checkpoint_y: y position of the next check point
    # next_checkpoint_dist: distance to the next checkpoint
    # next_checkpoint_angle: angle between your pod orientation and the direction of the next checkpoint
    x, y, next_checkpoint_x, next_checkpoint_y, next_checkpoint_dist, next_checkpoint_angle = [int(i) for i in input().split()]
    opponent_x, opponent_y = [int(i) for i in input().split()]

    # Write an action using print
    # To debug: print("Debug messages...", file=sys.stderr, flush=True)
    if next_checkpoint_angle>90 or next_checkpoint_angle<-90:
        thrust = 0
    else:
        thrust = 100
    # You have to output the target position
    # followed by the power (0 <= thrust <= 100)
    # i.e.: "x y thrust"
    print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + " 100")

And this is the replay:

Try

print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + " "+str(thrust))
1 Like

That is because you have not actually output thrust in your print. You have to
replace
" 100"
with
" " + str(thrust)
as mentioned by @jacek1 above.

Remember that the game engine only looks at what you have printed to determine how your pod moves.

1 Like

How tu use a neural net with the game. I choose to make this with 2 input the next_distance and the angle between the next spot and the last spot and the actual spot.The output is the thrust for braking the car.

You may read this thread for more information: https://www.codingame.com/forum/t/neural-network-ressources/1667