Beispiel #1
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     return GameState(
         ball=BallState(physics=Physics(location=Vector3(0, 4400, 100),
                                        velocity=Vector3(0, 0, 0),
                                        angular_velocity=Vector3(0, 0, 0))),
         cars={
             0:
             CarState(physics=Physics(location=Vector3(
                 900 * rng.n11(), 3000, 0),
                                      rotation=Rotator(0, pi / 2, 0),
                                      velocity=Vector3(0, 0, 0),
                                      angular_velocity=Vector3(0, 0, 0)),
                      jumped=False,
                      double_jumped=False,
                      boost_amount=0)
         },
     )
Beispiel #2
0
    def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
        m = 1
        f = rng.choice([-1, 1])

        car_physics = Physics(velocity=Vector3(0, 0, 0),
                              rotation=Rotator(0, (45 + m * 90) / 180 * math.pi, 0),
                              angular_velocity=Vector3(0, 0, 0),
                              location=Vector3(f * m * 2048, m * -2560, 17.148628))

        ball_physics = Physics(location=Vector3(0, 0, 92.739998),
                               velocity=Vector3(0, 0, 0),
                               angular_velocity=Vector3(0, 0, 0))

        car_state = CarState(jumped=False, double_jumped=False, boost_amount=34, physics=car_physics)

        ball_state = BallState(physics=ball_physics)

        return GameState(ball=ball_state, cars={0: car_state})
Beispiel #3
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     self.grader.graders[1].max_duration_seconds = 2
     return GameState(
         game_info=GameInfoState(game_speed=1),
         ball=BallState(physics=Physics(
             location=Vector3(rng.uniform(-100, 100), -500, 800),
             velocity=Vector3(rng.uniform(-100, 100), -1500, 900),  # 
             angular_velocity=Vector3(0, 0, 0))),
         cars={
             0:
             CarState(physics=Physics(location=Vector3(
                 rng.uniform(-300, 300), -3000, 17),
                                      rotation=Rotator(0, pi * -0.5, 0),
                                      velocity=Vector3(0, -1500, 0),
                                      angular_velocity=Vector3(0, 0, 0)),
                      boost_amount=60)
         },
     )
Beispiel #4
0
    def set_gamestate_angled_stationary(self):
        # put the car in the middle of the field
        car_state = CarState(
            physics=Physics(location=Vector3(-1000, -1500, 18),
                            velocity=Vector3(0, 0, 0),
                            rotation=Rotator(0, math.pi / 8, 0),
                            angular_velocity=Vector3(0, 0, 0)))

        # put the ball in the middle of the field

        ball_state = BallState(
            physics=Physics(location=Vector3(0, 0, 750),
                            velocity=Vector3(0, 0, 1),
                            rotation=Rotator(0, 0, 0),
                            angular_velocity=Vector3(0, 0, 0)))

        self.set_game_state(
            GameState(ball=ball_state, cars={self.game.id: car_state}))
Beispiel #5
0
    def set_state_1(self):
        car_state = CarState(physics=Physics(
            location=Vector3(0, -2000, 18),
            velocity=Vector3(0, 500, 0),
            rotation=Rotator(0, math.pi / 2, 0),
            angular_velocity=Vector3(0, 0, 0),
        ),
                             boost_amount=100)

        # put the ball in the middle of the field
        ball_state = BallState(physics=Physics(
            location=Vector3(0, 0, 400),
            velocity=Vector3(0, 0, 450),
            angular_velocity=Vector3(0, 0, 0),
        ))

        self.set_game_state(
            GameState(ball=ball_state, cars={self.game.id: car_state}))
Beispiel #6
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     return GameState(
         ball=BallState(physics=Physics(location=Vector3(
             self.ball_x, self.ball_y, self.ball_z),
                                        velocity=Vector3(0, 0, 0),
                                        angular_velocity=Vector3(0, 0, 0))),
         cars={
             0:
             CarState(physics=Physics(location=Vector3(
                 self.car_x, self.car_y, 17),
                                      rotation=Rotator(0, self.car_spin, 0),
                                      velocity=Vector3(0, 0, 0),
                                      angular_velocity=Vector3(0, 0, 0)),
                      jumped=False,
                      double_jumped=False,
                      boost_amount=100)
         },
     )
