Why am i unable to use arrays in c++?
TYPO: In the description, one of the bullet points saysâŠ
- The thrust value of a pod is itâs acceleration and must be between 0 and 100.
It should say its acceleration (without the apostrophe).
Someone can explain me how the nextCheckpointAngle is calculated?
Look up a trig function called ATan2. Depending on your language of choice, it might be a built-in function.
Is nextCheckpointAngle the arctangent between my pod direction and checkpoint direction?
Hello,
Jâadore ce challenge il nâest pas trop compliquĂ© mais je nâai toujours pas trouvĂ© quelle est la formule pour prevoir la position du pod aprĂšs un coup.
Si jâai en entrĂ©e la position du pod X,Y, un angle A et une vitesse V et que ma sortie est : TX,TY Thrust quelle est ma position finale?
Quelquâun connait la formule svp?
Can you tell me how can I train my neural network? I donât know how to train it because i donât have a game on my computer?
No hint? What does the thrust mean?and the NextCheckpointangle?
Hi SE. I notice youâre programming in C++. Do all languages get access to the same libraries? (at the higher levels). Or do some languages (eg Python, C++, Java) get better libraries?
How can I use boost?
I did as I was toldâ
thrust = BOOST;
Output the word BOOST where you would ordinarily output the numeric thrust value.
Pod angle input is incorrect the first turns.
I always get -1
:
3427 6718 0 0 -1 1
Obviously, my pod thinks itâs turned the wrong way, and doesnât accelerate until I start getting correct data at turn 4.
You can turn as far as you want on the first turn, so the initial input angle doesnât matter.
Still, the value is incorrect.
My bot doesnât know what turn it is, and trusts the input to be correct every turn. Of course I could work around this but it doesnât seem rightâŠ
There isnât a value that would be correct - the pod doesnât actually have an angle at that point. The angles are always 0-359 on later turns, so you probably should handle -1 as a special case.
I see, it makes sense that initial angle is decided after my first output.
What confused me was the input showed -1 while the graphical representation showed a rotated pod.
I realize now that my output is handled before the graphics are drawn. Thanks!
It worked! thank you!!
I think the solution for that you need to optimize your program and, try to inspect things as well.
Debug mode currently does not show the shield effect. It be nice if this can be patched in as I am doing all my programming/testing with debug mode enabled.
Would it also be possible to change the colors? I got issues with read an can not see the red line of the enemy in debug mode.
Love the game, really a lot of fun!
Can someone tell me what the difference between the circle outline is in debug mode, and my graphical race pod?
The position I get through the input stream the one of the outline, but the game visualizes and shows another position, possible future position.
Which one is used to do collision on?
Hi, Iâm stuck on the use of BOOST, it puts me " invalid input. Expected âx y powerâ but found â5497 7525 1431652838 9710â ".
I donât know how to do it if you could help me.
> #include <stdlib.h>
> #include <stdio.h>
> #include <string.h>
> #include <stdbool.h>
> /**
> * Auto-generated code below aims at helping you parse
> * the standard input according to the problem statement.
> **/
> int main()
> {
> // 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
> scanf("%d%d%d%d%d%d", &x, &y, &nextCheckpointX, &nextCheckpointY, &nextCheckpointDist, &nextCheckpointAngle);
> int opponentX;
> int opponentY;
> scanf("%d%d", &opponentX, &opponentY);
> int vit;
> bool boost = true ;
> // Write an action using printf(). DON'T FORGET THE TRAILING \n
> // To debug: fprintf(stderr, "Debug messages...\n");
>
> if((boost == true) && (nextCheckpointAngle == 0) && (nextCheckpointDist > 6000 ))
> {
> vit = "BOOST";
> boost = false;
> }
> else if(nextCheckpointAngle>90 || nextCheckpointAngle<-90)
> {
> vit=0;
> }
> else
> {
> vit=100;
> }
>
> // You have to output the target position
> // followed by the power (0 <= thrust <= 100)
> // i.e.: "x y thrust"
> printf("%d %d %d %d\n", nextCheckpointX, nextCheckpointY,vit,nextCheckpointDist);
> }
> return 0;
> }