diff --git a/idl/soccer_service.thrift b/idl/soccer_service.thrift index f4f989e..d57aa95 100644 --- a/idl/soccer_service.thrift +++ b/idl/soccer_service.thrift @@ -1,4 +1,4 @@ -// version 1 +// version 1.6 namespace cpp soccer namespace py soccer @@ -105,6 +105,16 @@ enum CardType { RED = 2 } +struct PenaltyKickState { + 1: Side on_field_side, + 2: Side current_taker_side, + 3: i32 our_taker_counter, + 4: i32 their_taker_counter, + 5: i32 our_score, + 6: i32 their_score, + 7: bool is_kick_taker +} + struct Player { 1: RpcVector2D position, 2: RpcVector2D seen_position, @@ -177,7 +187,9 @@ struct Self { 36: double kick_rate, 37: double recovery, 38: double stamina_capacity, - 39: CardType card + 39: CardType card, + 40: i32 catch_time, + 41: double effort } enum InterceptActionType { @@ -284,7 +296,14 @@ struct WorldModel { 32: double our_defense_line_x, 33: double their_defense_line_x, 34: double our_defense_player_line_x, - 35: double their_defense_player_line_x + 35: double their_defense_player_line_x, + 36: bool kickable_teammate_existance, + 37: bool kickable_opponent_existance, + 38: PenaltyKickState penalty_kick_state, + 39: i32 see_time, + 40: i32 time_stopped, + 41: i32 set_play_count, + 42: Side game_mode_side } struct State { @@ -765,6 +784,10 @@ struct HeliosPenalty {} struct HeliosCommunicaion {} +struct bhv_doForceKick {} + +struct bhv_doHeardPassRecieve {} + struct PlayerAction { 1: optional Dash dash, 2: optional Turn turn, @@ -829,12 +852,16 @@ struct PlayerAction { 61: optional HeliosBasicMove helios_basic_move, 62: optional HeliosSetPlay helios_set_play, 63: optional HeliosPenalty helios_penalty, - 64: optional HeliosCommunicaion helios_communication + 64: optional HeliosCommunicaion helios_communication, + 65: optional bhv_doForceKick bhv_do_force_kick, + 66: optional bhv_doHeardPassRecieve bhv_do_heard_pass_recieve } struct PlayerActions { 1: list actions, - 2: bool ignore_preprocess + 2: bool ignore_preprocess, + 3: bool ignore_doforcekick, + 4: bool ignore_doHeardPassRecieve } struct ChangePlayerType { @@ -1118,7 +1145,11 @@ struct ServerParam { 219: double their_penalty_area_line_x, 220: double penalty_area_half_width, 221: double penalty_area_length, - 222: double goal_width + 222: double goal_width, + 223: double goal_area_width, + 224: double goal_area_length, + 225: double center_circle_r, + 226: double goal_post_radius } struct PlayerParam { @@ -1258,5 +1289,4 @@ service Game { RegisterResponse Register(1: RegisterRequest request), Empty SendByeCommand(1: RegisterResponse register_response), BestPlannerActionResponse GetBestPlannerAction(1: BestPlannerActionRequest best_planner_action_request) -} - +} \ No newline at end of file diff --git a/server.py b/server.py index 815cc7e..ad756b0 100644 --- a/server.py +++ b/server.py @@ -53,7 +53,7 @@ def GetPlayerActions(self, state: State): simple_shoot=True, simple_dribble=True, cross=True, - server_side_decision=False))) + server_side_decision=True))) actions.append(PlayerAction(helios_shoot=HeliosShoot())) else: actions.append(PlayerAction(helios_basic_move=HeliosBasicMove())) diff --git a/soccer/ttypes.py b/soccer/ttypes.py index acae6be..3608be0 100644 --- a/soccer/ttypes.py +++ b/soccer/ttypes.py @@ -876,6 +876,129 @@ def __ne__(self, other): return not (self == other) +class PenaltyKickState(object): + """ + Attributes: + - on_field_side + - current_taker_side + - our_taker_counter + - their_taker_counter + - our_score + - their_score + - is_kick_taker + + """ + + + def __init__(self, on_field_side=None, current_taker_side=None, our_taker_counter=None, their_taker_counter=None, our_score=None, their_score=None, is_kick_taker=None,): + self.on_field_side = on_field_side + self.current_taker_side = current_taker_side + self.our_taker_counter = our_taker_counter + self.their_taker_counter = their_taker_counter + self.our_score = our_score + self.their_score = their_score + self.is_kick_taker = is_kick_taker + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.on_field_side = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.current_taker_side = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.our_taker_counter = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.their_taker_counter = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.our_score = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.their_score = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.is_kick_taker = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('PenaltyKickState') + if self.on_field_side is not None: + oprot.writeFieldBegin('on_field_side', TType.I32, 1) + oprot.writeI32(self.on_field_side) + oprot.writeFieldEnd() + if self.current_taker_side is not None: + oprot.writeFieldBegin('current_taker_side', TType.I32, 2) + oprot.writeI32(self.current_taker_side) + oprot.writeFieldEnd() + if self.our_taker_counter is not None: + oprot.writeFieldBegin('our_taker_counter', TType.I32, 3) + oprot.writeI32(self.our_taker_counter) + oprot.writeFieldEnd() + if self.their_taker_counter is not None: + oprot.writeFieldBegin('their_taker_counter', TType.I32, 4) + oprot.writeI32(self.their_taker_counter) + oprot.writeFieldEnd() + if self.our_score is not None: + oprot.writeFieldBegin('our_score', TType.I32, 5) + oprot.writeI32(self.our_score) + oprot.writeFieldEnd() + if self.their_score is not None: + oprot.writeFieldBegin('their_score', TType.I32, 6) + oprot.writeI32(self.their_score) + oprot.writeFieldEnd() + if self.is_kick_taker is not None: + oprot.writeFieldBegin('is_kick_taker', TType.BOOL, 7) + oprot.writeBool(self.is_kick_taker) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + class Player(object): """ Attributes: @@ -1299,11 +1422,13 @@ class Self(object): - recovery - stamina_capacity - card + - catch_time + - effort """ - def __init__(self, position=None, seen_position=None, heard_position=None, velocity=None, seen_velocity=None, pos_count=None, seen_pos_count=None, heard_pos_count=None, vel_count=None, seen_vel_count=None, ghost_count=None, id=None, side=None, uniform_number=None, uniform_number_count=None, is_goalie=None, body_direction=None, body_direction_count=None, face_direction=None, face_direction_count=None, point_to_direction=None, point_to_direction_count=None, is_kicking=None, dist_from_ball=None, angle_from_ball=None, ball_reach_steps=None, is_tackling=None, relative_neck_direction=None, stamina=None, is_kickable=None, catch_probability=None, tackle_probability=None, foul_probability=None, view_width=None, type_id=None, kick_rate=None, recovery=None, stamina_capacity=None, card=None,): + def __init__(self, position=None, seen_position=None, heard_position=None, velocity=None, seen_velocity=None, pos_count=None, seen_pos_count=None, heard_pos_count=None, vel_count=None, seen_vel_count=None, ghost_count=None, id=None, side=None, uniform_number=None, uniform_number_count=None, is_goalie=None, body_direction=None, body_direction_count=None, face_direction=None, face_direction_count=None, point_to_direction=None, point_to_direction_count=None, is_kicking=None, dist_from_ball=None, angle_from_ball=None, ball_reach_steps=None, is_tackling=None, relative_neck_direction=None, stamina=None, is_kickable=None, catch_probability=None, tackle_probability=None, foul_probability=None, view_width=None, type_id=None, kick_rate=None, recovery=None, stamina_capacity=None, card=None, catch_time=None, effort=None,): self.position = position self.seen_position = seen_position self.heard_position = heard_position @@ -1343,6 +1468,8 @@ def __init__(self, position=None, seen_position=None, heard_position=None, veloc self.recovery = recovery self.stamina_capacity = stamina_capacity self.card = card + self.catch_time = catch_time + self.effort = effort def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: @@ -1553,6 +1680,16 @@ def read(self, iprot): self.card = iprot.readI32() else: iprot.skip(ftype) + elif fid == 40: + if ftype == TType.I32: + self.catch_time = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 41: + if ftype == TType.DOUBLE: + self.effort = iprot.readDouble() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -1719,6 +1856,14 @@ def write(self, oprot): oprot.writeFieldBegin('card', TType.I32, 39) oprot.writeI32(self.card) oprot.writeFieldEnd() + if self.catch_time is not None: + oprot.writeFieldBegin('catch_time', TType.I32, 40) + oprot.writeI32(self.catch_time) + oprot.writeFieldEnd() + if self.effort is not None: + oprot.writeFieldBegin('effort', TType.DOUBLE, 41) + oprot.writeDouble(self.effort) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2097,11 +2242,18 @@ class WorldModel(object): - their_defense_line_x - our_defense_player_line_x - their_defense_player_line_x + - kickable_teammate_existance + - kickable_opponent_existance + - penalty_kick_state + - see_time + - time_stopped + - set_play_count + - game_mode_side """ - def __init__(self, intercept_table=None, our_team_name=None, their_team_name=None, our_side=None, last_set_play_start_time=None, myself=None, ball=None, teammates=None, opponents=None, unknowns=None, our_players_dict=None, their_players_dict=None, our_goalie_uniform_number=None, their_goalie_uniform_number=None, offside_line_x=None, offside_line_x_count=None, kickable_teammate_id=None, kickable_opponent_id=None, last_kick_side=None, last_kicker_uniform_number=None, cycle=None, game_mode_type=None, left_team_score=None, right_team_score=None, is_our_set_play=None, is_their_set_play=None, stoped_cycle=None, our_team_score=None, their_team_score=None, is_penalty_kick_mode=None, helios_home_positions=None, our_defense_line_x=None, their_defense_line_x=None, our_defense_player_line_x=None, their_defense_player_line_x=None,): + def __init__(self, intercept_table=None, our_team_name=None, their_team_name=None, our_side=None, last_set_play_start_time=None, myself=None, ball=None, teammates=None, opponents=None, unknowns=None, our_players_dict=None, their_players_dict=None, our_goalie_uniform_number=None, their_goalie_uniform_number=None, offside_line_x=None, offside_line_x_count=None, kickable_teammate_id=None, kickable_opponent_id=None, last_kick_side=None, last_kicker_uniform_number=None, cycle=None, game_mode_type=None, left_team_score=None, right_team_score=None, is_our_set_play=None, is_their_set_play=None, stoped_cycle=None, our_team_score=None, their_team_score=None, is_penalty_kick_mode=None, helios_home_positions=None, our_defense_line_x=None, their_defense_line_x=None, our_defense_player_line_x=None, their_defense_player_line_x=None, kickable_teammate_existance=None, kickable_opponent_existance=None, penalty_kick_state=None, see_time=None, time_stopped=None, set_play_count=None, game_mode_side=None,): self.intercept_table = intercept_table self.our_team_name = our_team_name self.their_team_name = their_team_name @@ -2137,6 +2289,13 @@ def __init__(self, intercept_table=None, our_team_name=None, their_team_name=Non self.their_defense_line_x = their_defense_line_x self.our_defense_player_line_x = our_defense_player_line_x self.their_defense_player_line_x = their_defense_player_line_x + self.kickable_teammate_existance = kickable_teammate_existance + self.kickable_opponent_existance = kickable_opponent_existance + self.penalty_kick_state = penalty_kick_state + self.see_time = see_time + self.time_stopped = time_stopped + self.set_play_count = set_play_count + self.game_mode_side = game_mode_side def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: @@ -2364,6 +2523,42 @@ def read(self, iprot): self.their_defense_player_line_x = iprot.readDouble() else: iprot.skip(ftype) + elif fid == 36: + if ftype == TType.BOOL: + self.kickable_teammate_existance = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 37: + if ftype == TType.BOOL: + self.kickable_opponent_existance = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 38: + if ftype == TType.STRUCT: + self.penalty_kick_state = PenaltyKickState() + self.penalty_kick_state.read(iprot) + else: + iprot.skip(ftype) + elif fid == 39: + if ftype == TType.I32: + self.see_time = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 40: + if ftype == TType.I32: + self.time_stopped = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 41: + if ftype == TType.I32: + self.set_play_count = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 42: + if ftype == TType.I32: + self.game_mode_side = iprot.readI32() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2535,6 +2730,34 @@ def write(self, oprot): oprot.writeFieldBegin('their_defense_player_line_x', TType.DOUBLE, 35) oprot.writeDouble(self.their_defense_player_line_x) oprot.writeFieldEnd() + if self.kickable_teammate_existance is not None: + oprot.writeFieldBegin('kickable_teammate_existance', TType.BOOL, 36) + oprot.writeBool(self.kickable_teammate_existance) + oprot.writeFieldEnd() + if self.kickable_opponent_existance is not None: + oprot.writeFieldBegin('kickable_opponent_existance', TType.BOOL, 37) + oprot.writeBool(self.kickable_opponent_existance) + oprot.writeFieldEnd() + if self.penalty_kick_state is not None: + oprot.writeFieldBegin('penalty_kick_state', TType.STRUCT, 38) + self.penalty_kick_state.write(oprot) + oprot.writeFieldEnd() + if self.see_time is not None: + oprot.writeFieldBegin('see_time', TType.I32, 39) + oprot.writeI32(self.see_time) + oprot.writeFieldEnd() + if self.time_stopped is not None: + oprot.writeFieldBegin('time_stopped', TType.I32, 40) + oprot.writeI32(self.time_stopped) + oprot.writeFieldEnd() + if self.set_play_count is not None: + oprot.writeFieldBegin('set_play_count', TType.I32, 41) + oprot.writeI32(self.set_play_count) + oprot.writeFieldEnd() + if self.game_mode_side is not None: + oprot.writeFieldBegin('game_mode_side', TType.I32, 42) + oprot.writeI32(self.game_mode_side) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -9293,6 +9516,86 @@ def __ne__(self, other): return not (self == other) +class bhv_doForceKick(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('bhv_doForceKick') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class bhv_doHeardPassRecieve(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('bhv_doHeardPassRecieve') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + class PlayerAction(object): """ Attributes: @@ -9360,11 +9663,13 @@ class PlayerAction(object): - helios_set_play - helios_penalty - helios_communication + - bhv_do_force_kick + - bhv_do_heard_pass_recieve """ - def __init__(self, dash=None, turn=None, kick=None, tackle=None, catch_action=None, move=None, turn_neck=None, change_view=None, say=None, point_to=None, point_to_of=None, attention_to=None, attention_to_of=None, log=None, debug_client=None, body_go_to_point=None, body_smart_kick=None, bhv_before_kick_off=None, bhv_body_neck_to_ball=None, bhv_body_neck_to_point=None, bhv_emergency=None, bhv_go_to_point_look_ball=None, bhv_neck_body_to_ball=None, bhv_neck_body_to_point=None, bhv_scan_field=None, body_advance_ball=None, body_clear_ball=None, body_dribble=None, body_go_to_point_dodge=None, body_hold_ball=None, body_intercept=None, body_kick_one_step=None, body_stop_ball=None, body_stop_dash=None, body_tackle_to_point=None, body_turn_to_angle=None, body_turn_to_ball=None, body_turn_to_point=None, focus_move_to_point=None, focus_reset=None, neck_scan_field=None, neck_scan_players=None, neck_turn_to_ball_and_player=None, neck_turn_to_ball_or_scan=None, neck_turn_to_ball=None, neck_turn_to_goalie_or_scan=None, neck_turn_to_low_conf_teammate=None, neck_turn_to_player_or_scan=None, neck_turn_to_point=None, neck_turn_to_relative=None, view_change_width=None, view_normal=None, view_synch=None, view_wide=None, helios_goalie=None, helios_goalie_move=None, helios_goalie_kick=None, helios_shoot=None, helios_offensive_planner=None, helios_basic_offensive=None, helios_basic_move=None, helios_set_play=None, helios_penalty=None, helios_communication=None,): + def __init__(self, dash=None, turn=None, kick=None, tackle=None, catch_action=None, move=None, turn_neck=None, change_view=None, say=None, point_to=None, point_to_of=None, attention_to=None, attention_to_of=None, log=None, debug_client=None, body_go_to_point=None, body_smart_kick=None, bhv_before_kick_off=None, bhv_body_neck_to_ball=None, bhv_body_neck_to_point=None, bhv_emergency=None, bhv_go_to_point_look_ball=None, bhv_neck_body_to_ball=None, bhv_neck_body_to_point=None, bhv_scan_field=None, body_advance_ball=None, body_clear_ball=None, body_dribble=None, body_go_to_point_dodge=None, body_hold_ball=None, body_intercept=None, body_kick_one_step=None, body_stop_ball=None, body_stop_dash=None, body_tackle_to_point=None, body_turn_to_angle=None, body_turn_to_ball=None, body_turn_to_point=None, focus_move_to_point=None, focus_reset=None, neck_scan_field=None, neck_scan_players=None, neck_turn_to_ball_and_player=None, neck_turn_to_ball_or_scan=None, neck_turn_to_ball=None, neck_turn_to_goalie_or_scan=None, neck_turn_to_low_conf_teammate=None, neck_turn_to_player_or_scan=None, neck_turn_to_point=None, neck_turn_to_relative=None, view_change_width=None, view_normal=None, view_synch=None, view_wide=None, helios_goalie=None, helios_goalie_move=None, helios_goalie_kick=None, helios_shoot=None, helios_offensive_planner=None, helios_basic_offensive=None, helios_basic_move=None, helios_set_play=None, helios_penalty=None, helios_communication=None, bhv_do_force_kick=None, bhv_do_heard_pass_recieve=None,): self.dash = dash self.turn = turn self.kick = kick @@ -9429,6 +9734,8 @@ def __init__(self, dash=None, turn=None, kick=None, tackle=None, catch_action=No self.helios_set_play = helios_set_play self.helios_penalty = helios_penalty self.helios_communication = helios_communication + self.bhv_do_force_kick = bhv_do_force_kick + self.bhv_do_heard_pass_recieve = bhv_do_heard_pass_recieve def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: @@ -9823,6 +10130,18 @@ def read(self, iprot): self.helios_communication.read(iprot) else: iprot.skip(ftype) + elif fid == 65: + if ftype == TType.STRUCT: + self.bhv_do_force_kick = bhv_doForceKick() + self.bhv_do_force_kick.read(iprot) + else: + iprot.skip(ftype) + elif fid == 66: + if ftype == TType.STRUCT: + self.bhv_do_heard_pass_recieve = bhv_doHeardPassRecieve() + self.bhv_do_heard_pass_recieve.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -10089,6 +10408,14 @@ def write(self, oprot): oprot.writeFieldBegin('helios_communication', TType.STRUCT, 64) self.helios_communication.write(oprot) oprot.writeFieldEnd() + if self.bhv_do_force_kick is not None: + oprot.writeFieldBegin('bhv_do_force_kick', TType.STRUCT, 65) + self.bhv_do_force_kick.write(oprot) + oprot.writeFieldEnd() + if self.bhv_do_heard_pass_recieve is not None: + oprot.writeFieldBegin('bhv_do_heard_pass_recieve', TType.STRUCT, 66) + self.bhv_do_heard_pass_recieve.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10112,13 +10439,17 @@ class PlayerActions(object): Attributes: - actions - ignore_preprocess + - ignore_doforcekick + - ignore_doHeardPassRecieve """ - def __init__(self, actions=None, ignore_preprocess=None,): + def __init__(self, actions=None, ignore_preprocess=None, ignore_doforcekick=None, ignore_doHeardPassRecieve=None,): self.actions = actions self.ignore_preprocess = ignore_preprocess + self.ignore_doforcekick = ignore_doforcekick + self.ignore_doHeardPassRecieve = ignore_doHeardPassRecieve def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: @@ -10145,6 +10476,16 @@ def read(self, iprot): self.ignore_preprocess = iprot.readBool() else: iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.ignore_doforcekick = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.ignore_doHeardPassRecieve = iprot.readBool() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -10166,6 +10507,14 @@ def write(self, oprot): oprot.writeFieldBegin('ignore_preprocess', TType.BOOL, 2) oprot.writeBool(self.ignore_preprocess) oprot.writeFieldEnd() + if self.ignore_doforcekick is not None: + oprot.writeFieldBegin('ignore_doforcekick', TType.BOOL, 3) + oprot.writeBool(self.ignore_doforcekick) + oprot.writeFieldEnd() + if self.ignore_doHeardPassRecieve is not None: + oprot.writeFieldBegin('ignore_doHeardPassRecieve', TType.BOOL, 4) + oprot.writeBool(self.ignore_doHeardPassRecieve) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -11277,11 +11626,15 @@ class ServerParam(object): - penalty_area_half_width - penalty_area_length - goal_width + - goal_area_width + - goal_area_length + - center_circle_r + - goal_post_radius """ - def __init__(self, register_response=None, inertia_moment=None, player_size=None, player_decay=None, player_rand=None, player_weight=None, player_speed_max=None, player_accel_max=None, stamina_max=None, stamina_inc_max=None, recover_init=None, recover_dec_thr=None, recover_min=None, recover_dec=None, effort_init=None, effort_dec_thr=None, effort_min=None, effort_dec=None, effort_inc_thr=None, effort_inc=None, kick_rand=None, team_actuator_noise=None, player_rand_factor_l=None, player_rand_factor_r=None, kick_rand_factor_l=None, kick_rand_factor_r=None, ball_size=None, ball_decay=None, ball_rand=None, ball_weight=None, ball_speed_max=None, ball_accel_max=None, dash_power_rate=None, kick_power_rate=None, kickable_margin=None, control_radius=None, control_radius_width=None, max_power=None, min_power=None, max_moment=None, min_moment=None, max_neck_moment=None, min_neck_moment=None, max_neck_angle=None, min_neck_angle=None, visible_angle=None, visible_distance=None, wind_dir=None, wind_force=None, wind_angle=None, wind_rand=None, kickable_area=None, catch_area_l=None, catch_area_w=None, catch_probability=None, goalie_max_moves=None, corner_kick_margin=None, offside_active_area_size=None, wind_none=None, use_wind_random=None, coach_say_count_max=None, coach_say_msg_size=None, clang_win_size=None, clang_define_win=None, clang_meta_win=None, clang_advice_win=None, clang_info_win=None, clang_mess_delay=None, clang_mess_per_cycle=None, half_time=None, simulator_step=None, send_step=None, recv_step=None, sense_body_step=None, lcm_step=None, player_say_msg_size=None, player_hear_max=None, player_hear_inc=None, player_hear_decay=None, catch_ban_cycle=None, slow_down_factor=None, use_offside=None, kickoff_offside=None, offside_kick_margin=None, audio_cut_dist=None, dist_quantize_step=None, landmark_dist_quantize_step=None, dir_quantize_step=None, dist_quantize_step_l=None, dist_quantize_step_r=None, landmark_dist_quantize_step_l=None, landmark_dist_quantize_step_r=None, dir_quantize_step_l=None, dir_quantize_step_r=None, coach_mode=None, coach_with_referee_mode=None, use_old_coach_hear=None, slowness_on_top_for_left_team=None, slowness_on_top_for_right_team=None, start_goal_l=None, start_goal_r=None, fullstate_l=None, fullstate_r=None, drop_ball_time=None, synch_mode=None, synch_offset=None, synch_micro_sleep=None, point_to_ban=None, point_to_duration=None, player_port=None, trainer_port=None, online_coach_port=None, verbose_mode=None, coach_send_vi_step=None, replay_file=None, landmark_file=None, send_comms=None, text_logging=None, game_logging=None, game_log_version=None, text_log_dir=None, game_log_dir=None, text_log_fixed_name=None, game_log_fixed_name=None, use_text_log_fixed=None, use_game_log_fixed=None, use_text_log_dated=None, use_game_log_dated=None, log_date_format=None, log_times=None, record_message=None, text_log_compression=None, game_log_compression=None, use_profile=None, tackle_dist=None, tackle_back_dist=None, tackle_width=None, tackle_exponent=None, tackle_cycles=None, tackle_power_rate=None, freeform_wait_period=None, freeform_send_period=None, free_kick_faults=None, back_passes=None, proper_goal_kicks=None, stopped_ball_vel=None, max_goal_kicks=None, clang_del_win=None, clang_rule_win=None, auto_mode=None, kick_off_wait=None, connect_wait=None, game_over_wait=None, team_l_start=None, team_r_start=None, keepaway_mode=None, keepaway_length=None, keepaway_width=None, keepaway_logging=None, keepaway_log_dir=None, keepaway_log_fixed_name=None, keepaway_log_fixed=None, keepaway_log_dated=None, keepaway_start=None, nr_normal_halfs=None, nr_extra_halfs=None, penalty_shoot_outs=None, pen_before_setup_wait=None, pen_setup_wait=None, pen_ready_wait=None, pen_taken_wait=None, pen_nr_kicks=None, pen_max_extra_kicks=None, pen_dist_x=None, pen_random_winner=None, pen_allow_mult_kicks=None, pen_max_goalie_dist_x=None, pen_coach_moves_players=None, module_dir=None, ball_stuck_area=None, coach_msg_file=None, max_tackle_power=None, max_back_tackle_power=None, player_speed_max_min=None, extra_stamina=None, synch_see_offset=None, extra_half_time=None, stamina_capacity=None, max_dash_angle=None, min_dash_angle=None, dash_angle_step=None, side_dash_rate=None, back_dash_rate=None, max_dash_power=None, min_dash_power=None, tackle_rand_factor=None, foul_detect_probability=None, foul_exponent=None, foul_cycles=None, golden_goal=None, red_card_probability=None, illegal_defense_duration=None, illegal_defense_number=None, illegal_defense_dist_x=None, illegal_defense_width=None, fixed_teamname_l=None, fixed_teamname_r=None, max_catch_angle=None, min_catch_angle=None, random_seed=None, long_kick_power_factor=None, long_kick_delay=None, max_monitors=None, catchable_area=None, real_speed_max=None, pitch_half_length=None, pitch_half_width=None, our_penalty_area_line_x=None, their_penalty_area_line_x=None, penalty_area_half_width=None, penalty_area_length=None, goal_width=None,): + def __init__(self, register_response=None, inertia_moment=None, player_size=None, player_decay=None, player_rand=None, player_weight=None, player_speed_max=None, player_accel_max=None, stamina_max=None, stamina_inc_max=None, recover_init=None, recover_dec_thr=None, recover_min=None, recover_dec=None, effort_init=None, effort_dec_thr=None, effort_min=None, effort_dec=None, effort_inc_thr=None, effort_inc=None, kick_rand=None, team_actuator_noise=None, player_rand_factor_l=None, player_rand_factor_r=None, kick_rand_factor_l=None, kick_rand_factor_r=None, ball_size=None, ball_decay=None, ball_rand=None, ball_weight=None, ball_speed_max=None, ball_accel_max=None, dash_power_rate=None, kick_power_rate=None, kickable_margin=None, control_radius=None, control_radius_width=None, max_power=None, min_power=None, max_moment=None, min_moment=None, max_neck_moment=None, min_neck_moment=None, max_neck_angle=None, min_neck_angle=None, visible_angle=None, visible_distance=None, wind_dir=None, wind_force=None, wind_angle=None, wind_rand=None, kickable_area=None, catch_area_l=None, catch_area_w=None, catch_probability=None, goalie_max_moves=None, corner_kick_margin=None, offside_active_area_size=None, wind_none=None, use_wind_random=None, coach_say_count_max=None, coach_say_msg_size=None, clang_win_size=None, clang_define_win=None, clang_meta_win=None, clang_advice_win=None, clang_info_win=None, clang_mess_delay=None, clang_mess_per_cycle=None, half_time=None, simulator_step=None, send_step=None, recv_step=None, sense_body_step=None, lcm_step=None, player_say_msg_size=None, player_hear_max=None, player_hear_inc=None, player_hear_decay=None, catch_ban_cycle=None, slow_down_factor=None, use_offside=None, kickoff_offside=None, offside_kick_margin=None, audio_cut_dist=None, dist_quantize_step=None, landmark_dist_quantize_step=None, dir_quantize_step=None, dist_quantize_step_l=None, dist_quantize_step_r=None, landmark_dist_quantize_step_l=None, landmark_dist_quantize_step_r=None, dir_quantize_step_l=None, dir_quantize_step_r=None, coach_mode=None, coach_with_referee_mode=None, use_old_coach_hear=None, slowness_on_top_for_left_team=None, slowness_on_top_for_right_team=None, start_goal_l=None, start_goal_r=None, fullstate_l=None, fullstate_r=None, drop_ball_time=None, synch_mode=None, synch_offset=None, synch_micro_sleep=None, point_to_ban=None, point_to_duration=None, player_port=None, trainer_port=None, online_coach_port=None, verbose_mode=None, coach_send_vi_step=None, replay_file=None, landmark_file=None, send_comms=None, text_logging=None, game_logging=None, game_log_version=None, text_log_dir=None, game_log_dir=None, text_log_fixed_name=None, game_log_fixed_name=None, use_text_log_fixed=None, use_game_log_fixed=None, use_text_log_dated=None, use_game_log_dated=None, log_date_format=None, log_times=None, record_message=None, text_log_compression=None, game_log_compression=None, use_profile=None, tackle_dist=None, tackle_back_dist=None, tackle_width=None, tackle_exponent=None, tackle_cycles=None, tackle_power_rate=None, freeform_wait_period=None, freeform_send_period=None, free_kick_faults=None, back_passes=None, proper_goal_kicks=None, stopped_ball_vel=None, max_goal_kicks=None, clang_del_win=None, clang_rule_win=None, auto_mode=None, kick_off_wait=None, connect_wait=None, game_over_wait=None, team_l_start=None, team_r_start=None, keepaway_mode=None, keepaway_length=None, keepaway_width=None, keepaway_logging=None, keepaway_log_dir=None, keepaway_log_fixed_name=None, keepaway_log_fixed=None, keepaway_log_dated=None, keepaway_start=None, nr_normal_halfs=None, nr_extra_halfs=None, penalty_shoot_outs=None, pen_before_setup_wait=None, pen_setup_wait=None, pen_ready_wait=None, pen_taken_wait=None, pen_nr_kicks=None, pen_max_extra_kicks=None, pen_dist_x=None, pen_random_winner=None, pen_allow_mult_kicks=None, pen_max_goalie_dist_x=None, pen_coach_moves_players=None, module_dir=None, ball_stuck_area=None, coach_msg_file=None, max_tackle_power=None, max_back_tackle_power=None, player_speed_max_min=None, extra_stamina=None, synch_see_offset=None, extra_half_time=None, stamina_capacity=None, max_dash_angle=None, min_dash_angle=None, dash_angle_step=None, side_dash_rate=None, back_dash_rate=None, max_dash_power=None, min_dash_power=None, tackle_rand_factor=None, foul_detect_probability=None, foul_exponent=None, foul_cycles=None, golden_goal=None, red_card_probability=None, illegal_defense_duration=None, illegal_defense_number=None, illegal_defense_dist_x=None, illegal_defense_width=None, fixed_teamname_l=None, fixed_teamname_r=None, max_catch_angle=None, min_catch_angle=None, random_seed=None, long_kick_power_factor=None, long_kick_delay=None, max_monitors=None, catchable_area=None, real_speed_max=None, pitch_half_length=None, pitch_half_width=None, our_penalty_area_line_x=None, their_penalty_area_line_x=None, penalty_area_half_width=None, penalty_area_length=None, goal_width=None, goal_area_width=None, goal_area_length=None, center_circle_r=None, goal_post_radius=None,): self.register_response = register_response self.inertia_moment = inertia_moment self.player_size = player_size @@ -11504,6 +11857,10 @@ def __init__(self, register_response=None, inertia_moment=None, player_size=None self.penalty_area_half_width = penalty_area_half_width self.penalty_area_length = penalty_area_length self.goal_width = goal_width + self.goal_area_width = goal_area_width + self.goal_area_length = goal_area_length + self.center_circle_r = center_circle_r + self.goal_post_radius = goal_post_radius def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: @@ -12625,6 +12982,26 @@ def read(self, iprot): self.goal_width = iprot.readDouble() else: iprot.skip(ftype) + elif fid == 223: + if ftype == TType.DOUBLE: + self.goal_area_width = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 224: + if ftype == TType.DOUBLE: + self.goal_area_length = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 225: + if ftype == TType.DOUBLE: + self.center_circle_r = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 226: + if ftype == TType.DOUBLE: + self.goal_post_radius = iprot.readDouble() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -13523,6 +13900,22 @@ def write(self, oprot): oprot.writeFieldBegin('goal_width', TType.DOUBLE, 222) oprot.writeDouble(self.goal_width) oprot.writeFieldEnd() + if self.goal_area_width is not None: + oprot.writeFieldBegin('goal_area_width', TType.DOUBLE, 223) + oprot.writeDouble(self.goal_area_width) + oprot.writeFieldEnd() + if self.goal_area_length is not None: + oprot.writeFieldBegin('goal_area_length', TType.DOUBLE, 224) + oprot.writeDouble(self.goal_area_length) + oprot.writeFieldEnd() + if self.center_circle_r is not None: + oprot.writeFieldBegin('center_circle_r', TType.DOUBLE, 225) + oprot.writeDouble(self.center_circle_r) + oprot.writeFieldEnd() + if self.goal_post_radius is not None: + oprot.writeFieldBegin('goal_post_radius', TType.DOUBLE, 226) + oprot.writeDouble(self.goal_post_radius) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14990,6 +15383,17 @@ def __ne__(self, other): (16, TType.DOUBLE, 'dist_from_self', None, None, ), # 16 (17, TType.DOUBLE, 'angle_from_self', None, None, ), # 17 ) +all_structs.append(PenaltyKickState) +PenaltyKickState.thrift_spec = ( + None, # 0 + (1, TType.I32, 'on_field_side', None, None, ), # 1 + (2, TType.I32, 'current_taker_side', None, None, ), # 2 + (3, TType.I32, 'our_taker_counter', None, None, ), # 3 + (4, TType.I32, 'their_taker_counter', None, None, ), # 4 + (5, TType.I32, 'our_score', None, None, ), # 5 + (6, TType.I32, 'their_score', None, None, ), # 6 + (7, TType.BOOL, 'is_kick_taker', None, None, ), # 7 +) all_structs.append(Player) Player.thrift_spec = ( None, # 0 @@ -15066,6 +15470,8 @@ def __ne__(self, other): (37, TType.DOUBLE, 'recovery', None, None, ), # 37 (38, TType.DOUBLE, 'stamina_capacity', None, None, ), # 38 (39, TType.I32, 'card', None, None, ), # 39 + (40, TType.I32, 'catch_time', None, None, ), # 40 + (41, TType.DOUBLE, 'effort', None, None, ), # 41 ) all_structs.append(InterceptInfo) InterceptInfo.thrift_spec = ( @@ -15133,6 +15539,13 @@ def __ne__(self, other): (33, TType.DOUBLE, 'their_defense_line_x', None, None, ), # 33 (34, TType.DOUBLE, 'our_defense_player_line_x', None, None, ), # 34 (35, TType.DOUBLE, 'their_defense_player_line_x', None, None, ), # 35 + (36, TType.BOOL, 'kickable_teammate_existance', None, None, ), # 36 + (37, TType.BOOL, 'kickable_opponent_existance', None, None, ), # 37 + (38, TType.STRUCT, 'penalty_kick_state', [PenaltyKickState, None], None, ), # 38 + (39, TType.I32, 'see_time', None, None, ), # 39 + (40, TType.I32, 'time_stopped', None, None, ), # 40 + (41, TType.I32, 'set_play_count', None, None, ), # 41 + (42, TType.I32, 'game_mode_side', None, None, ), # 42 ) all_structs.append(State) State.thrift_spec = ( @@ -15709,6 +16122,12 @@ def __ne__(self, other): all_structs.append(HeliosCommunicaion) HeliosCommunicaion.thrift_spec = ( ) +all_structs.append(bhv_doForceKick) +bhv_doForceKick.thrift_spec = ( +) +all_structs.append(bhv_doHeardPassRecieve) +bhv_doHeardPassRecieve.thrift_spec = ( +) all_structs.append(PlayerAction) PlayerAction.thrift_spec = ( None, # 0 @@ -15776,12 +16195,16 @@ def __ne__(self, other): (62, TType.STRUCT, 'helios_set_play', [HeliosSetPlay, None], None, ), # 62 (63, TType.STRUCT, 'helios_penalty', [HeliosPenalty, None], None, ), # 63 (64, TType.STRUCT, 'helios_communication', [HeliosCommunicaion, None], None, ), # 64 + (65, TType.STRUCT, 'bhv_do_force_kick', [bhv_doForceKick, None], None, ), # 65 + (66, TType.STRUCT, 'bhv_do_heard_pass_recieve', [bhv_doHeardPassRecieve, None], None, ), # 66 ) all_structs.append(PlayerActions) PlayerActions.thrift_spec = ( None, # 0 (1, TType.LIST, 'actions', (TType.STRUCT, [PlayerAction, None], False), None, ), # 1 (2, TType.BOOL, 'ignore_preprocess', None, None, ), # 2 + (3, TType.BOOL, 'ignore_doforcekick', None, None, ), # 3 + (4, TType.BOOL, 'ignore_doHeardPassRecieve', None, None, ), # 4 ) all_structs.append(ChangePlayerType) ChangePlayerType.thrift_spec = ( @@ -16080,6 +16503,10 @@ def __ne__(self, other): (220, TType.DOUBLE, 'penalty_area_half_width', None, None, ), # 220 (221, TType.DOUBLE, 'penalty_area_length', None, None, ), # 221 (222, TType.DOUBLE, 'goal_width', None, None, ), # 222 + (223, TType.DOUBLE, 'goal_area_width', None, None, ), # 223 + (224, TType.DOUBLE, 'goal_area_length', None, None, ), # 224 + (225, TType.DOUBLE, 'center_circle_r', None, None, ), # 225 + (226, TType.DOUBLE, 'goal_post_radius', None, None, ), # 226 ) all_structs.append(PlayerParam) PlayerParam.thrift_spec = ( diff --git a/soccer/ttypes.pyi b/soccer/ttypes.pyi index 99b5b1e..df5d940 100644 --- a/soccer/ttypes.pyi +++ b/soccer/ttypes.pyi @@ -102,6 +102,17 @@ class CardType(Enum): YELLOW = auto() RED = auto() +class PenaltyKickState(object): + def __init__(self, on_field_side: Side = None, current_taker_side: Side = None, our_taker_counter: int = None, their_taker_counter: int = None, our_score: int = None, their_score: int = None, is_kick_taker: bool = None): + pass + on_field_side: Side + current_taker_side: Side + our_taker_counter: int + their_taker_counter: int + our_score: int + their_score: int + is_kick_taker: bool + class Player(object): def __init__(self, position: RpcVector2D = None, seen_position: RpcVector2D = None, heard_position: RpcVector2D = None, velocity: RpcVector2D = None, seen_velocity: RpcVector2D = None, pos_count: int = None, seen_pos_count: int = None, heard_pos_count: int = None, vel_count: int = None, seen_vel_count: int = None, ghost_count: int = None, dist_from_self: float = None, angle_from_self: float = None, id: int = None, side: Side = None, uniform_number: int = None, uniform_number_count: int = None, is_goalie: bool = None, body_direction: float = None, body_direction_count: int = None, face_direction: float = None, face_direction_count: int = None, point_to_direction: float = None, point_to_direction_count: int = None, is_kicking: bool = None, dist_from_ball: float = None, angle_from_ball: float = None, ball_reach_steps: int = None, is_tackling: bool = None, type_id: int = None): pass @@ -137,7 +148,7 @@ class Player(object): type_id: int class Self(object): - def __init__(self, position: RpcVector2D = None, seen_position: RpcVector2D = None, heard_position: RpcVector2D = None, velocity: RpcVector2D = None, seen_velocity: RpcVector2D = None, pos_count: int = None, seen_pos_count: int = None, heard_pos_count: int = None, vel_count: int = None, seen_vel_count: int = None, ghost_count: int = None, id: int = None, side: Side = None, uniform_number: int = None, uniform_number_count: int = None, is_goalie: bool = None, body_direction: float = None, body_direction_count: int = None, face_direction: float = None, face_direction_count: int = None, point_to_direction: float = None, point_to_direction_count: int = None, is_kicking: bool = None, dist_from_ball: float = None, angle_from_ball: float = None, ball_reach_steps: int = None, is_tackling: bool = None, relative_neck_direction: float = None, stamina: float = None, is_kickable: bool = None, catch_probability: float = None, tackle_probability: float = None, foul_probability: float = None, view_width: ViewWidth = None, type_id: int = None, kick_rate: float = None, recovery: float = None, stamina_capacity: float = None, card: CardType = None): + def __init__(self, position: RpcVector2D = None, seen_position: RpcVector2D = None, heard_position: RpcVector2D = None, velocity: RpcVector2D = None, seen_velocity: RpcVector2D = None, pos_count: int = None, seen_pos_count: int = None, heard_pos_count: int = None, vel_count: int = None, seen_vel_count: int = None, ghost_count: int = None, id: int = None, side: Side = None, uniform_number: int = None, uniform_number_count: int = None, is_goalie: bool = None, body_direction: float = None, body_direction_count: int = None, face_direction: float = None, face_direction_count: int = None, point_to_direction: float = None, point_to_direction_count: int = None, is_kicking: bool = None, dist_from_ball: float = None, angle_from_ball: float = None, ball_reach_steps: int = None, is_tackling: bool = None, relative_neck_direction: float = None, stamina: float = None, is_kickable: bool = None, catch_probability: float = None, tackle_probability: float = None, foul_probability: float = None, view_width: ViewWidth = None, type_id: int = None, kick_rate: float = None, recovery: float = None, stamina_capacity: float = None, card: CardType = None, catch_time: int = None, effort: float = None): pass position: RpcVector2D seen_position: RpcVector2D @@ -178,6 +189,8 @@ class Self(object): recovery: float stamina_capacity: float card: CardType + catch_time: int + effort: float class InterceptActionType(Enum): UNKNOWN_Intercept_Action_Type = auto() @@ -249,7 +262,7 @@ class GameModeType(Enum): MODE_MAX = auto() class WorldModel(object): - def __init__(self, intercept_table: InterceptTable = None, our_team_name: str = None, their_team_name: str = None, our_side: Side = None, last_set_play_start_time: int = None, myself: Self = None, ball: Ball = None, teammates: List[Player] = None, opponents: List[Player] = None, unknowns: List[Player] = None, our_players_dict: Dict[int, Player] = None, their_players_dict: Dict[int, Player] = None, our_goalie_uniform_number: int = None, their_goalie_uniform_number: int = None, offside_line_x: float = None, offside_line_x_count: int = None, kickable_teammate_id: int = None, kickable_opponent_id: int = None, last_kick_side: Side = None, last_kicker_uniform_number: int = None, cycle: int = None, game_mode_type: GameModeType = None, left_team_score: int = None, right_team_score: int = None, is_our_set_play: bool = None, is_their_set_play: bool = None, stoped_cycle: int = None, our_team_score: int = None, their_team_score: int = None, is_penalty_kick_mode: bool = None, helios_home_positions: Dict[int, RpcVector2D] = None, our_defense_line_x: float = None, their_defense_line_x: float = None, our_defense_player_line_x: float = None, their_defense_player_line_x: float = None): + def __init__(self, intercept_table: InterceptTable = None, our_team_name: str = None, their_team_name: str = None, our_side: Side = None, last_set_play_start_time: int = None, myself: Self = None, ball: Ball = None, teammates: List[Player] = None, opponents: List[Player] = None, unknowns: List[Player] = None, our_players_dict: Dict[int, Player] = None, their_players_dict: Dict[int, Player] = None, our_goalie_uniform_number: int = None, their_goalie_uniform_number: int = None, offside_line_x: float = None, offside_line_x_count: int = None, kickable_teammate_id: int = None, kickable_opponent_id: int = None, last_kick_side: Side = None, last_kicker_uniform_number: int = None, cycle: int = None, game_mode_type: GameModeType = None, left_team_score: int = None, right_team_score: int = None, is_our_set_play: bool = None, is_their_set_play: bool = None, stoped_cycle: int = None, our_team_score: int = None, their_team_score: int = None, is_penalty_kick_mode: bool = None, helios_home_positions: Dict[int, RpcVector2D] = None, our_defense_line_x: float = None, their_defense_line_x: float = None, our_defense_player_line_x: float = None, their_defense_player_line_x: float = None, kickable_teammate_existance: bool = None, kickable_opponent_existance: bool = None, penalty_kick_state: PenaltyKickState = None, see_time: int = None, time_stopped: int = None, set_play_count: int = None, game_mode_side: Side = None): pass intercept_table: InterceptTable our_team_name: str @@ -286,6 +299,13 @@ class WorldModel(object): their_defense_line_x: float our_defense_player_line_x: float their_defense_player_line_x: float + kickable_teammate_existance: bool + kickable_opponent_existance: bool + penalty_kick_state: PenaltyKickState + see_time: int + time_stopped: int + set_play_count: int + game_mode_side: Side class State(object): def __init__(self, register_response: RegisterResponse = None, world_model: WorldModel = None, full_world_model: WorldModel = None, need_preprocess: bool = None): @@ -916,8 +936,18 @@ class HeliosCommunicaion(object): pass pass +class bhv_doForceKick(object): + def __init__(self, ): + pass + pass + +class bhv_doHeardPassRecieve(object): + def __init__(self, ): + pass + pass + class PlayerAction(object): - def __init__(self, dash: Dash = None, turn: Turn = None, kick: Kick = None, tackle: Tackle = None, catch_action: Catch = None, move: Move = None, turn_neck: TurnNeck = None, change_view: ChangeView = None, say: Say = None, point_to: PointTo = None, point_to_of: PointToOf = None, attention_to: AttentionTo = None, attention_to_of: AttentionToOf = None, log: Log = None, debug_client: DebugClient = None, body_go_to_point: Body_GoToPoint = None, body_smart_kick: Body_SmartKick = None, bhv_before_kick_off: Bhv_BeforeKickOff = None, bhv_body_neck_to_ball: Bhv_BodyNeckToBall = None, bhv_body_neck_to_point: Bhv_BodyNeckToPoint = None, bhv_emergency: Bhv_Emergency = None, bhv_go_to_point_look_ball: Bhv_GoToPointLookBall = None, bhv_neck_body_to_ball: Bhv_NeckBodyToBall = None, bhv_neck_body_to_point: Bhv_NeckBodyToPoint = None, bhv_scan_field: Bhv_ScanField = None, body_advance_ball: Body_AdvanceBall = None, body_clear_ball: Body_ClearBall = None, body_dribble: Body_Dribble = None, body_go_to_point_dodge: Body_GoToPointDodge = None, body_hold_ball: Body_HoldBall = None, body_intercept: Body_Intercept = None, body_kick_one_step: Body_KickOneStep = None, body_stop_ball: Body_StopBall = None, body_stop_dash: Body_StopDash = None, body_tackle_to_point: Body_TackleToPoint = None, body_turn_to_angle: Body_TurnToAngle = None, body_turn_to_ball: Body_TurnToBall = None, body_turn_to_point: Body_TurnToPoint = None, focus_move_to_point: Focus_MoveToPoint = None, focus_reset: Focus_Reset = None, neck_scan_field: Neck_ScanField = None, neck_scan_players: Neck_ScanPlayers = None, neck_turn_to_ball_and_player: Neck_TurnToBallAndPlayer = None, neck_turn_to_ball_or_scan: Neck_TurnToBallOrScan = None, neck_turn_to_ball: Neck_TurnToBall = None, neck_turn_to_goalie_or_scan: Neck_TurnToGoalieOrScan = None, neck_turn_to_low_conf_teammate: Neck_TurnToLowConfTeammate = None, neck_turn_to_player_or_scan: Neck_TurnToPlayerOrScan = None, neck_turn_to_point: Neck_TurnToPoint = None, neck_turn_to_relative: Neck_TurnToRelative = None, view_change_width: View_ChangeWidth = None, view_normal: View_Normal = None, view_synch: View_Synch = None, view_wide: View_Wide = None, helios_goalie: HeliosGoalie = None, helios_goalie_move: HeliosGoalieMove = None, helios_goalie_kick: HeliosGoalieKick = None, helios_shoot: HeliosShoot = None, helios_offensive_planner: HeliosOffensivePlanner = None, helios_basic_offensive: HeliosBasicOffensive = None, helios_basic_move: HeliosBasicMove = None, helios_set_play: HeliosSetPlay = None, helios_penalty: HeliosPenalty = None, helios_communication: HeliosCommunicaion = None): + def __init__(self, dash: Dash = None, turn: Turn = None, kick: Kick = None, tackle: Tackle = None, catch_action: Catch = None, move: Move = None, turn_neck: TurnNeck = None, change_view: ChangeView = None, say: Say = None, point_to: PointTo = None, point_to_of: PointToOf = None, attention_to: AttentionTo = None, attention_to_of: AttentionToOf = None, log: Log = None, debug_client: DebugClient = None, body_go_to_point: Body_GoToPoint = None, body_smart_kick: Body_SmartKick = None, bhv_before_kick_off: Bhv_BeforeKickOff = None, bhv_body_neck_to_ball: Bhv_BodyNeckToBall = None, bhv_body_neck_to_point: Bhv_BodyNeckToPoint = None, bhv_emergency: Bhv_Emergency = None, bhv_go_to_point_look_ball: Bhv_GoToPointLookBall = None, bhv_neck_body_to_ball: Bhv_NeckBodyToBall = None, bhv_neck_body_to_point: Bhv_NeckBodyToPoint = None, bhv_scan_field: Bhv_ScanField = None, body_advance_ball: Body_AdvanceBall = None, body_clear_ball: Body_ClearBall = None, body_dribble: Body_Dribble = None, body_go_to_point_dodge: Body_GoToPointDodge = None, body_hold_ball: Body_HoldBall = None, body_intercept: Body_Intercept = None, body_kick_one_step: Body_KickOneStep = None, body_stop_ball: Body_StopBall = None, body_stop_dash: Body_StopDash = None, body_tackle_to_point: Body_TackleToPoint = None, body_turn_to_angle: Body_TurnToAngle = None, body_turn_to_ball: Body_TurnToBall = None, body_turn_to_point: Body_TurnToPoint = None, focus_move_to_point: Focus_MoveToPoint = None, focus_reset: Focus_Reset = None, neck_scan_field: Neck_ScanField = None, neck_scan_players: Neck_ScanPlayers = None, neck_turn_to_ball_and_player: Neck_TurnToBallAndPlayer = None, neck_turn_to_ball_or_scan: Neck_TurnToBallOrScan = None, neck_turn_to_ball: Neck_TurnToBall = None, neck_turn_to_goalie_or_scan: Neck_TurnToGoalieOrScan = None, neck_turn_to_low_conf_teammate: Neck_TurnToLowConfTeammate = None, neck_turn_to_player_or_scan: Neck_TurnToPlayerOrScan = None, neck_turn_to_point: Neck_TurnToPoint = None, neck_turn_to_relative: Neck_TurnToRelative = None, view_change_width: View_ChangeWidth = None, view_normal: View_Normal = None, view_synch: View_Synch = None, view_wide: View_Wide = None, helios_goalie: HeliosGoalie = None, helios_goalie_move: HeliosGoalieMove = None, helios_goalie_kick: HeliosGoalieKick = None, helios_shoot: HeliosShoot = None, helios_offensive_planner: HeliosOffensivePlanner = None, helios_basic_offensive: HeliosBasicOffensive = None, helios_basic_move: HeliosBasicMove = None, helios_set_play: HeliosSetPlay = None, helios_penalty: HeliosPenalty = None, helios_communication: HeliosCommunicaion = None, bhv_do_force_kick: bhv_doForceKick = None, bhv_do_heard_pass_recieve: bhv_doHeardPassRecieve = None): pass dash: Dash turn: Turn @@ -983,12 +1013,16 @@ class PlayerAction(object): helios_set_play: HeliosSetPlay helios_penalty: HeliosPenalty helios_communication: HeliosCommunicaion + bhv_do_force_kick: bhv_doForceKick + bhv_do_heard_pass_recieve: bhv_doHeardPassRecieve class PlayerActions(object): - def __init__(self, actions: List[PlayerAction] = None, ignore_preprocess: bool = None): + def __init__(self, actions: List[PlayerAction] = None, ignore_preprocess: bool = None, ignore_doforcekick: bool = None, ignore_doHeardPassRecieve: bool = None): pass actions: List[PlayerAction] ignore_preprocess: bool + ignore_doforcekick: bool + ignore_doHeardPassRecieve: bool class ChangePlayerType(object): def __init__(self, uniform_number: int = None, type: int = None): @@ -1071,7 +1105,7 @@ class TrainerActions(object): actions: List[TrainerAction] class ServerParam(object): - def __init__(self, register_response: RegisterResponse = None, inertia_moment: float = None, player_size: float = None, player_decay: float = None, player_rand: float = None, player_weight: float = None, player_speed_max: float = None, player_accel_max: float = None, stamina_max: float = None, stamina_inc_max: float = None, recover_init: float = None, recover_dec_thr: float = None, recover_min: float = None, recover_dec: float = None, effort_init: float = None, effort_dec_thr: float = None, effort_min: float = None, effort_dec: float = None, effort_inc_thr: float = None, effort_inc: float = None, kick_rand: float = None, team_actuator_noise: bool = None, player_rand_factor_l: float = None, player_rand_factor_r: float = None, kick_rand_factor_l: float = None, kick_rand_factor_r: float = None, ball_size: float = None, ball_decay: float = None, ball_rand: float = None, ball_weight: float = None, ball_speed_max: float = None, ball_accel_max: float = None, dash_power_rate: float = None, kick_power_rate: float = None, kickable_margin: float = None, control_radius: float = None, control_radius_width: float = None, max_power: float = None, min_power: float = None, max_moment: float = None, min_moment: float = None, max_neck_moment: float = None, min_neck_moment: float = None, max_neck_angle: float = None, min_neck_angle: float = None, visible_angle: float = None, visible_distance: float = None, wind_dir: float = None, wind_force: float = None, wind_angle: float = None, wind_rand: float = None, kickable_area: float = None, catch_area_l: float = None, catch_area_w: float = None, catch_probability: float = None, goalie_max_moves: int = None, corner_kick_margin: float = None, offside_active_area_size: float = None, wind_none: bool = None, use_wind_random: bool = None, coach_say_count_max: int = None, coach_say_msg_size: int = None, clang_win_size: int = None, clang_define_win: int = None, clang_meta_win: int = None, clang_advice_win: int = None, clang_info_win: int = None, clang_mess_delay: int = None, clang_mess_per_cycle: int = None, half_time: int = None, simulator_step: int = None, send_step: int = None, recv_step: int = None, sense_body_step: int = None, lcm_step: int = None, player_say_msg_size: int = None, player_hear_max: int = None, player_hear_inc: int = None, player_hear_decay: int = None, catch_ban_cycle: int = None, slow_down_factor: int = None, use_offside: bool = None, kickoff_offside: bool = None, offside_kick_margin: float = None, audio_cut_dist: float = None, dist_quantize_step: float = None, landmark_dist_quantize_step: float = None, dir_quantize_step: float = None, dist_quantize_step_l: float = None, dist_quantize_step_r: float = None, landmark_dist_quantize_step_l: float = None, landmark_dist_quantize_step_r: float = None, dir_quantize_step_l: float = None, dir_quantize_step_r: float = None, coach_mode: bool = None, coach_with_referee_mode: bool = None, use_old_coach_hear: bool = None, slowness_on_top_for_left_team: float = None, slowness_on_top_for_right_team: float = None, start_goal_l: int = None, start_goal_r: int = None, fullstate_l: bool = None, fullstate_r: bool = None, drop_ball_time: int = None, synch_mode: bool = None, synch_offset: int = None, synch_micro_sleep: int = None, point_to_ban: int = None, point_to_duration: int = None, player_port: int = None, trainer_port: int = None, online_coach_port: int = None, verbose_mode: bool = None, coach_send_vi_step: int = None, replay_file: str = None, landmark_file: str = None, send_comms: bool = None, text_logging: bool = None, game_logging: bool = None, game_log_version: int = None, text_log_dir: str = None, game_log_dir: str = None, text_log_fixed_name: str = None, game_log_fixed_name: str = None, use_text_log_fixed: bool = None, use_game_log_fixed: bool = None, use_text_log_dated: bool = None, use_game_log_dated: bool = None, log_date_format: str = None, log_times: bool = None, record_message: bool = None, text_log_compression: int = None, game_log_compression: int = None, use_profile: bool = None, tackle_dist: float = None, tackle_back_dist: float = None, tackle_width: float = None, tackle_exponent: float = None, tackle_cycles: int = None, tackle_power_rate: float = None, freeform_wait_period: int = None, freeform_send_period: int = None, free_kick_faults: bool = None, back_passes: bool = None, proper_goal_kicks: bool = None, stopped_ball_vel: float = None, max_goal_kicks: int = None, clang_del_win: int = None, clang_rule_win: int = None, auto_mode: bool = None, kick_off_wait: int = None, connect_wait: int = None, game_over_wait: int = None, team_l_start: str = None, team_r_start: str = None, keepaway_mode: bool = None, keepaway_length: float = None, keepaway_width: float = None, keepaway_logging: bool = None, keepaway_log_dir: str = None, keepaway_log_fixed_name: str = None, keepaway_log_fixed: bool = None, keepaway_log_dated: bool = None, keepaway_start: int = None, nr_normal_halfs: int = None, nr_extra_halfs: int = None, penalty_shoot_outs: bool = None, pen_before_setup_wait: int = None, pen_setup_wait: int = None, pen_ready_wait: int = None, pen_taken_wait: int = None, pen_nr_kicks: int = None, pen_max_extra_kicks: int = None, pen_dist_x: float = None, pen_random_winner: bool = None, pen_allow_mult_kicks: bool = None, pen_max_goalie_dist_x: float = None, pen_coach_moves_players: bool = None, module_dir: str = None, ball_stuck_area: float = None, coach_msg_file: str = None, max_tackle_power: float = None, max_back_tackle_power: float = None, player_speed_max_min: float = None, extra_stamina: float = None, synch_see_offset: int = None, extra_half_time: int = None, stamina_capacity: float = None, max_dash_angle: float = None, min_dash_angle: float = None, dash_angle_step: float = None, side_dash_rate: float = None, back_dash_rate: float = None, max_dash_power: float = None, min_dash_power: float = None, tackle_rand_factor: float = None, foul_detect_probability: float = None, foul_exponent: float = None, foul_cycles: int = None, golden_goal: bool = None, red_card_probability: float = None, illegal_defense_duration: int = None, illegal_defense_number: int = None, illegal_defense_dist_x: float = None, illegal_defense_width: float = None, fixed_teamname_l: str = None, fixed_teamname_r: str = None, max_catch_angle: float = None, min_catch_angle: float = None, random_seed: int = None, long_kick_power_factor: float = None, long_kick_delay: int = None, max_monitors: int = None, catchable_area: float = None, real_speed_max: float = None, pitch_half_length: float = None, pitch_half_width: float = None, our_penalty_area_line_x: float = None, their_penalty_area_line_x: float = None, penalty_area_half_width: float = None, penalty_area_length: float = None, goal_width: float = None): + def __init__(self, register_response: RegisterResponse = None, inertia_moment: float = None, player_size: float = None, player_decay: float = None, player_rand: float = None, player_weight: float = None, player_speed_max: float = None, player_accel_max: float = None, stamina_max: float = None, stamina_inc_max: float = None, recover_init: float = None, recover_dec_thr: float = None, recover_min: float = None, recover_dec: float = None, effort_init: float = None, effort_dec_thr: float = None, effort_min: float = None, effort_dec: float = None, effort_inc_thr: float = None, effort_inc: float = None, kick_rand: float = None, team_actuator_noise: bool = None, player_rand_factor_l: float = None, player_rand_factor_r: float = None, kick_rand_factor_l: float = None, kick_rand_factor_r: float = None, ball_size: float = None, ball_decay: float = None, ball_rand: float = None, ball_weight: float = None, ball_speed_max: float = None, ball_accel_max: float = None, dash_power_rate: float = None, kick_power_rate: float = None, kickable_margin: float = None, control_radius: float = None, control_radius_width: float = None, max_power: float = None, min_power: float = None, max_moment: float = None, min_moment: float = None, max_neck_moment: float = None, min_neck_moment: float = None, max_neck_angle: float = None, min_neck_angle: float = None, visible_angle: float = None, visible_distance: float = None, wind_dir: float = None, wind_force: float = None, wind_angle: float = None, wind_rand: float = None, kickable_area: float = None, catch_area_l: float = None, catch_area_w: float = None, catch_probability: float = None, goalie_max_moves: int = None, corner_kick_margin: float = None, offside_active_area_size: float = None, wind_none: bool = None, use_wind_random: bool = None, coach_say_count_max: int = None, coach_say_msg_size: int = None, clang_win_size: int = None, clang_define_win: int = None, clang_meta_win: int = None, clang_advice_win: int = None, clang_info_win: int = None, clang_mess_delay: int = None, clang_mess_per_cycle: int = None, half_time: int = None, simulator_step: int = None, send_step: int = None, recv_step: int = None, sense_body_step: int = None, lcm_step: int = None, player_say_msg_size: int = None, player_hear_max: int = None, player_hear_inc: int = None, player_hear_decay: int = None, catch_ban_cycle: int = None, slow_down_factor: int = None, use_offside: bool = None, kickoff_offside: bool = None, offside_kick_margin: float = None, audio_cut_dist: float = None, dist_quantize_step: float = None, landmark_dist_quantize_step: float = None, dir_quantize_step: float = None, dist_quantize_step_l: float = None, dist_quantize_step_r: float = None, landmark_dist_quantize_step_l: float = None, landmark_dist_quantize_step_r: float = None, dir_quantize_step_l: float = None, dir_quantize_step_r: float = None, coach_mode: bool = None, coach_with_referee_mode: bool = None, use_old_coach_hear: bool = None, slowness_on_top_for_left_team: float = None, slowness_on_top_for_right_team: float = None, start_goal_l: int = None, start_goal_r: int = None, fullstate_l: bool = None, fullstate_r: bool = None, drop_ball_time: int = None, synch_mode: bool = None, synch_offset: int = None, synch_micro_sleep: int = None, point_to_ban: int = None, point_to_duration: int = None, player_port: int = None, trainer_port: int = None, online_coach_port: int = None, verbose_mode: bool = None, coach_send_vi_step: int = None, replay_file: str = None, landmark_file: str = None, send_comms: bool = None, text_logging: bool = None, game_logging: bool = None, game_log_version: int = None, text_log_dir: str = None, game_log_dir: str = None, text_log_fixed_name: str = None, game_log_fixed_name: str = None, use_text_log_fixed: bool = None, use_game_log_fixed: bool = None, use_text_log_dated: bool = None, use_game_log_dated: bool = None, log_date_format: str = None, log_times: bool = None, record_message: bool = None, text_log_compression: int = None, game_log_compression: int = None, use_profile: bool = None, tackle_dist: float = None, tackle_back_dist: float = None, tackle_width: float = None, tackle_exponent: float = None, tackle_cycles: int = None, tackle_power_rate: float = None, freeform_wait_period: int = None, freeform_send_period: int = None, free_kick_faults: bool = None, back_passes: bool = None, proper_goal_kicks: bool = None, stopped_ball_vel: float = None, max_goal_kicks: int = None, clang_del_win: int = None, clang_rule_win: int = None, auto_mode: bool = None, kick_off_wait: int = None, connect_wait: int = None, game_over_wait: int = None, team_l_start: str = None, team_r_start: str = None, keepaway_mode: bool = None, keepaway_length: float = None, keepaway_width: float = None, keepaway_logging: bool = None, keepaway_log_dir: str = None, keepaway_log_fixed_name: str = None, keepaway_log_fixed: bool = None, keepaway_log_dated: bool = None, keepaway_start: int = None, nr_normal_halfs: int = None, nr_extra_halfs: int = None, penalty_shoot_outs: bool = None, pen_before_setup_wait: int = None, pen_setup_wait: int = None, pen_ready_wait: int = None, pen_taken_wait: int = None, pen_nr_kicks: int = None, pen_max_extra_kicks: int = None, pen_dist_x: float = None, pen_random_winner: bool = None, pen_allow_mult_kicks: bool = None, pen_max_goalie_dist_x: float = None, pen_coach_moves_players: bool = None, module_dir: str = None, ball_stuck_area: float = None, coach_msg_file: str = None, max_tackle_power: float = None, max_back_tackle_power: float = None, player_speed_max_min: float = None, extra_stamina: float = None, synch_see_offset: int = None, extra_half_time: int = None, stamina_capacity: float = None, max_dash_angle: float = None, min_dash_angle: float = None, dash_angle_step: float = None, side_dash_rate: float = None, back_dash_rate: float = None, max_dash_power: float = None, min_dash_power: float = None, tackle_rand_factor: float = None, foul_detect_probability: float = None, foul_exponent: float = None, foul_cycles: int = None, golden_goal: bool = None, red_card_probability: float = None, illegal_defense_duration: int = None, illegal_defense_number: int = None, illegal_defense_dist_x: float = None, illegal_defense_width: float = None, fixed_teamname_l: str = None, fixed_teamname_r: str = None, max_catch_angle: float = None, min_catch_angle: float = None, random_seed: int = None, long_kick_power_factor: float = None, long_kick_delay: int = None, max_monitors: int = None, catchable_area: float = None, real_speed_max: float = None, pitch_half_length: float = None, pitch_half_width: float = None, our_penalty_area_line_x: float = None, their_penalty_area_line_x: float = None, penalty_area_half_width: float = None, penalty_area_length: float = None, goal_width: float = None, goal_area_width: float = None, goal_area_length: float = None, center_circle_r: float = None, goal_post_radius: float = None): pass register_response: RegisterResponse inertia_moment: float @@ -1295,6 +1329,10 @@ class ServerParam(object): penalty_area_half_width: float penalty_area_length: float goal_width: float + goal_area_width: float + goal_area_length: float + center_circle_r: float + goal_post_radius: float class PlayerParam(object): def __init__(self, register_response: RegisterResponse = None, player_types: int = None, subs_max: int = None, pt_max: int = None, allow_mult_default_type: bool = None, player_speed_max_delta_min: float = None, player_speed_max_delta_max: float = None, stamina_inc_max_delta_factor: float = None, player_decay_delta_min: float = None, player_decay_delta_max: float = None, inertia_moment_delta_factor: float = None, dash_power_rate_delta_min: float = None, dash_power_rate_delta_max: float = None, player_size_delta_factor: float = None, kickable_margin_delta_min: float = None, kickable_margin_delta_max: float = None, kick_rand_delta_factor: float = None, extra_stamina_delta_min: float = None, extra_stamina_delta_max: float = None, effort_max_delta_factor: float = None, effort_min_delta_factor: float = None, random_seed: int = None, new_dash_power_rate_delta_min: float = None, new_dash_power_rate_delta_max: float = None, new_stamina_inc_max_delta_factor: float = None, kick_power_rate_delta_min: float = None, kick_power_rate_delta_max: float = None, foul_detect_probability_delta_factor: float = None, catchable_area_l_stretch_min: float = None, catchable_area_l_stretch_max: float = None): diff --git a/utils/__init__.py b/utils/__init__.py new file mode 100644 index 0000000..e69de29