Beispiel #7
0
    def setCarState(self):
        game_state = GameState()
        self.set_game_state(game_state)
        car_state = CarState(boost_amount=100,
                             physics=Physics(location=Vector3(x=-1800,
                                                              y=0,
                                                              z=550),
                                             velocity=Vector3(x=0, y=0, z=0),
                                             rotation=Rotator(
                                                 math.pi / 2, 0, 0),
                                             angular_velocity=Vector3(0, 0,
                                                                      0)))

        ball_state = BallState(
            Physics(location=Vector3(1000, 0, 800),
                    velocity=Vector3(x=0, y=0, z=0)))
        game_state = GameState(ball=ball_state, cars={self.index: car_state})
        self.set_game_state(game_state)
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     return GameState(
         ball=BallState(physics=Physics(location=Vector3(0, 0, 100),
                                        velocity=Vector3(0, 0, 0),
                                        angular_velocity=Vector3(0, 0, 0))),
         cars={
             0:
             CarState(physics=Physics(location=Vector3(0, 2000, 0),
                                      rotation=Rotator(0, -pi / 2, 0),
                                      velocity=Vector3(0, 0, 0),
                                      angular_velocity=Vector3(0, 0, 0)),
                      jumped=False,
                      double_jumped=False,
                      boost_amount=100)
         },
         boosts={i: BoostState(0)
                 for i in range(34)},
     )
Beispiel #9
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     return GameState(
         ball=BallState(physics=Physics(
             location=Vector3(self.ball_x, self.ball_y, self.ball_z),
             velocity=Vector3(self.ball_vx, self.ball_vy, self.ball_vz),
             angular_velocity=Vector3(self.ball_sx, self.ball_sy,
                                      self.ball_sz))),
         cars={
             0:
             CarState(physics=Physics(
                 location=Vector3(self.car_x, self.car_y, self.car_z),
                 rotation=Rotator(self.car_pitch, self.car_spin,
                                  self.car_roll),
                 velocity=Vector3(self.car_vx, self.car_vy, self.car_vz),
                 angular_velocity=Vector3(0.01, 0, 0)),
                      boost_amount=self.boost)
         },
     )
Beispiel #10
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     return GameState(
         ball=BallState(physics=Physics(
             # location=Vector3(1000 * rng.n11(), rng.uniform(0, 1500), 100),
             location=Vector3(rng.uniform(-1000, 1000),
                              rng.uniform(-1000, 1000), 100),
             velocity=Vector3(rng.uniform(-1000, 1000),
                              rng.uniform(-1000, 1000), 1000),
             angular_velocity=Vector3(0, 0, 0))),
         cars={
             0:
             CarState(physics=Physics(location=Vector3(0, -2500, 18),
                                      rotation=Rotator(0, pi / 2, 0),
                                      velocity=Vector3(0, 0, 0),
                                      angular_velocity=Vector3(0, 0, 0)),
                      boost_amount=87),
         },
     )
Beispiel #11
0
    def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
        rng = random
        car_physics = Physics()
        car_physics.rotation = Rotator(math.sinh(rng.uniform(-1, 1)),
                                       rng.uniform(-math.pi, math.pi),
                                       rng.uniform(-math.pi, math.pi))
        car_physics.location = Vector3(0, 0, 800)

        velocity = (rng.normalvariate(0, 1) for _ in range(3))
        norm = sum(x**2 for x in velocity)**0.5
        car_physics.angular_velocity = Vector3(*(x / norm * 5.5
                                                 for x in velocity))

        ball_state = BallState(physics=Physics(velocity=Vector3(0, 0, 20),
                                               location=Vector3(500, 0, 800)))

        return GameState(cars={0: CarState(physics=car_physics)},
                         ball=ball_state)
Beispiel #12
0
 def hide_ball(self, packet, drones, start_time) -> StepResult:
     """
     Places the ball above the roof of the arena to keep it out of the way.
     """
     self.game_interface.set_game_state(GameState(ball=BallState(physics=Physics(
         location=Vector3(0, 0, 3000),
         velocity=Vector3(0, 0, 0),
         angular_velocity=Vector3(0, 0, 0)))))
     return StepResult(finished=True)
