The Goal

Finish the race within 600 turns.

  Rules

You are controlling a car racing through a series of checkpoints. Each checkpoint is located on position indicated with x and y. Which checkpoint to target is given by checkpointId pointing to a value in the checkpoints given as initial input.

Checkpoints are repeated when given as inputs. (in difference to CSB)
The game is played on a map 16000 units wide and 9000 units high. The coordinate X=0, Y=0 is the top left pixel.

The checkpoints work as follows:
  • The checkpoints are circular, with a radius of 600 units.
  • The disposition of the checkpoints is selected randomly for each race.


You lose if:
  • You use more than 600 rounds.
  • You do not supply a valid sequence of actions.
You Win if:
  • You visit all checkpoints as given by inputs before the time is out!

The car work as follows:
  • Every turn it takes a new command given a position and a THRUST indicating where to drive.
  • It will at max turn 18 degrees from where the current heading are.
  • After a new thrust it given the car will drive for 1 turn checking for collisions with the next checkpoint along the way.
  • Center of a car needs to be inside a checkpoint to visit it.

  Expert Rules

On each turn the car movement are computed this way:
  • The car rotates to face the target point, with a maximum of 18 degrees..
  • The CAR's facing vector is multiplied by the given thrust value. The result is added to the current speed vector.
  • The speed vector is added to the position of the car.
  • The current speed vector is multiplied by 0.85
  • The speed's values are truncated, angles converted to degrees and rounded and the position's values are rounded to the nearest integer.


If you're going to run local simulations, you'll need to look at the referee.

  Game Input

The program must first read the initialization data from standard input. Then, provide to the standard output one line with X Y THRUST
Initialization input
First line: an integer checkpoints, the amount of all checkpoints to pass. (all checkpoints repeated 3 times for convenience) Next checkpoints lines: one line per checkpoint.

Each checkpoint is represented by 2 integers: x, y.
Input for one game turn
One line of 6 integers: checkpointId, x, y, vx, vy and angle.
checkpointId indicates the number of the next checkpoint as given in inputs. x, y for the entity's position.
vx, vy for the entity's speed vector.
angle. Heading angle in degrees between 0 and 360 for the Car.
Output for one game turn
One line for your car: three integers X, Y and thrust
You may append the output with a message which we be displayed above the car.

Optional debugging information
If the message is debug once, the game summary will contain additional information throughout the game. The referee will provide a double with the collision time occuring the previous round (or > 1.0 if no collision occured)
Alternative output format
For convenience purposes, you may also output your actions in the following format: EXPERT rotationAngle thrust message.
Constraints
3 <= checkpoints <= 8 0 <= thrust <= 200 -18 <= angle <= 18
Response time for the first turn ≤ 1000 ms
Response time per turn ≤ 50 ms