def initialize_agent(self): self.info: GameInfo = GameInfo(self.index, self.team) self.controls: SimpleControllerState = SimpleControllerState() self.maneuver: Maneuver = None self.info.set_mode("soccar") self.time = 0 self.prev_time = 0 self.last_touch_time = 0 self.reset_time = 0 self.ticks = 0 self.draw: DrawingTool = DrawingTool(self.renderer) self.strategy = SoccarStrategy(self.info, self.draw) # variables related to quick chats self.chat = QuickChatTool(self) self.last_ball_vel = 0 self.said_gg = False self.last_time_said_all_yours = 0 self.num_of_our_goals_reacted_to = 0 self.num_of_their_goals_reacted_to = 0 self.matchcomms_message = ""
def initialize_hive(self, packet: GameTickPacket) -> None: index = next(iter(self.drone_indices)) self.team = packet.game_cars[index].team self.info = GameInfo(self.team) self.info.set_mode("soccar") self.strategy = HivemindStrategy(self.info, self.logger) self.draw = DrawingTool(self.renderer, self.team) self.drones = [Drone(self.info.cars[i], i) for i in self.drone_indices] self.logger.handlers[0].setLevel( logging.NOTSET) # override handler level self.logger.setLevel(logging.INFO if RELEASE else logging.DEBUG) self.logger.info("Beehive initialized")
def initialize_agent(self): self.info = GameInfo(self.team) self.info.set_mode("soccar") self.draw = DrawingTool(self.renderer, self.team)