Beispiel #13
0
    def do_logic(self, packet: GameTickPacket):
        if packet.game_info.is_kickoff_pause:  # TODO: and not isinstance(self.scheduler.current_action, Kickoff)
            self.scheduler.clear()
            # self.scheduler.push(Kickoff()) # TODO: create kickoff action :keggw:

        # if self.scheduler.is_empty():
        #     valid = False
        #     x = 0
        #     y = 0
        #     while not valid:
        #         x = randint(-4096, 4096)
        #         y = randint(-5120, 5120)
        #         max_x = 4096 - 1152
        #         max_y = 5120 - 1152
        #         valid = abs(x) < max_x and abs(y) < max_y
        #     tmp_target = Vec3(x, y, 0)
        #     target = CarDriveTarget(tmp_target, self.field.FLOOR[0])
        #     self.scheduler.push(GroundDriveTowardsFixedAnyState(self.scheduler, self.field,
        #                                                         self.my_car, target))

        if self.scheduler.is_empty():
            t_1 = packet.game_ball.physics.location
            target: CarDriveTarget = CarDriveTarget(Vec3(300, 300, 300),
                                                    self.field.FLOOR[0])
            # print(target.loc)
            # self.scheduler.push(CarDrive(self.scheduler, self.field, self.my_car, target, is_filler=True))
            time.sleep(3)
            ball_state = BallState(physics=Physics(
                location=Vector3(0, 0, 1000)))
            rr = Vec3(rand(), rand(), rand()) * math.pi
            rav = Vec3(rand(), rand(), rand()).normalized() * rand() * 5.5
            # angular_velocity=Vector3(rav.x, rav.y, rav.z),
            car_state = CarState(
                physics=Physics(location=Vector3(0, -500, 1000),
                                rotation=Rotator(rr.x, rr.y, rr.z)))

            game_state = GameState(ball=ball_state,
                                   cars={self.index: car_state})

            self.set_game_state(game_state)
            rotation = Rotator(0, np.pi / 2, 0)
            self.scheduler.push(
                AerialTest(self.scheduler, self.field, self.my_car,
                           Orientation(rotation)))
Beispiel #14
0
 def setup_newround(self, packet):
     car_states = {}
     yaw, yaw_mir = self.yaw_randomizor()
     for p in range(packet.num_cars):
         car = packet.game_cars[p]
         if car.team == 0:
             car_state = CarState(boost_amount=100,
                                  physics=Physics(
                                      location=Vector3(0, -1000, 17),
                                      rotation=Rotator(yaw=yaw,
                                                       pitch=0,
                                                       roll=0),
                                      velocity=Vector3(0, 0, 0),
                                      angular_velocity=Vector3(0, 0, 0)))
             car_states[p] = car_state
         elif car.team == 1:
             car_state = CarState(boost_amount=100,
                                  physics=Physics(
                                      location=Vector3(0, 1000, 17),
                                      rotation=Rotator(yaw=yaw_mir,
                                                       pitch=0,
                                                       roll=0),
                                      velocity=Vector3(0, 0, 0),
                                      angular_velocity=Vector3(0, 0, 0)))
             car_states[p] = car_state
     if self.horz_ball_var == 'Off':
         ball_vel_x = ball_vel_y = 0
     elif self.horz_ball_var == 'On':
         ball_vel_x = (np.random.random() * 2 - 1) * 500
         ball_vel_y = (np.random.random() * 2 - 1) * 300
     if self.vert_ball_var == 'Off':
         ball_vel_z = -1
         ball_pos_z = 93
     elif self.vert_ball_var == 'On':
         ball_vel_z = np.random.random() * 360 - 460
         ball_pos_z = np.random.random() * 200 + 500
     self.paused_car_states = car_states
     ball_state = BallState(
         Physics(location=Vector3(0, 0, ball_pos_z),
                 velocity=Vector3(ball_vel_x, ball_vel_y, ball_vel_z)))
     self.game_state = GameState(ball=ball_state, cars=car_states)
     self.set_game_state(self.game_state)
     self.prev_time = self.cur_time
     self.game_phase = -1
