Mad Pod Racing - Puzzle Discussion

Good afternoon,

Is there a way to temporarily return to a lower league? I was quite happy with how my bronze/silver car ran and I would like to spend a little more time with it.

Thanks

Hi, you canā€™t return to a lower league, but you can make your car run the same as before. In gold league you just have more inputs.

hey, could anybody please tell me how you could plot a message in mad pod racing for a pod?
(pthon3 ;))
I canā€™t find it in the docks.

I think you can add a space followed by the message at the end of the line to print, e.g. PRINT(ā€œ300 200 100 MY MESSAGEā€).

1 Like

Hello guys!

I have just discovered this game and I would like to implement and use a reinforcement learning algorithm (a deep Q learning algorithm to be more accurate). I know exactly how to implement and train such an algorithm however, I have absolutely no idea how to integrate such a model in this platform :smiley:
There is a GitHub with the environment code allowing us to train our model offline with a simulator? Can we push somewhere a file with the weights of our model?

If we must train our model on the CodinGame platform, can we use some memory to save our model somewhere and how can I import torch to develop a Neural Network on the platform?

Thanks and have a great day!

Probably there are answers in this thread exactly. People train their nets offline using simulator, mostly written by themselves. For mad pod racing (formerly csb) there is some guidance like Coders Strikes Back . I donā€™t remember if there is exact referee code somewhere.

Neural network is just bunch of floats, so you can copy them into your code. There are some ways to ā€˜compressā€™ them if you need tens of thousands parameters. Also you have to write forward prediction, which is just matrix multiplication really.

Can anybody provide any clue on what is the fitness function? I just enter the bronze league, and so far I havenā€™t used anything remotely similar to AI, or a genetic algorithm. Just the most basic logic.

Iā€™d recommend you to not bother with implementing GA until gold/legend league. Just more logic should be enough to pass bronze/silver. FYI gold league is a game changer (also a bot breaker) with an introduction of new extended inputs and new rules.

1 Like

Hi.
I wait to be promoted to gold. My bot just use basic logic also. You donā€™t need genetic algorithms or complex IA in bronze. Just prepare for the next steps with good trajectories. Itā€™s enough for now. Step by step.
Good luck !

i really dont know what is wrong with the code, like even i managed to stay at first position for this code, but cant go more than boss.

like if anyone can help me find what is wrong with it: itā€™d be really helpful.

Moderator edit: donā€™t share full code

In this thread we are supposed to have a discussion of ideas, tips and tricks not bounded by a specific programming language. Implementing these ideas in the language of your choice is the crucial learning opportunity which should not be spoiled or discarded.

oh! sorry for that.

i kind of dont know what maybe the problem is.
as for the approach iā€™d say iā€™ve taken the opposite approach where instead of slowing down. around at 1000-2000p distance iā€™d slow down a little and then at 0-1000 go with slightly more speed.

other approaches iā€™ve used are : slowing down at the turns, avoiding collision.
iā€™ve been fine-tuned code for every ā€œotherā€ approached and only the one that worked was the first one i described above. if there is anything iā€™m missing please let me know that i can apply and work on

1 Like

i donā€™t get the velocity part.
like, how do we calculate the velocityā€™s?

in second reference link you have sent, what time do we have to use like as we dont have any time for reference??

Consider measuring the velocity not in SI units (meters per second), but in abstract position units per game turn. Or just presume 1 game turn is equal to 1 second.

1 Like

yeah, but like using what variables and what logic i have to use.
i dont understand that.
velocity = //some logic ??

What is your velocity if you move from point A to point B after 1 second?

velocity = ( point_B - point_A ) / 1 second

1 Like

You have answered your own question earlier.

velocity = //some logic ??

:sweat_smile: okay, so check this

velocity_x = next_checkpoint_x - x/1000 milisecond;
velocity_y = next_checkpoint_y - y/1000 milisecond;

if thatā€™s the velocity what am i gonna do with it.

the first thought i get is getting square root value of both to get some proper velocity value in one number.
velocity_oneNumber = āˆš { (velocity_x)^2 + (velocity_y)^2 }

even though, letā€™s say i got this velocity right what do i do with it?
i genuinely have no idea how can i use it in code.

all i know is using angle, next checkpointā€™s distance which is already given.
use them and give thrust value to every situation i can simulate and painstakingly guess value of thrust value everytime. so; itā€™s safe to say iā€™ve quite no solid logic in these terms.