Mad Pod Racing - Puzzle Discussion

Please read the second last message above yours.

Hello!
im having trouble with boost as I tried a lot of options like: define or even just write … + “BOOST”
and it didn’t work. here is the example Coding Games and Programming Challenges to Code Better
(im using python)

We won’t see anything if you just link to the IDE. If necessary, please include a replay link instead.

To use boost, print it after the target coordinates plus a space, e.g.

print("5 1 BOOST")

ok thank you

Hello, is there a referee available for this puzzle?
Thanks.

Hi,
you can have a specific path in your program
here is an exemple
If ((Distance > N) AND (Angle < A) AND (IsBoostUsed != true)) then
printf(“%d %d BOOST\n”, next_checkpoint_x, next_checkpoint_y);
}

Hi all,
i’m thinking of a thing.
The theme is about IA… and neural network.
To use NN, we can implement code, but we have to train it. This means we have to store weight and bias somewhere to be reused.
how can we do this here?

1 Like

Please refer to the discussion here (part of the discussion is specific to Mad Pod Racing): https://www.codingame.com/forum/t/neural-network-ressources/1667

1 Like

Can you please help me understand what are the requirements to be able to challenge a friend?

Your genetic algorithm rules only the thrust and the angle. Did you use like generate by this algorithm, or you made some adaptation of the thrust after ?

WHY Am i unable to make ‘if’ statements with distance or anything? do i need to do some specifics to make it work? because i’m focusing on java, and when i’m good at coding, i will switch to python.
however, the only problem is that i want to try to clear this first, yet it won’t even budge a bit, not even with full thrust.

What messages does the console show?

Hello , newbie here , is there a way to reset my leaderboard or my rank on mad pod to begin back and watch the tutorial again , thing is I restarted my code by accident and I didn t remember what was there(the turning on 90 degree angle thing ) and I would like to grasp the concept more by begining again without changing or creating a new account

I’m afraid there isn’t a way to reset your position on the leaderboard.

As for the turning on 90 degree angle thing, do you mean this?

2 Likes

hello , yes exacly but above that if I correctly remember there is an image explaining steering according to the angle, I didn t really pay attention I just codded the pseudocode withouth thinking of what does it do

How can I move onto the next rank? I am currently bronze #1, and I’ve been waiting for the promotion. Does it take time?

If your score is greater than that of the boss in your current league, then you’re promoted. A timer is shown to tell you how much time you have to wait before promotion actually happens. The higher the league, the longer it takes to promote.

Sometimes there is a bug in promotion. In that case, you may first try to re-submit your code to force the promotion to happen. If that still doesn’t work, you may report a bug in the CodinGame Discord chat.

import sys
import math

# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
    runtimecount = 0
    boostused = False
    firstturn = True
thrusters = 100
# 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)


    # 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) + " " + str(thrusters))
    if (next_checkpoint_angle < 15 and next_checkpoint_angle > -15 ):
        boostused = True
        print ("Boost used!", file=sys.stderr, flush=True)
        print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + " BOOST")

    if (next_checkpoint_angle > 90 or next_checkpoint_angle < -90):
        thrusters = 0
    elif next_checkpoint_dist < 1000:
        thrusters = 0
    else:
        thrusters = 100

    firstturn = False

But then this is what I get to look at:
Warning: your code did not read all available input before printing an instruction, your outputs will not be synchronized with the game’s turns and unexpected behaviour may occur.

Then I fix it but then I get an error that I didn’t produce output in time

HEEEEEEEEEEEEEEEEEEEELP!

You have a print statement that runs every turn and then an extra one that is run when your angle is < 15. You need to make sure you only print a single line on each turn, otherwise you get that error.

    print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + " " + str(thrusters)) #printed Every Turn
    if (next_checkpoint_angle < 15 and next_checkpoint_angle > -15 ):
        boostused = True
        print ("Boost used!", file=sys.stderr, flush=True)
        print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + " BOOST") #Second print statement

It hapens to me to sometime.
What appens if you reload the page ?