Beispiel #15
0
 def reset(self):
     #RESET TRAINING ATTRIBUTES AFTER EACH GENOME
     ball_state = BallState(
         Physics(velocity=Vector3(0, 0, 0),
                 location=Vector3(self.pos, 5000, 3000),
                 angular_velocity=Vector3(0, 0, 0)))
     car_state = CarState(jumped=False,
                          double_jumped=False,
                          boost_amount=33,
                          physics=Physics(velocity=Vector3(0, 0, 0),
                                          rotation=Rotator(45, 90, 0),
                                          location=Vector3(0.0, -4608, 500),
                                          angular_velocity=Vector3(0, 0,
                                                                   0)))
     game_info_state = GameInfoState(game_speed=1)
     game_state = GameState(ball=ball_state,
                            cars={self.index: car_state},
                            game_info=game_info_state)
     self.set_game_state(game_state)
Beispiel #16
0
    def reset(self, training_name=None):
        """ Resets the training without changing any of the random values. """
        if (not training_name):
            training_name = self.training_name

        car_state = CarState(physics=Physics(velocity=self.car_vel,
                                             rotation=self.car_rot,
                                             location=self.car_loc),
                             boost_amount=self.car_boost)

        ball_state = BallState(
            Physics(velocity=self.ball_vel,
                    location=self.ball_loc,
                    angular_velocity=self.ball_av))

        self.game_state = GameState(ball=ball_state,
                                    cars={self.car.index: car_state})

        self.car.set_game_state(self.game_state)
Beispiel #17
0
def parse_ball(ball: Json) -> BallState:
    return BallState(physics=Physics(
        location=Vector3(
            x=ball['StartLocationX'],
            y=ball['StartLocationY'],
            z=ball['StartLocationZ'],
        ),
        velocity=parse_ball_vel(ball),
        angular_velocity=Vector3(0, 0, 0),
    ))
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     car_pos = Vector3(0, 2500, 25)
     ball_pos = Vector3(0, 2000, 100)
     ball_state = BallState(
         Physics(location=ball_pos, velocity=Vector3(0, -1300, 0)))
     car_state = CarState(boost_amount=0,
                          jumped=True,
                          double_jumped=True,
                          physics=Physics(location=car_pos,
                                          velocity=Vector3(0, -1000, 0),
                                          rotation=Rotator(0, -pi / 2, 0)))
     enemy_car = CarState(physics=Physics(
         location=Vector3(10000, 10000, 10000)))
     game_state = GameState(ball=ball_state,
                            cars={
                                0: car_state,
                                1: enemy_car
                            })
     return game_state
Beispiel #19
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     return GameState(
         ball=BallState(physics=Physics(
             location=Vector3(self.ball_start_x + rng.uniform(-30, 30), self.ball_start_y, self.ball_start_z),
             velocity=Vector3(0, 0, 0),
             angular_velocity=Vector3(0, 0, 0))),
         cars={
             0: CarState(
                 physics=Physics(
                     location=Vector3(self.car_start_x, self.car_start_y, 0),
                     rotation=Rotator(0, self.car_angle, 0),
                     velocity=Vector3(0, 0, 0),
                     angular_velocity=Vector3(0, 0, 0)),
                 jumped=False,
                 double_jumped=False,
                 boost_amount=100)
         },
         boosts={1: BoostState(100)},
     )
Beispiel #20
0
 def reset(self):
     """Resets game data after each genome"""
     ball_state = BallState(
         Physics(velocity=Vector3(0, 0, 0),
                 location=Vector3(self.pos, 5000, 3000),
                 angular_velocity=Vector3(0, 0, 0)))
     car_state = CarState(jumped=False,
                          double_jumped=False,
                          boost_amount=33,
                          physics=Physics(velocity=Vector3(0, 0, 0),
                                          rotation=Rotator(45, 90, 0),
                                          location=Vector3(0.0, -4608, 500),
                                          angular_velocity=Vector3(0, 0,
                                                                   0)))
     game_info_state = GameInfoState(game_speed=1)
     game_state = GameState(ball=ball_state,
                            cars={self.index: car_state},
                            game_info=game_info_state)
     self.set_game_state(game_state)
