Is it a bug of challenge "Become a better developer"?

Please, look to the replay at 405 frame

Seems, this race isn’t finished for my pods, but nextCheckPointId is changed and if you look to stderr you can see it. Enemy is finished ok.

So, could it be fixed? Or need to look a “better” solution?


I can’t see any bug in that replay. Please note that we don’t have access to stderr, if something wrong is there you’ll have to tell us.

This is what I see: your pod 1 goes through checkpoint 0 at frame 225 and it seems like it still has one or more laps to go, so it targets checkpoint 1, but fails to reach it in 100 turns (that is, as 1 turn takes 2 frames, it fails to rach it by frame 425), so your program times out and your opponent wins without having to finish the race.

1 Like

Thank you for a response.
At first, I forgot to say that I was trying to reproduce this “timeout” more than 20+ times on different maps - unsuccessfully. And during this runs I didn’t have timeout value down less than 80 with debug mode.

Ok, I’ll try to explain using a couple of math and python code :slightly_smiling:
I have class Pod with container of all Pods - Pod.allof = {}.
On first initialization of each Pod self.completed is 0.
Each time when nextCheckPointId is changed self.completed is increased, so, here’s the cut:

class Pod:
    allof = {}
    def __init__(self, _id, x, y, vx, vy, angle, nextCheckPointId):
        self.nextCheckPointId = nextCheckPointId;
        if _id in Pod.allof.keys():
            prev = Pod.allof[_id];
            if self.nextCheckPointId != prev.nextCheckPointId:
                self.completed = prev.completed+1;
                self.completed = prev.completed;
            self.completed = 0;
        Pod.allof[_id] = self
while True:
    for i in range(4):
        Checkpoint(i, *[int(j) for j in input().split()])

And when Ai is win in that replay it have 8 finished checkpoints at 425 frame, but(!) my pod already have 8 finished checkpoints on 405 frame. As you as can see I receving nextCheckPointId from stdin and I trust to the value from stdin. So, founding on those things I made a conclusion that problem somewhere in core emulator(?). Seems, this problem is on “the edges” of objects collision.
Is explaination detailed?

And question about collision: The maximal distance between centers of Pod and Checkpoint is 999 (Rpod + Rcheckpoint - 1) to say that Pod is on Checkpoint, is it right?

When neither of your pods reaches a checkpoint in 100 turns, AI wins immediatly, without having to complete the race, so it doesn’t need to have more than 8 finished checkpoints.

Each checkpoint has a 600 units radius and the pods have a 400 units one, so having a distance greater than 600 and less than 1000 means that the pod is partially over the checkpoint, with its center on the outside. As you can see at frame 55 and 57, that is not enough. That’s why at the end your pod 1 skirts checkpoint 1 three times but still times out.

Oh, I see now. I thought that 100 ms response limited there but not turns :slightly_smiling: Well, the question is closed then, thanks a lot!