Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 38 additions & 8 deletions idl/soccer_service.thrift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// version 1
// version 1.6

namespace cpp soccer
namespace py soccer
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -765,6 +784,10 @@ struct HeliosPenalty {}

struct HeliosCommunicaion {}

struct bhv_doForceKick {}

struct bhv_doHeardPassRecieve {}

struct PlayerAction {
1: optional Dash dash,
2: optional Turn turn,
Expand Down Expand Up @@ -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<PlayerAction> actions,
2: bool ignore_preprocess
2: bool ignore_preprocess,
3: bool ignore_doforcekick,
4: bool ignore_doHeardPassRecieve
}

struct ChangePlayerType {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}

}
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down
Loading