That sounds very logical(I haven’t thought it this way), thanks, I’ll definitely give it a try.
Mmm… I should have made my purpose clearer. I wanted to highlight that your eval was not taking into account the number of steps needed to reach the end of the race.
Hello, can you please give me some general logic on handling collisions of enemy and my pod.
I have tried some solutions, but they drastically make my pod “dizzy”, it starts moving almost randomly.
Thanks in advance
I keep getting a bug where after I play my code a couple of times, then afterwards the “video” part of the race stops working. As in, I can see the code working normally, but there is no movement on the screen, the race doesn’t reflect the actual action, it is just a still image. Only refreshing the page on the browser fixes this, but again only for a couple times. I have the same issue on both Chrome and Firefox that I tried, latest versions.
Hey this may sound really dumb but I am not good with understanding AI stuff in coding so can someone explain or tell me how to do the tutorial? After that I can get it done myself I think but I am just stuck. So someone please help. I use Java or Python 3 either or works I just need the help with the start then I can work it out myself.
Don’t worry about the term ‘AI’… at the heart of it, most AIs are just some fancy if-then statements used in creative ways. Start simple; you have some inputs, a required output format, and an objective. Figure it out in steps. Make your pod move towards the objective as fast as possible. Figure out where that can go wrong and make adjustments. Then make your bot consider the move after your next one. This is where you might start looking into AI algorithms, but you’re already 3 steps into it by then, with a working bot. After that, maybe start taking the opponent into account. And so forth.
Hi i am in wood 2 and my pod is always failing.Here is my code (c++):
int main()
{
int thrust = 100;
// game loop
while (1) {
int x;
int y;
int nextCheckpointX; // x position of the next check point
int nextCheckpointY; // y position of the next check point
int nextCheckpointDist; // distance to the next checkpoint
int nextCheckpointAngle; // angle between your pod orientation and the direction of the next checkpoint
cin >> x >> y >> nextCheckpointX >> nextCheckpointY >> nextCheckpointDist >> nextCheckpointAngle; cin.ignore();
int opponentX;
int opponentY;
cin >> opponentX >> opponentY; cin.ignore();
if ( nextCheckpointDist >= 6000 && (nextCheckpointAngle > 90 || nextCheckpointAngle < -90))
thrust = 0;
else
thrust = 100;
cout << nextCheckpointX << " " << nextCheckpointY << thrust << endl;
}
}
that was it. thanks!
You are missing a white space between nextCheckpointY and thrust
Hi, I’m new, and I have a question.
Does your current speed affect your turn speed? If so, how?
Your ship can turn on its center by ±15 degrees regardless of speed.
However your velocity persists across turns with 15% loss due to friction and your new acceleration is added to this as a vector.
Magus made a good post after this competition, read the whole thing if you want to understand how to make a good bot.
Just made simple overturning after passed checkpoints on the clean bot based on a math vector.
And I am promoted to gold league from bronze with 90%winrate only because of this.
Thanks a lot Potterman !
I wonder what kind of function you used to link thrust and angle.
On my side, I used trigonometrie but I’m not satisfied.
I am having trouble with implementing opponent bot position for my advantage.
please provide me help for this issue.
so…I really dont know why this is happaning -
my code -
System.err.println(" dist = “+nextCheckpointDist+” angle ="+nextCheckpointAngle +" thrust = "+thrust);
System.out.println(nextCheckpointX + " " + nextCheckpointY + " "+thrust);
the output -
### Standard Error Stream: div = 80.0 dist = 1621 angle =144 thrust = 0 ### Standard Output Stream: 12020 5478 100
i dont get why im sending 0 as thrust but it outputs 100
this looks like your output is desynchronized from the input you receive (and the error stream). This happens when you send multiple outputs during one turn.
More info: Coding Games and Programming Challenges to Code Better
thank you very much
Hi @ArkadiYordan : you may effectively write (sometime ?) twice, or maybe forgot reading one (or more) inputs from the stdin Console …
How do you initially declare the thrust variable