How to use the rlbot.utils.game_state_util.GameInfoState function in rlbot

To help you get started, we’ve selected a few rlbot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SaltieRL / Saltie / agents / self_evolving_car / train.py View on Github external
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)
github Darxeal / BotimusPrime / tools / state_setting.py View on Github external
def begin(self):
        self.car = CarState(Physics(Vector3(), Rotator(), Vector3(), Vector3()))
        self.opponent = CarState(Physics(Vector3(), Rotator(), Vector3(), Vector3()))
        self.ball = BallState(Physics(Vector3()))
        self.gameinfo = GameInfoState()
        self._changed = False
github SaltieRL / Saltie / agents / self_evolving_car / self_evolving_car_agent.py View on Github external
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)