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.
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
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)
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:
You print your output before setting the thrust, not after.
After assigning a value to the thrust, you don’t use it in the print statement.
You do not print a space between next_checkpoint_y and 100 (or the thrust).
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.