Mad Pod Racing - Puzzle Discussion

Even if you could go back the fact you got past silver means you had already optimised enough to be better than all the other single agent bots so there wouldn’t be much more to do there.

If you do just want to focus on optimising a single agent there is a optimisation puzzle (Search Race Coding Games and Programming Challenges to Code Better) that is a single player, single pod version using mostly the same rules (uses the legend speed rather than gold) for optimising your route through the checkpoints.

1 Like

I would have loved to race other overly-optimized pods, it’s the collisions that made the race interesting, it’s that’s a shame that I can’t do that anymore…

curr_velocity=curr_pod_poss-prev_pod_poss should work, just store the variables outside the loop.
velX = x- prevX; velY= y-prevY;
You need to optimize for the ship and checkpoint radius.
also during the second lap start steering early towards the next checkpoint

I honestly think because of the speed of reading code, its very hard to do as a js person (who doesn’t always go on js all the time)

how do you boost the speed for wood 2 :no_mouth:

how do you solve wood 2

Please read: https://forum.codingame.com/t/mad-pod-racing-puzzle-discussion/1833/886

how do i write thrust if its ot working (im writing on c++)

Something like this:

cout << x << " " << y << " " << thrust << endl;
1 Like

Is there a way to get print messages that won’t count as part of the output? I want to see if an if statement is triggering. I’m using python.

import sys

debug_output = "Value you wish to inspect"

# printing to stderr while output is expected in stdout:
print(debug_output, file=sys.stderr, flush=True)

# this is equal to print(debug_output):
# print(debug_output, file=sys.stdout, flush=True)  

anyone know why this code does not work?

if next_checkpoint_dist > 10000:
        thrust = "BOOST"
print(x y thrust

Assuming the condition works well in terms of pod logic and you are using Python, the last line should be

print(x, y, thrust)

Please also note that codes should be formatted using the </> button on the formatting toolbar in order for it to display indentation properly.

How to go back to older conditions after getting promoted?

There isn’t a way.

1 Like

Hi,
I’m in wood 2 and I can’t beat the bot. Could you help me please? This is my code:

print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + "100")
    if next_checkpoint_angle > 90 or next_checkpoint_angle < -90:
        thrust = 0
    else:
        thrust = 100
    print

I’ve formatted your code for you (you can also format it using the </> button on the formatting toolbar), but it still looks a bit off. Please check whether it’s correctly copied and pasted.

A few points that I’ve noticed:

  1. You print your output before setting the thrust, not after.
  2. After assigning a value to the thrust, you don’t use it in the print statement.
  3. You do not print a space between next_checkpoint_y and 100 (or the thrust).
  4. The last print statement is incomplete.
  5. The indentation is off.

I CHANGED MY CODE, BUT IT DOESN’T WORK:
print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + " 100")
if next_checkpoint_angle > 15:
thrust = 0
elif next_checkpoint_angle < -15:
thrust = 0
else:
thrust = 100
print(str(next_checkpoint_x) + str(next_checkpoint_y) + str(thrust))

You’re outputting twice with two print statements. Just output once per turn. And you need a space character between the numbers.

Oh man, I’m struggling to get out of Bronze… ! The earlier leagues were very simple, but I’ve suddenly hit a wall here… I’ve had to add a lot of complications like: gradient of acceleration depending on the angle to target, and targeting opponents, cornering is smoother now too with some deceleration… … but still not progressing!
It was much simpler prior to this league… I wonder if I’m over complicating it… but I’m not winning enough to progress into the next stage.
Any hints would be appreciated.