Beispiel #21
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     car_pos = Vector3(3500 * rng.n11(), rng.uniform(0, -4000), 25)
     ball_pos = Vector3(car_pos.x, car_pos.y + 500, 500)
     return GameState(
         ball=BallState(physics=Physics(location=ball_pos,
                                        velocity=Vector3(0, 0, 500),
                                        angular_velocity=Vector3(0, 0, 0))),
         cars={
             0:
             CarState(physics=Physics(location=car_pos,
                                      rotation=Rotator(0, pi / 2, 0),
                                      velocity=Vector3(0, 0, 0),
                                      angular_velocity=Vector3(0, 0, 0)),
                      boost_amount=87),
             1:
             CarState(physics=Physics(
                 location=Vector3(10000, 10000, 10000)))
         },
     )
Beispiel #22
0
    def set_gamestate_straight_moving(self):
        # put the car in the middle of the field
        car_state = CarState(
            physics=Physics(location=Vector3(0, -1000, 18),
                            velocity=Vector3(0, 0, 0),
                            rotation=Rotator(0, math.pi / 2, 0),
                            angular_velocity=Vector3(0, 0, 0)))

        # put the ball in the middle of the field

        ball_state = BallState(
            physics=Physics(location=Vector3(0, 1500, 93),
                            velocity=Vector3(0, random.randint(-250, 800),
                                             random.randint(700, 800)),
                            rotation=Rotator(0, 0, 0),
                            angular_velocity=Vector3(0, 0, 0)))

        self.set_game_state(
            GameState(ball=ball_state, cars={self.game.id: car_state}))
    def test_process(self, game_tick_packet: GameTickPacket):

        self.car_physics = Physics(velocity=Vector3(0, 0, 10))
        self.ball_state = BallState(physics=Physics(
            velocity=Vector3(0, 0, 10), location=Vector3(0, 0, 800)))

        chrono = self.info.time - self.initialization_time
        if chrono > self.timeout or self.mechanic.finished and chrono > 0.04:

            log_message = "Finished" if self.mechanic.finished else "Timed out"
            log_message = log_message + ". Took " + str(chrono) + " Seconds."
            self.logger.info(self.mechanic.__class__.__name__ + ": " +
                             log_message)

            self.initialize_agent()

        self.set_game_state(
            GameState(cars={self.index: CarState(physics=self.car_physics)},
                      ball=self.ball_state))
Beispiel #24
0
    def set_gamestate_straight_moving_towards(self):
        # put the car in the middle of the field
        car_state = CarState(physics=Physics(
            location=Vector3(0, 0, 18),
            velocity=Vector3(0, 0, 0),
            angular_velocity=Vector3(0, 0, 0),
        ))

        # put the ball in the middle of the field

        ball_state = BallState(physics=Physics(
            location=Vector3(0, 2500, 93),
            velocity=Vector3(0, -250, 700),
            rotation=Rotator(0, 0, 0),
            angular_velocity=Vector3(0, 0, 0),
        ))

        self.set_game_state(
            GameState(ball=ball_state, cars={self.game.id: car_state}))
Beispiel #25
0
 def __init__(self):
     #define all different car states here
     self.carStateBasic = CarState(boost_amount=100,
                                   physics=Physics(
                                       location=Vector3(0, 0, 17.01),
                                       velocity=Vector3(0, 0, 0),
                                       rotation=Rotator(pitch=0,
                                                        yaw=0,
                                                        roll=0),
                                       angular_velocity=Vector3(0, 0, 0)))
Beispiel #26
0
    def get_output(self, packet: GameTickPacket):
        current_time = packet.game_info.seconds_elapsed % (
            self.delay + self.recording[-1][0])

        # State-set and wait.
        if current_time < self.delay:
            if current_time < self.delay / 10:
                car_state = CarState(
                    boost_amount=100,
                    physics=Physics(
                        location=Vector3(0, -4500, 18),
                        velocity=Vector3(0, 0, -100),
                        rotation=Rotator(0, math.pi / 2, 0),
                        angular_velocity=Vector3(0, 0, 0),
                    ),
                )
                ball_state = BallState(
                    Physics(
                        location=Vector3(0, 4500, 92.75),
                        velocity=Vector3(0, 0, 0),
                        angular_velocity=Vector3(0, 0, 0),
                    ))
                game_state = GameState(ball=ball_state,
                                       cars={self.index: car_state})
                self.set_game_state(game_state)
            return self.convert_output_to_v4([0] * 8)

        current_time -= self.delay

        # Render.
        self.renderer.begin_rendering()
        self.renderer.draw_string_2d(
            20,
            20,
            4,
            4,
            str(round(current_time, 3)),
            self.renderer.white(),
        )
        self.renderer.end_rendering()

        # Controls.
        return self.find_controls(current_time)
