Hey. MadPodRacing is tagged with Neural Network. Therefore I’ve wondered how I can use them? Are their any popular libraries installed, like pytorch, tensorflow, keras, onnx, scikit-learn, etc?
I’ve already written a complete simulation for of the game in unity, I also trained an ml-agent on it. But now, I’m stuck at getting the .onnx model onto codin game for inference.
Please search “neural network” in this thread. There is some discussion already.
I can’t get my pod to stop drifting in the first level. wood league here.
I’m Bronze and I’m still figuring things out but I found that this works fine:
System.out.println(nextCheckpointX + " " + nextCheckpointY + " BOOST");
Is there any way to read the output stream ( game information + Action + debug) inside the code ?
Can I ask you how are you reading the Console ?
Hi all, I’m wondering about the 100ms per turn… I’m using System.nanoTime() (from Java) to measure the duration I’m spending on each turn, and I’m getting durations between 4 and 40 milliseconds (converted from nanoseconds), but the onscreen info listed under “Timeout” is showing 97 to 100 all the time, and occasionally I get timed out and lose the match.
Is there some more realistic version of how the timing works? Is there any kind of trigger I could use, so that I have a default action that gets used instead of timing me out? I was planning to set some kind of timer for 90ms, and make sure to return a move by then, but it doesn’t seem as reliable as that…
You’d start your timer after reading first input from the game each turn. Time limit in mad pod racing is 75ms. Still, you shouldn’t timeout
I started with a fresh racer (blank code), and used a timer to make sure I got my current best move emitted before timing out, so now I can just use all of the remaining turn time to compute better moves. I was actually able to bump my timer to 105ms without getting timeouts. For a sense of how much work I was able to accomplish with that turn time, I was able to increment a long in a while loop about 18B times over 100 turns (of about 105ms each).
I was confused about that GUI thing that says “Timeout”, it’s counting down turns until the race ends due to not hitting the next checkpoint within 100 turns.
Can you copy and paste the full error message here, and also the replay link?
I am no getting what’s going on here, it says win race. After getting rank first but still I am not able to go to next level. Please let me know what I should do
You have to submit your code, then get your score up by winning more than losing to other bots. When you beat the score of the boss in your league, you move to a higher league.
@5DN1L, if you were asking me, this is the error I was previously getting:
Timeout: the program did not provide 1 input lines in due time... ben_at_codingame will no longer be active in this game.
This is a replay link (which doesn’t produce that error), but it doesn’t look like you get to see the debugging output that shows the timing of the turns: Coding Games and Programming Challenges to Code Better
Is that the only error message?
Are you able to use the inputs of the final turn to debug your code offline? For example, check if the code is stuck in infinite loops without outputting anything?
I am getting option to submit code.
Sorry, I don’t get what you’re trying to say?
If you submit your code, you’ll see many battles being run between your bot and other bots. And if you click LEADERBOARD, you’ll see how your score moves, the progress of the battles, and your rank. You need to get to the top above the boss in order to be promoted.
I use another variable like x1, y1 for previous x and y, and i make it ‘previous’ by doing this: these two variables need to store current x and y location in the current loop, so it will become previous x and y location in next loop. To achieve that, i put this code at the bottom of the while loop:
x1 = x
y1 = y
It appears to me that the turn time limit applies to the sum of my racer’s thinking time and the Boss’s thinking time… is that correct?
So the amount of time I have to make a decision is not actually a fixed number of milliseconds? (Though it might be guessable by observing how long the Boss is taking to think – but the penalty for guessing wrong is losing the match.)
Is this correct, or does anyone know more about how the timing actually works?
Start your timer after reading the first line of input. The server will send your input, start it’s timer and then either read a reply within the timelimit or time you out. If you start timing before reading input you’ll include all the server processing times (which include the other players / boss).
Let’s call the time between a line of input becoming available to my racer, and when I output my action line, let’s call that my “turn time”.
I thought that I would only timeout if I used more than 75ms for my “turn time”, but that doesn’t seem to be correct. According to the measurements I have in the debug output, I can hit the turn time I set up very close, usually within 1ms. Today, I get timeouts if I go above 60ms per turn.
What I want to know is, what should I be setting my turn time to, in order to maximize the amount of computation I can do each turn? Should I actually be getting the 75ms that the rules say? (Is this some kind of bug?)