Beispiel #27
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     return GameState(ball=BallState(physics=Physics(
         location=as_cls(Vector3,
                         parse_item(rng, self.ball.get("location", V0))),
         velocity=as_cls(Vector3,
                         parse_item(rng, self.ball.get("velocity", V0))),
         angular_velocity=as_cls(
             Vector3, parse_item(rng, self.ball.get("angular_velocity",
                                                    V0))),
         rotation=as_cls(Rotator,
                         parse_item(rng, self.ball.get("rotation", R0))),
     )),
                      cars={
                          i: CarState(physics=Physics(
                              location=as_cls(
                                  Vector3,
                                  parse_item(rng, car.get("location", V0))),
                              velocity=as_cls(
                                  Vector3,
                                  parse_item(rng, car.get("velocity", V0))),
                              angular_velocity=as_cls(
                                  Vector3,
                                  parse_item(
                                      rng, car.get("angular_velocity",
                                                   V0))),
                              rotation=as_cls(
                                  Rotator,
                                  parse_item(rng, car.get("rotation", R0))),
                          ),
                                      jumped=parse_item(
                                          rng, car.get("jumped", False)),
                                      double_jumped=parse_item(
                                          rng,
                                          car.get("double_jumped", False)),
                                      boost_amount=parse_item(
                                          rng, car.get("boost_amount", 0)))
                          for i, car in enumerate(self.cars)
                      },
                      boosts={
                          i: BoostState(parse_item(rng, v))
                          for i, v in enumerate(self.boosts)
                      })
Beispiel #28
0
 def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
     return GameState(
         ball=BallState(physics=Physics(
             location=Vector3(self.ball_x, self.ball_y, self.ball_z),
             velocity=Vector3(self.ball_vx, self.ball_vy, self.ball_vz),
             angular_velocity=Vector3(self.ball_sx, self.ball_sy,
                                      self.ball_sz))),
         cars={
             0:
             CarState(physics=Physics(
                 location=Vector3(self.car_x, self.car_y, self.car_z),
                 rotation=Rotator(self.car_pitch, self.car_spin,
                                  self.car_roll),
                 velocity=Vector3(0, 0, 0),
                 angular_velocity=Vector3(0, 0, 0)),
                      boost_amount=100)
         },
         boosts={i: BoostState(0)
                 for i in range(34)},  # Is this needed.
     )
    def initialize_agent(self):

        if not hasattr(self, 'car_physics'):
            self.car_physics = Physics()

        self.car_physics.rotation = Rotator(
            random.uniform(-math.pi / 2, math.pi / 2),
            random.uniform(-math.pi, math.pi),
            random.uniform(-math.pi, math.pi))
        self.car_physics.location = Vector3(random.uniform(-1000, 1000),
                                            random.uniform(-1000, 1000),
                                            random.uniform(50, 1400))
        self.car_physics.angular_velocity = Vector3(random.uniform(-5, 5),
                                                    random.uniform(-5, 5),
                                                    random.uniform(-5, 5))

        self.ball_state = BallState(physics=Physics(
            velocity=Vector3(0, 0, 20), location=Vector3(0, 0, 800)))

        self.initialization_time = self.info.time
Beispiel #30
0
    def make_game_state(self, rng: SeededRandomNumberGenerator) -> GameState:
        car_state = CarState(
            boost_amount=100,
            physics=Physics(
                location=Vector3(-2000+500*rng.n11(), -4250, 20),
                velocity=Vector3(1400, 0, 0),
                rotation=Rotator(0, 0, 0),
                angular_velocity=Vector3(0, 0, 0)
                )
            )

        ball_state = BallState(
            Physics(
                location=Vector3(-1700, -4000, 100),
                velocity=Vector3(1500+500*rng.n11(), 150+50*rng.n11(), 0)
                )
            )

        game_state = GameState(ball=ball_state, cars={0: car_state})
        return game_state