Skip to content

Files

This branch is 331 commits ahead of helios-base/helios-base:master.

idl

Protocol Documentation

Version: 1.9

Table of Contents

Top

idl/grpc/service.proto

ActionTypeEffector

ActionTypeEffector is the message that represents coefficients of the action types in the tree to calculate the predicted state evaluation. Each number should start from 0.0. For example, if evaluation of an action-state is 10, the action is direct pass, and value of direct_pass is 0.5, so the final evaluation of the action-state will be 5. example in python grpc:

actions = []
action_type_effector = pb2.ActionTypeEffector(
direct_pass=2.0,
lead_pass=1.5,
through_pass=1.0,
short_dribble=1.0,
long_dribble=1.0,
cross=1.0,
hold=1.0
)
planner_evaluation_effector = pb2.PlannerEvaluationEffector(
# opponent_effector= ...
# teammate_effector= ...
action_type_effector= action_type_effector
)
planner_evaluation = pb2.PlannerEvaluation(
effectors=planner_evaluation_effector,
)
helios_offensive_planner = pb2.HeliosOffensivePlanner(
lead_pass=True,
direct_pass=False,
through_pass=True,
simple_pass=True,
short_dribble=True,
long_dribble=True,
simple_shoot=True,
simple_dribble=False,
cross=True,
server_side_decision=False,
max_depth=5,
max_nodes=800,
evalution=planner_evaluation
)
actions.append(pb2.PlayerAction(helios_offensive_planner=helios_offensive_planner))
return pb2.PlayerActions(actions=actions)
Field Type Label Description
direct_pass float The coefficient of the direct pass action.
lead_pass float The coefficient of the lead pass action.
through_pass float The coefficient of the through pass action.
short_dribble float The coefficient of the short dribble action.
long_dribble float The coefficient of the long dribble action.
cross float The coefficient of the cross action.
hold float The coefficient of the hold action.

AddArc

Field Type Label Description
level LoggerLevel
center RpcVector2D
radius float
start_angle float
span_angel float
color string

AddCircle

Field Type Label Description
level LoggerLevel
center RpcVector2D
radius float
color string
fill bool

AddLine

Field Type Label Description
level LoggerLevel
start RpcVector2D
end RpcVector2D
color string

AddMessage

Field Type Label Description
level LoggerLevel
position RpcVector2D
message string
color string

AddPoint

Field Type Label Description
level LoggerLevel
point RpcVector2D
color string

AddRectangle

Field Type Label Description
level LoggerLevel
left float
top float
length float
width float
color string
fill bool

AddSector

Field Type Label Description
level LoggerLevel
center RpcVector2D
min_radius float
max_radius float
start_angle float
span_angel float
color string
fill bool

AddText

Field Type Label Description
level LoggerLevel
message string

AddTriangle

Field Type Label Description
level LoggerLevel
point1 RpcVector2D
point2 RpcVector2D
point3 RpcVector2D
color string
fill bool

AttentionTo

Field Type Label Description
side Side
unum int32

AttentionToOf

Ball

Ball is the message that represents the ball in the soccer simulation.

Field Type Label Description
position RpcVector2D The position of the ball.
relative_position RpcVector2D The relative position of the ball to the agent who is sending the message.
seen_position RpcVector2D The position of the ball that the agent has seen.
heard_position RpcVector2D The position of the ball that the agent has heard.
velocity RpcVector2D The velocity of the ball.
seen_velocity RpcVector2D The velocity of the ball that the agent has seen.
heard_velocity RpcVector2D The velocity of the ball that the agent has heard.
pos_count int32 How many cycles ago the agent has seen or heard the ball.
seen_pos_count int32 How many cycles ago the agent has seen the ball.
heard_pos_count int32 How many cycles ago the agent has heard the ball.
vel_count int32 How many cycles ago the agent has seen or heard the velocity of the ball.
seen_vel_count int32 How many cycles ago the agent has seen the velocity of the ball.
heard_vel_count int32 How many cycles ago the agent has heard the velocity of the ball.
lost_count int32 How many cycles ago the agent has lost the ball.
ghost_count int32
dist_from_self float The distance of the ball from the agent who is sending the message.
angle_from_self float The angle of the ball from the agent who is sending the message.

BallGoalieMessage

Field Type Label Description
ball_position RpcVector2D
ball_velocity RpcVector2D
goalie_position RpcVector2D
goalie_body_direction float

BallMessage

Field Type Label Description
ball_position RpcVector2D
ball_velocity RpcVector2D

BallPlayerMessage

Field Type Label Description
ball_position RpcVector2D
ball_velocity RpcVector2D
uniform_number int32
player_position RpcVector2D
body_direction float

BestPlannerActionRequest

Field Type Label Description
register_response RegisterResponse
pairs BestPlannerActionRequest.PairsEntry repeated
state State

BestPlannerActionRequest.PairsEntry

Field Type Label Description
key int32
value RpcActionState

BestPlannerActionResponse

Field Type Label Description
index int32

Bhv_BeforeKickOff

Field Type Label Description
point RpcVector2D

Bhv_BodyNeckToBall

Bhv_BodyNeckToPoint

Field Type Label Description
point RpcVector2D

Bhv_Emergency

Bhv_GoToPointLookBall

Field Type Label Description
target_point RpcVector2D
distance_threshold float
max_dash_power float

Bhv_NeckBodyToBall

Field Type Label Description
angle_buf float

Bhv_NeckBodyToPoint

Field Type Label Description
point RpcVector2D
angle_buf float

Bhv_ScanField

Body_AdvanceBall

Body_ClearBall

Body_Dribble

Field Type Label Description
target_point RpcVector2D
distance_threshold float
dash_power float
dash_count int32
dodge bool

Body_GoToPoint

todo more variables

Field Type Label Description
target_point RpcVector2D
distance_threshold float
max_dash_power float

Body_GoToPointDodge

Field Type Label Description
target_point RpcVector2D
dash_power float

Body_HoldBall

Field Type Label Description
do_turn bool
turn_target_point RpcVector2D
kick_target_point RpcVector2D

Body_Intercept

Field Type Label Description
save_recovery bool
face_point RpcVector2D

Body_KickOneStep

Field Type Label Description
target_point RpcVector2D
first_speed float
force_mode bool

Body_SmartKick

todo more variables

Field Type Label Description
target_point RpcVector2D
first_speed float
first_speed_threshold float
max_steps int32

Body_StopBall

Body_StopDash

Field Type Label Description
save_recovery bool

Body_TackleToPoint

Field Type Label Description
target_point RpcVector2D
min_probability float
min_speed float

Body_TurnToAngle

Field Type Label Description
angle float

Body_TurnToBall

Field Type Label Description
cycle int32

Body_TurnToPoint

Field Type Label Description
target_point RpcVector2D
cycle int32

Catch

ChangePlayerType

Field Type Label Description
uniform_number int32
type int32

ChangeView

Field Type Label Description
view_width ViewWidth

CoachAction

Field Type Label Description
change_player_types ChangePlayerType
do_helios_substitute DoHeliosSubstitute
do_helios_say_player_types DoHeliosSayPlayerTypes

CoachActions

Field Type Label Description
actions CoachAction repeated

Dash

Dash is the message that represents the dash action in the soccer simulation. By using this action, agent can dash (run or walk) to a direction with a power. The rcssserver, calculates the next position and velocity of the agent based on current position, velocity, power and direction.

Field Type Label Description
power float The power of the dash action. The power can be between -100 to 100. If the power is negative, the agent will dash in the backward direction by using two times of the power.
relative_direction float The relative direction of the dash action to the body direction of the agent. The direction can be between -180 to 180.

DebugClient

Field Type Label Description
message string

DefenseLineMessage

Field Type Label Description
defense_line_x float

DoChangeMode

Field Type Label Description
game_mode_type GameModeType
side Side some of the game mode need to know the side

DoChangePlayerType

Field Type Label Description
our_side bool
uniform_number int32
type int32

DoHeliosSayPlayerTypes

DoHeliosSubstitute

DoKickOff

DoMoveBall

Field Type Label Description
position RpcVector2D
velocity RpcVector2D

DoMovePlayer

Field Type Label Description
our_side bool
uniform_number int32
position RpcVector2D
body_direction float

DoRecover

DribbleMessage

Field Type Label Description
target_point RpcVector2D
queue_count int32

Empty

Focus_MoveToPoint

Field Type Label Description
target_point RpcVector2D

Focus_Reset

GoalieAndPlayerMessage

Field Type Label Description
goalie_uniform_number int32
goalie_position RpcVector2D
goalie_body_direction float
player_uniform_number int32
player_position RpcVector2D

GoalieMessage

Field Type Label Description
goalie_uniform_number int32
goalie_position RpcVector2D
goalie_body_direction float

HeliosBasicMove

HeliosBasicOffensive

HeliosBasicTackle

Field Type Label Description
min_prob float
body_thr float

HeliosCommunicaion

HeliosFieldEvaluator

HeliosFieldEvaluator is the message that represents the field evaluator of the proxy agent to evaluate each node (predicted state) in the planner tree. If you dont set the field evaluator, the proxy agent will use the default field evaluator (HeliosFieldEvaluator) to evaluate each node in the planner tree. This field evaluator calculate the value of the predicted state by using this formula: value = x_coefficient * (ball.x + 52.5) + ball_dist_to_goal_coefficient * max(0.0, effective_max_ball_dist_to_goal - ball.dist(opponent goal center)) example in python grpc:

actions = []
helios_field_evaluator = pb2.HeliosFieldEvaluator(
x_coefficient=2.1,
ball_dist_to_goal_coefficient=1.8,
effective_max_ball_dist_to_goal=50.0
)
field_evaluator = pb2.PlannerFieldEvaluator(
helios_field_evaluator=helios_field_evaluator,
# matrix_field_evaluator=...
)
planner_evaluation = pb2.PlannerEvaluation(
field_evaluators=field_evaluator
)
helios_offensive_planner = pb2.HeliosOffensivePlanner(
lead_pass=True,
direct_pass=False,
through_pass=True,
simple_pass=True,
short_dribble=True,
long_dribble=True,
simple_shoot=True,
simple_dribble=False,
cross=True,
server_side_decision=False,
max_depth=5,
max_nodes=800,
evalution=planner_evaluation
)
actions.append(pb2.PlayerAction(helios_offensive_planner=helios_offensive_planner))
return pb2.PlayerActions(actions=actions)
Field Type Label Description
x_coefficient float The coefficient of the x-coordinate of the ball in the predicted state. The default value is 1.
ball_dist_to_goal_coefficient float The coefficient of the distance of the ball to the opponent goal center in the predicted state. The default value is 1.
effective_max_ball_dist_to_goal float The effective maximum distance of the ball to the opponent goal center in the predicted state. The default value is 40.0.

HeliosGoalie

HeliosGoalieKick

HeliosGoalieMove

HeliosOffensivePlanner

HeliosOffensivePlanner is the message that represents the offensive planner of the agent in the soccer simulation. The offensive planner is responsible for making decisions about the offensive actions of the agent by creating a tree of actions, finding the best chain of actions, and executing the first action in the chain, when the agent is ball owner. The best action is an action with best incomming predicted state. The best predicted state is the state that has the best evaluation value by using this formula: value = ball.x + max(0.0, 40.0 - ball.dist(opponent goal center)) Due to the complexity of the not simple actions, the agent can not calculate the best action in the first layer of the tree. So, the agent can use the simple actions in the first layer of the tree. To create the tree, the planner create all possible edges (actions) and create the next state of the agent by using each action. Then the planner starts to create the next layer of the tree by using the next state of the agent. The planner continues to create the tree until the max depth of the tree or number of edges is reached. For more information check this paper: HELIOS Base: An Open Source Package for the RoboCup Soccer 2D Simulation

Creating the tree and find best predicted state and action:

Loading
flowchart TD
wm[World Model]
s0((PredictState 0))
wm --> s0
s1((PredictState 1))
s2((PredictState 2))
s3((PredictState 3))
s4((PredictState 4))

s0 == DirectPass ==> s1
s0 == DirectPass ==> s2
s0 == ShortDribble ==> s3
s0 == Cross:BestAction ==> s4

s5((PredictState 5))
s6((PredictState 6))
s7((PredictState 7))
s8((PredictState 8))
s9((PredictState 9))
s10[PredictState 10
Best State]

s1 -. SimplePass .-> s5
s1 -- SimpleDribble --> s6
s2 -. SimplePass .-> s7
s3 -- SimpleDribble --> s8
s4 -. SimplePass .-> s9
s4 -. SimplePass .-> s10

s11((PredictState 11))
s12((PredictState 12))

s5 -. SimplePass .-> s11
s5 -- SimpleDribble --> s12
Field Type Label Description
direct_pass bool Whether the agent can make a direct pass or not. The direct pass is a pass action that the agent can pass the ball to the position of a teammate player. This action is just used in the first layer of the tree.
lead_pass bool Whether the agent can make a lead pass or not. The lead pass is a pass action that the agent can pass the ball to the position of a teammate player with a lead (very cloase to the teammate). This action is just used in the first layer of the tree.
through_pass bool Whether the agent can make a through pass or not. The through pass is a pass action that the agent can pass the ball to the position of a teammate player with a through (close or very far from the teammate, between teammates and opponent goal). This action is just used in the first layer of the tree.
short_dribble bool Whether the agent can make a short dribble or not. The short dribble is a dribble action that the agent can dribble the ball to a position. This action is just used in the first layer of the tree.
long_dribble bool Whether the agent can make a long dribble or not. The long dribble is a dribble action that the agent can dribble the ball to a position. This dribble is longer than the short dribble. This action is just used in the first layer of the tree
cross bool Whether the agent can make a cross or not. The cross is a kick action that the agent can kick the ball to the position close to teammate, but it does not care that the teammate can control the ball or not. This action is just used in the first layer of the tree.
simple_pass bool Whether the agent can make a simple pass or not. The simple pass is a pass action that the agent can pass the ball to the position of a teammate player. This action is just used in the second or more layers of the tree. This action is not very accurate.
simple_dribble bool Whether the agent can make a simple dribble or not. The simple dribble is a dribble action that the agent can dribble the ball to a position. This action is just used in the second or more layers of the tree. This action is not very accurate.
simple_shoot bool Whether the agent can make a simple shoot or not. The simple shoot is a kick action that the agent can kick the ball to the opponent goal. This action is just used in the second or more layers of the tree. This action is not very accurate.
server_side_decision bool If this value is true, the proxy agent, will create the tree and send all of the nodes to the playmaker server to choose the best action. If this value is false, the proxy agent will choose the best action by itself. The default value is false.
max_depth int32 The maximum depth of the tree. The agent will create the tree with this depth. To create the first layer of the tree, the agent will use the direct_pass, lead_pass, through_pass, short_dribble, long_dribble, cross actions. The difault value is 4. So, if you do not set this value, the agent will create the tree with 4 depth. Due to the default value of rpc, 0 means the default value.
max_nodes int32 The maximum number of nodes in the tree. The agent will create the tree with this number of nodes. The difault value is 500. So, if you do not set this value, the agent will create the tree with 500 nodes. Due to the default value of rpc, 0 means the default value.
evaluation PlannerEvaluation The evaluation methods to evaluate the actions[predicted states] in the tree.

HeliosPenalty

HeliosSetPlay

HeliosShoot

InitMessage

Field Type Label Description
register_response RegisterResponse
debug_mode bool

InterceptInfo

InterceptInfo is the message that represents the information about an intercept action.

Field Type Label Description
action_type InterceptActionType The type of the intercept action.
turn_steps int32 The number of steps that the agent needs to turn to the ball.
turn_angle float The angle that the agent needs to turn to the ball.
dash_steps int32 The number of steps that the agent needs to dash to the ball.
dash_power float The power of the dash action.
dash_dir float The direction of the dash action to player's body direction.
final_self_position RpcVector2D The final position of the agent after the intercept action.
final_ball_dist float The final distance of the ball from the agent after the intercept action.
final_stamina float The final stamina of the agent after the intercept action.
value float The value of the intercept action. TODO less is better or more is better?

InterceptMessage

Field Type Label Description
our bool
uniform_number int32
cycle int32

InterceptTable

InterceptTable is the message that represents the intercept table of the agent.

Field Type Label Description
self_reach_steps int32 The number of steps that the agent needs to reach the ball.
first_teammate_reach_steps int32 The number of steps that the first teammate needs to reach the ball.
second_teammate_reach_steps int32 The number of steps that the second teammate needs to reach the ball.
first_opponent_reach_steps int32 The number of steps that the first opponent needs to reach the ball.
second_opponent_reach_steps int32 The number of steps that the second opponent needs to reach the ball.
first_teammate_id int32 The ID of the first teammate. This ID is unique for each player's object in the each agent proxy. If the ID is 0, it means the agent has no first teammate.
second_teammate_id int32 The ID of the second teammate. This ID is unique for each player's object in the each agent proxy. If the ID is 0, it means the agent has no second teammate.
first_opponent_id int32 The ID of the first opponent. This ID is unique for each player's object in the each agent proxy. If the ID is 0, it means the agent has no first opponent.
second_opponent_id int32 The ID of the second opponent. This ID is unique for each player's object in the each agent proxy. If the ID is 0, it means the agent has no second opponent.
self_intercept_info InterceptInfo repeated The intercept information of the agent.

Kick

Field Type Label Description
power float
relative_direction float

Log

Field Type Label Description
add_text AddText
add_point AddPoint
add_line AddLine
add_arc AddArc
add_circle AddCircle
add_triangle AddTriangle
add_rectangle AddRectangle
add_sector AddSector
add_message AddMessage

MatrixFieldEvaluator

MatrixFieldEvaluator is the message that represents the matrix field evaluator of the proxy agent to evaluate each node (predicted state) in the planner tree. If you dont set the field evaluator, the proxy agent will use the default field evaluator (HeliosFieldEvaluator) to evaluate each node in the planner tree. This field evaluator calculate the value of the predicted state by using a matrix of float values.

| 10 | 20 | 30 | 40 | | 15 | 25 | 35 | 45 | | 10 | 20 | 30 | 40 |

In this example matrix, the value of each point in the opponent pernaly area is 45. example in python grpc:

actions = []
matrix_field_evaluator = pb2.MatrixFieldEvaluator(
evals=[
pb2.MatrixFieldEvaluatorY(evals=[10, 15, 10]),
pb2.MatrixFieldEvaluatorY(evals=[20, 25, 20]),
pb2.MatrixFieldEvaluatorY(evals=[30, 35, 30]),
pb2.MatrixFieldEvaluatorY(evals=[40, 45, 40]),
]
)
field_evaluator = pb2.PlannerFieldEvaluator(
# helios_field_evaluator=...
matrix_field_evaluator=matrix_field_evaluator
)
planner_evaluation = pb2.PlannerEvaluation(
field_evaluators=field_evaluator
)
helios_offensive_planner = pb2.HeliosOffensivePlanner(
lead_pass=True,
direct_pass=False,
through_pass=True,
simple_pass=True,
short_dribble=True,
long_dribble=True,
simple_shoot=True,
simple_dribble=False,
cross=True,
server_side_decision=False,
max_depth=5,
max_nodes=800,
evalution=planner_evaluation
)
actions.append(pb2.PlayerAction(helios_offensive_planner=helios_offensive_planner))
return pb2.PlayerActions(actions=actions)
Field Type Label Description
evals MatrixFieldEvaluatorY repeated

MatrixFieldEvaluatorY

Field Type Label Description
evals float repeated

Move

Field Type Label Description
x float
y float

Neck_OffensiveInterceptNeck

Neck_ScanField

Neck_ScanPlayers

todo min/max_angle

Neck_TurnToBall

Neck_TurnToBallAndPlayer

Field Type Label Description
side Side
uniform_number int32
count_threshold int32

Neck_TurnToBallOrScan

Field Type Label Description
count_threshold int32

Neck_TurnToGoalieOrScan

Field Type Label Description
count_threshold int32

Neck_TurnToLowConfTeammate

Neck_TurnToPlayerOrScan

Field Type Label Description
side Side
uniform_number int32
count_threshold int32

Neck_TurnToPoint

Field Type Label Description
target_point RpcVector2D

Neck_TurnToRelative

Field Type Label Description
angle float

OffsideLineMessage

Field Type Label Description
offside_line_x float

OnePlayerMessage

Field Type Label Description
uniform_number int32
position RpcVector2D

OpponentEffector

PlannerEvaluation is the message that represents the evaluation methods to evaluate the actions[predicted states] in the tree. Using this method causes the predicted state eval to be decreased based on the distance or reach steps of the opponent players to the position of the ball in the predicted state. Each variable in the message is a list of float values. For example, if you want to decrease the predicted state eval if the distance of the opponent player to the ball is less than 5, You can set the negetive_effect_by_distance variable with the value of [-9.0, -8.5, -7.2, -6.1, -3.8]. It means the predicted state eval will be decreased by 9.0 if the distance is less than 1, 8.5 if the distance is less than 2, 7.2 if the distance is less than 3, 6.1 if the distance is less than 4, 3.8 if the distance is less than 5. Example in python grpc:

actions = []
opponent_effector = pb2.OpponentEffector(
negetive_effect_by_distance=[-50, -45, -40, -30, -20, -15, -10, -5, -2, -1, -0.5, -0.1],
negetive_effect_by_distance_based_on_first_layer=False,
negetive_effect_by_reach_steps=[],
negetive_effect_by_reach_steps_based_on_first_layer=False
)
planner_evaluation_effector = pb2.PlannerEvaluationEffector(
opponent_effector=opponent_effector,
# teammate_effector= ...
# action_type_effector= ...
)
planner_evaluation = pb2.PlannerEvaluation(
effectors=planner_evaluation_effector,
)
helios_offensive_planner = pb2.HeliosOffensivePlanner(
lead_pass=True,
direct_pass=False,
through_pass=True,
simple_pass=True,
short_dribble=True,
long_dribble=True,
simple_shoot=True,
simple_dribble=False,
cross=True,
server_side_decision=False,
max_depth=5,
max_nodes=800,
evalution=planner_evaluation
)
actions.append(pb2.PlayerAction(helios_offensive_planner=helios_offensive_planner))
return pb2.PlayerActions(actions=actions)
Field Type Label Description
negetive_effect_by_distance float repeated The list of float values that represents the negetive effect of the distance of the opponent player to the ball in the predicted state. The values of this list should be negetive numbers.
negetive_effect_by_distance_based_on_first_layer bool If this value is true, the negetive_effect_by_distance will be calculated based on the first action of each action chain. For example, if we have a chain of actions like [direct_pass, simple_pass, simple_dribble], the negetive_effect_by_distance will be calculated based on the direct_pass action for all of the actions.
negetive_effect_by_reach_steps float repeated The list of float values that represents the negetive effect of the reach steps of the opponent player to the ball in the predicted state.
negetive_effect_by_reach_steps_based_on_first_layer bool If this value is true, the negetive_effect_by_reach_steps will be calculated based on the first action of each action chain. For example, if we have a chain of actions like [direct_pass, simple_pass, simple_dribble], the negetive_effect_by_reach_steps will be calculated based on the direct_pass action for all of the actions.

OpponentMessage

Field Type Label Description
uniform_number int32
position RpcVector2D
body_direction float

PassMessage

Field Type Label Description
receiver_uniform_number int32
receiver_point RpcVector2D
ball_position RpcVector2D
ball_velocity RpcVector2D

PassRequestMessage

Field Type Label Description
target_point RpcVector2D

PenaltyKickState

Field Type Label Description
on_field_side Side
current_taker_side Side
our_taker_counter int32
their_taker_counter int32
our_score int32
their_score int32
is_kick_taker bool
cycle int32

PlannerEvaluation

PlannerEvaluation is the message that represents the evaluation methods to evaluate the actions[predicted states] in the tree. Using this method causes the predicted state eval to be calculated based on field evaluators and effected by effectors.

Field Type Label Description
effectors PlannerEvaluationEffector
field_evaluators PlannerFieldEvaluator

PlannerEvaluationEffector

PlannerEvaluationEffector is the message that represents the effectors of the planner evaluation methods. The proxy agent will update the predicted state evaluation based on the effectors. example in python grpc:

actions = []
teammate_effector = pb2.TeammateEffector(
coefficients={2: 1.2, 5: 1.6}, # if action target is player 2, multiply by 1.2.
apply_based_on_first_layer=False
)
action_type_effector = pb2.ActionTypeEffector(
direct_pass=2.0,
lead_pass=1.5,
through_pass=1.0,
short_dribble=1.0,
long_dribble=1.0,
cross=1.0,
hold=1.0
)
opponent_effector = pb2.OpponentEffector(
negetive_effect_by_distance=[-50, -45, -40, -30, -20, -15, -10, -5, -2, -1, -0.5, -0.1],
negetive_effect_by_distance_based_on_first_layer=False,
negetive_effect_by_reach_steps=[],
negetive_effect_by_reach_steps_based_on_first_layer=False
)
planner_evaluation_effector = pb2.PlannerEvaluationEffector(
opponent_effector= opponent_effector,
teammate_effector= teammate_effector,
action_type_effector= action_type_effector
)
planner_evaluation = pb2.PlannerEvaluation(
effectors=planner_evaluation_effector,
)
helios_offensive_planner = pb2.HeliosOffensivePlanner(
lead_pass=True,
direct_pass=False,
through_pass=True,
simple_pass=True,
short_dribble=True,
long_dribble=True,
simple_shoot=True,
simple_dribble=False,
cross=True,
server_side_decision=False,
max_depth=5,
max_nodes=800,
evalution=planner_evaluation
)
actions.append(pb2.PlayerAction(helios_offensive_planner=helios_offensive_planner))
return pb2.PlayerActions(actions=actions)
Field Type Label Description
opponent_effector OpponentEffector The effector of the opponent players. You can set the negetive effect of the distance or reach steps of the opponent players to the ball in the predicted state. By using this effector, the proxy agent will decrease the predicted state evaluation based on the distance or reach steps of the opponent players to the ball in the predicted state.
action_type_effector ActionTypeEffector The effector of the action types. You can set the coefficients of the action types in the tree to calculate the predicted state evaluation. By using this effector, the proxy agent will update the predicted state evaluation based on the coefficients of the action types in the tree.
teammate_effector TeammateEffector The effector of the teammates. You can set the coefficients of the teammates in the tree to calculate the predicted state evaluation. By using this effector, the proxy agent will update the predicted state evaluation based on the coefficients of the teammates in the tree.

PlannerFieldEvaluator

PlannerFieldEvaluator is the message that represents the field evaluator of the proxy agent to evaluate each node (predicted state) in the planner tree. If you dont set the field evaluator, the proxy agent will use the default field evaluator (HeliosFieldEvaluator) to evaluate each node in the planner tree. This field evaluator calculate the value of the predicted state by using helios_field_evaluator or/and matrix_field_evaluator. Note: if you just use the matrix_field_evaluator, value of all target in each square of the matrix should be the same, so it causes that the player choosing hold ball action instead of dribble in that area. To avoid this issue, you can use the helios_field_evaluator with the matrix_field_evaluator together.

Field Type Label Description
helios_field_evaluator HeliosFieldEvaluator
matrix_field_evaluator MatrixFieldEvaluator

Player

Player is the message that represents a player in the soccer simulation. To get type information of the player, you can use the type_id field and player type information.

Field Type Label Description
position RpcVector2D The position of the player.
seen_position RpcVector2D The position of the player that the agent has seen.
heard_position RpcVector2D The position of the player that the agent has heard.
velocity RpcVector2D The velocity of the player.
seen_velocity RpcVector2D The velocity of the player that the agent has seen.
pos_count int32 How many cycles ago the agent has seen or heard the player.
seen_pos_count int32 How many cycles ago the agent has seen the player.
heard_pos_count int32 How many cycles ago the agent has heard the player.
vel_count int32 How many cycles ago the agent has seen or heard the velocity of the player.
seen_vel_count int32 How many cycles ago the agent has seen the velocity of the player.
ghost_count int32 How many cycles ago the agent has lost the player.
dist_from_self float The distance of the player from the agent who is sending the message.
angle_from_self float The angle of the player from the agent who is sending the message.
id int32 The unique identifier of the player.
side Side The side of the player. It can be LEFT or RIGHT or UNKNOWN if the side is not known.
uniform_number int32 The uniform number of the player.
uniform_number_count int32 How many cycles ago the agent has seen the uniform number of the player.
is_goalie bool Whether the player is a goalie or not.
body_direction float The body direction of the player.
body_direction_count int32 How many cycles ago the agent has seen the body direction of the player.
face_direction float The face direction of the player. In soccer simulation 2D, face direction is the direction that the player is looking at.
face_direction_count int32 How many cycles ago the agent has seen the face direction of the player.
point_to_direction float The direction that the player is pointing to.
point_to_direction_count int32 How many cycles ago the agent has seen the point to direction of the player.
is_kicking bool Whether the player is kicking or not.
dist_from_ball float The distance of the player from the ball.
angle_from_ball float The angle of the player from the ball.
ball_reach_steps int32 How many cycles the player needs to reach the ball.
is_tackling bool Whether the player is tackling or not.
type_id int32 The type identifier of the player.
inertia_final_point RpcVector2D

PlayerAction

Field Type Label Description
dash Dash
turn Turn
kick Kick
tackle Tackle
catch Catch
move Move
turn_neck TurnNeck
change_view ChangeView
say Say
point_to PointTo
point_to_of PointToOf
attention_to AttentionTo
attention_to_of AttentionToOf
log Log
debug_client DebugClient
body_go_to_point Body_GoToPoint
body_smart_kick Body_SmartKick
bhv_before_kick_off Bhv_BeforeKickOff
bhv_body_neck_to_ball Bhv_BodyNeckToBall
bhv_body_neck_to_point Bhv_BodyNeckToPoint
bhv_emergency Bhv_Emergency
bhv_go_to_point_look_ball Bhv_GoToPointLookBall
bhv_neck_body_to_ball Bhv_NeckBodyToBall
bhv_neck_body_to_point Bhv_NeckBodyToPoint
bhv_scan_field Bhv_ScanField
body_advance_ball Body_AdvanceBall
body_clear_ball Body_ClearBall
body_dribble Body_Dribble
body_go_to_point_dodge Body_GoToPointDodge
body_hold_ball Body_HoldBall
body_intercept Body_Intercept
body_kick_one_step Body_KickOneStep
body_stop_ball Body_StopBall
body_stop_dash Body_StopDash
body_tackle_to_point Body_TackleToPoint
body_turn_to_angle Body_TurnToAngle
body_turn_to_ball Body_TurnToBall
body_turn_to_point Body_TurnToPoint
focus_move_to_point Focus_MoveToPoint
focus_reset Focus_Reset
neck_scan_field Neck_ScanField
neck_scan_players Neck_ScanPlayers
neck_turn_to_ball_and_player Neck_TurnToBallAndPlayer
neck_turn_to_ball_or_scan Neck_TurnToBallOrScan
neck_turn_to_ball Neck_TurnToBall
neck_turn_to_goalie_or_scan Neck_TurnToGoalieOrScan
neck_turn_to_low_conf_teammate Neck_TurnToLowConfTeammate
neck_turn_to_player_or_scan Neck_TurnToPlayerOrScan
neck_turn_to_point Neck_TurnToPoint
neck_turn_to_relative Neck_TurnToRelative
view_change_width View_ChangeWidth
view_normal View_Normal
view_synch View_Synch
view_wide View_Wide
helios_goalie HeliosGoalie
helios_goalie_move HeliosGoalieMove
helios_goalie_kick HeliosGoalieKick
helios_shoot HeliosShoot
helios_offensive_planner HeliosOffensivePlanner
helios_basic_offensive HeliosBasicOffensive
helios_basic_move HeliosBasicMove
helios_set_play HeliosSetPlay
helios_penalty HeliosPenalty
helios_communication HeliosCommunicaion
bhv_do_force_kick bhv_doForceKick
bhv_do_heard_pass_recieve bhv_doHeardPassRecieve
helios_basic_tackle HeliosBasicTackle
neck_offensive_intercept_neck Neck_OffensiveInterceptNeck
bhv_goalie_free_kick bhv_goalieFreeKick

PlayerActions

Field Type Label Description
actions PlayerAction repeated
ignore_preprocess bool
ignore_doforcekick bool
ignore_doHeardPassRecieve bool
ignore_doIntention bool
ignore_shootInPreprocess bool

PlayerParam

Field Type Label Description
register_response RegisterResponse
player_types int32
subs_max int32
pt_max int32
allow_mult_default_type bool
player_speed_max_delta_min float
player_speed_max_delta_max float
stamina_inc_max_delta_factor float
player_decay_delta_min float
player_decay_delta_max float
inertia_moment_delta_factor float
dash_power_rate_delta_min float
dash_power_rate_delta_max float
player_size_delta_factor float
kickable_margin_delta_min float
kickable_margin_delta_max float
kick_rand_delta_factor float
extra_stamina_delta_min float
extra_stamina_delta_max float
effort_max_delta_factor float
effort_min_delta_factor float
random_seed int32
new_dash_power_rate_delta_min float
new_dash_power_rate_delta_max float
new_stamina_inc_max_delta_factor float
kick_power_rate_delta_min float
kick_power_rate_delta_max float
foul_detect_probability_delta_factor float
catchable_area_l_stretch_min float
catchable_area_l_stretch_max float

PlayerType

Field Type Label Description
register_response RegisterResponse
id int32
stamina_inc_max float
player_decay float
inertia_moment float
dash_power_rate float
player_size float
kickable_margin float
kick_rand float
extra_stamina float
effort_max float
effort_min float
kick_power_rate float
foul_detect_probability float
catchable_area_l_stretch float
unum_far_length float
unum_too_far_length float
team_far_length float
team_too_far_length float
player_max_observation_length float
ball_vel_far_length float
ball_vel_too_far_length float
ball_max_observation_length float
flag_chg_far_length float
flag_chg_too_far_length float
flag_max_observation_length float
kickable_area float
reliable_catchable_dist float
max_catchable_dist float
real_speed_max float
player_speed_max2 float
real_speed_max2 float
cycles_to_reach_max_speed int32
player_speed_max float

PointTo

Field Type Label Description
x float
y float

PointToOf

RecoveryMessage

Field Type Label Description
recovery float

RegisterRequest

RegisterRequest is the message that the client sends to the server to register itself. The client should send this message to the server to register itself. The server will respond with a RegisterResponse message.

Field Type Label Description
agent_type AgentType The type of the agent. It can be PlayerT, CoachT, or TrainerT.
team_name string The name of the team that the agent belongs to.
uniform_number int32 The uniform number of the agent.
rpc_version int32 The version of the RPC protocol that the client supports.

RegisterResponse

RegisterResponse is the message that the server sends to the client in response to a RegisterRequest message. The server will respond with this message after receiving a RegisterRequest message. The client should use the information in this message to identify itself to the server.

Field Type Label Description
client_id int32 The unique identifier assigned to the client by the server.
agent_type AgentType The type of the agent. It can be PlayerT, CoachT, or TrainerT.
team_name string The name of the team that the agent belongs to.
uniform_number int32 The uniform number of the agent.
rpc_server_language_type RpcServerLanguageType The language that the server is implemented in.

RpcActionState

Field Type Label Description
action RpcCooperativeAction
predict_state RpcPredictState
evaluation double

RpcCooperativeAction

Field Type Label Description
category RpcActionCategory
index int32
sender_unum int32
target_unum int32
target_point RpcVector2D
first_ball_speed double
first_turn_moment double
first_dash_power double
first_dash_angle_relative double
duration_step int32
kick_count int32
turn_count int32
dash_count int32
final_action bool
description string
parent_index int32

RpcPredictState

Field Type Label Description
spend_time int32
ball_holder_unum int32
ball_position RpcVector2D
ball_velocity RpcVector2D
our_defense_line_x double
our_offense_line_x double

RpcVector2D

RpcVector2D represents a 2D vector with additional properties. If you want to have access to geometric operations, you can use Vector2D class in pyrusgeom package To use this class, you need to install pyrusgeom package, import Vector2D class and create a Vector2D object with x and y values.

Field Type Label Description
x float The x-coordinate of the vector.
y float The y-coordinate of the vector.
dist float The distance magnitude of the vector.
angle float The angle of the vector in degrees. In soccer simulation 2D environment, the 0 degree is opponent's goal, and the angle increases in the counter-clock direction. So, if your team is in left side, -90 degree is up, 0 degree is right (opponent gole), 90 degree is down.

Say

Field Type Label Description
ball_message BallMessage
pass_message PassMessage
intercept_message InterceptMessage
goalie_message GoalieMessage
goalie_and_player_message GoalieAndPlayerMessage
offside_line_message OffsideLineMessage
defense_line_message DefenseLineMessage
wait_request_message WaitRequestMessage
setplay_message SetplayMessage
pass_request_message PassRequestMessage
stamina_message StaminaMessage
recovery_message RecoveryMessage
stamina_capacity_message StaminaCapacityMessage
dribble_message DribbleMessage
ball_goalie_message BallGoalieMessage
one_player_message OnePlayerMessage
two_player_message TwoPlayerMessage
three_player_message ThreePlayerMessage
self_message SelfMessage
teammate_message TeammateMessage
opponent_message OpponentMessage
ball_player_message BallPlayerMessage

Self

Self is the message that represents the agent itself in the soccer simulation. When an agent send a message to the playmaker server, self is information about the agent itself.

Field Type Label Description
position RpcVector2D The position of the agent.
seen_position RpcVector2D The position of the agent that the agent has seen. (By using flags)
heard_position RpcVector2D The position of the agent that the agent has heard. (This is not very useful)
velocity RpcVector2D The velocity of the agent.
seen_velocity RpcVector2D The velocity of the agent that the agent has seen. (By using flags)
pos_count int32 How many cycles ago the agent has seen or heard itself.
seen_pos_count int32 How many cycles ago the agent has seen itself.
heard_pos_count int32 How many cycles ago the agent has heard itself.
vel_count int32 How many cycles ago the agent has seen or heard the velocity of itself.
seen_vel_count int32 How many cycles ago the agent has seen the velocity of itself.
ghost_count int32 How many cycles ago the agent has lost itself.
id int32 The ID number for this object in proxy.
side Side The side of the agent. It can be LEFT or RIGHT or UNKNOWN if the side is not known.
uniform_number int32 The uniform number of the agent.
uniform_number_count int32 How many cycles ago the agent has seen the uniform number of itself.
is_goalie bool Whether the agent is a goalie or not.
body_direction float The body direction of the agent.
body_direction_count int32 How many cycles ago the agent has seen the body direction of itself.
face_direction float The face direction of the agent. In soccer simulation 2D, face direction is the direction that the agent is looking at. This is a global direction.
face_direction_count int32 How many cycles ago the agent has seen the face direction of itself.
point_to_direction float The direction that the agent is pointing to. This is a global direction.
point_to_direction_count int32 How many cycles ago the agent has seen the point to direction of itself.
is_kicking bool Whether the agent is kicking or not.
dist_from_ball float The distance of the agent from the ball.
angle_from_ball float The angle of the agent from the ball.
ball_reach_steps int32 How many cycles the agent needs to reach the ball.
is_tackling bool Whether the agent is tackling or not.
relative_neck_direction float The relative neck direction of the agent to the body direction.
stamina float The stamina of the agent. This number is between TODO
is_kickable bool Whether the agent is kickable or not. Means the agent can kick the ball.
catch_probability float The probability of the agent to catch the ball. This number is important for goalies.
tackle_probability float The probability of the agent to tackle the ball.
foul_probability float The probability of the agent to foul.
view_width ViewWidth The view width of the agent. It can be NARROW, NORMAL, or WIDE.
type_id int32 The type identifier of the agent. The RcssServer generates 18 different types of agents. The coach is reponsible to give the type information to the agent.
kick_rate float The kick rate of the agent. This number is calculated by this formula: self.playerType().kickRate(wm.ball().distFromSelf(), (wm.ball().angleFromSelf() - self.body()).degree()), So, if the kick rate is more, the agent can kick the ball with more first speed to any angle.
recovery float The current estimated recovery value. TODO more info
stamina_capacity float The stamina capacity of the agent. This number is between 0 to ~130000 depending on the server param.
card CardType The card type of the agent. It can be NO_CARD, YELLOW, or RED.
catch_time int32 The time when the last catch command is performed.
effort float The effort of the agent. TODO more info
get_safety_dash_power float

SelfMessage

Field Type Label Description
self_position RpcVector2D
self_body_direction float
self_stamina float

ServerParam

Field Type Label Description
register_response RegisterResponse
inertia_moment float
player_size float
player_decay float
player_rand float
player_weight float
player_speed_max float
player_accel_max float
stamina_max float
stamina_inc_max float
recover_init float
recover_dec_thr float
recover_min float
recover_dec float
effort_init float
effort_dec_thr float
effort_min float
effort_dec float
effort_inc_thr float
effort_inc float
kick_rand float
team_actuator_noise bool
player_rand_factor_l float
player_rand_factor_r float
kick_rand_factor_l float
kick_rand_factor_r float
ball_size float
ball_decay float
ball_rand float
ball_weight float
ball_speed_max float
ball_accel_max float
dash_power_rate float
kick_power_rate float
kickable_margin float
control_radius float
control_radius_width float
max_power float
min_power float
max_moment float
min_moment float
max_neck_moment float
min_neck_moment float
max_neck_angle float
min_neck_angle float
visible_angle float
visible_distance float
wind_dir float
wind_force float
wind_angle float
wind_rand float
kickable_area float
catch_area_l float
catch_area_w float
catch_probability float
goalie_max_moves int32
corner_kick_margin float
offside_active_area_size float
wind_none bool
use_wind_random bool
coach_say_count_max int32
coach_say_msg_size int32
clang_win_size int32
clang_define_win int32
clang_meta_win int32
clang_advice_win int32
clang_info_win int32
clang_mess_delay int32
clang_mess_per_cycle int32
half_time int32
simulator_step int32
send_step int32
recv_step int32
sense_body_step int32
lcm_step int32
player_say_msg_size int32
player_hear_max int32
player_hear_inc int32
player_hear_decay int32
catch_ban_cycle int32
slow_down_factor int32
use_offside bool
kickoff_offside bool
offside_kick_margin float
audio_cut_dist float
dist_quantize_step float
landmark_dist_quantize_step float
dir_quantize_step float
dist_quantize_step_l float
dist_quantize_step_r float
landmark_dist_quantize_step_l float
landmark_dist_quantize_step_r float
dir_quantize_step_l float
dir_quantize_step_r float
coach_mode bool
coach_with_referee_mode bool
use_old_coach_hear bool
slowness_on_top_for_left_team float
slowness_on_top_for_right_team float
start_goal_l int32
start_goal_r int32
fullstate_l bool
fullstate_r bool
drop_ball_time int32
synch_mode bool
synch_offset int32
synch_micro_sleep int32
point_to_ban int32
point_to_duration int32
player_port int32
trainer_port int32
online_coach_port int32
verbose_mode bool
coach_send_vi_step int32
replay_file string
landmark_file string
send_comms bool
text_logging bool
game_logging bool
game_log_version int32
text_log_dir string
game_log_dir string
text_log_fixed_name string
game_log_fixed_name string
use_text_log_fixed bool
use_game_log_fixed bool
use_text_log_dated bool
use_game_log_dated bool
log_date_format string
log_times bool
record_message bool
text_log_compression int32
game_log_compression int32
use_profile bool
tackle_dist float
tackle_back_dist float
tackle_width float
tackle_exponent float
tackle_cycles int32
tackle_power_rate float
freeform_wait_period int32
freeform_send_period int32
free_kick_faults bool
back_passes bool
proper_goal_kicks bool
stopped_ball_vel float
max_goal_kicks int32
clang_del_win int32
clang_rule_win int32
auto_mode bool
kick_off_wait int32
connect_wait int32
game_over_wait int32
team_l_start string
team_r_start string
keepaway_mode bool
keepaway_length float
keepaway_width float
keepaway_logging bool
keepaway_log_dir string
keepaway_log_fixed_name string
keepaway_log_fixed bool
keepaway_log_dated bool
keepaway_start int32
nr_normal_halfs int32
nr_extra_halfs int32
penalty_shoot_outs bool
pen_before_setup_wait int32
pen_setup_wait int32
pen_ready_wait int32
pen_taken_wait int32
pen_nr_kicks int32
pen_max_extra_kicks int32
pen_dist_x float
pen_random_winner bool
pen_allow_mult_kicks bool
pen_max_goalie_dist_x float
pen_coach_moves_players bool
module_dir string
ball_stuck_area float
coach_msg_file string
max_tackle_power float
max_back_tackle_power float
player_speed_max_min float
extra_stamina float
synch_see_offset int32
extra_half_time int32
stamina_capacity float
max_dash_angle float
min_dash_angle float
dash_angle_step float
side_dash_rate float
back_dash_rate float
max_dash_power float
min_dash_power float
tackle_rand_factor float
foul_detect_probability float
foul_exponent float
foul_cycles int32
golden_goal bool
red_card_probability float
illegal_defense_duration int32
illegal_defense_number int32
illegal_defense_dist_x float
illegal_defense_width float
fixed_teamname_l string
fixed_teamname_r string
max_catch_angle float
min_catch_angle float
random_seed int32
long_kick_power_factor float
long_kick_delay int32
max_monitors int32
catchable_area float
real_speed_max float
pitch_half_length float
pitch_half_width float
our_penalty_area_line_x float
their_penalty_area_line_x float
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
pitch_margin float

SetplayMessage

Field Type Label Description
wait_step int32

StaminaCapacityMessage

Field Type Label Description
stamina_capacity float

StaminaMessage

Field Type Label Description
stamina float

State

State is the message that represents the state of the agent in the soccer simulation.

Field Type Label Description
register_response RegisterResponse The response of the agent registration. The agent should use this information to identify itself to the playermaker server.
world_model WorldModel The world model of the agent. The agent should use this information to make decisions. If the server is in full state mode, the world model will be full state without noise.
full_world_model WorldModel The full world model of the agent. This value will be set only if the server is in full state mode and proxy agent is in debug mode. TODO add more information
need_preprocess bool Whether the agent needs to preprocess the world model or not. If the agent needs to do some preprocessing actions, it means the proxy agent will igonre the playmaker actions, you can ignore preprocessing.

Tackle

Field Type Label Description
power_or_dir float
foul bool

TeammateEffector

TeammateEffector is the message that represents the coefficients of the teammates in the tree to calculate the predicted state evaluation. Each number should start from 0.0. For example, if evaluation of an action-state is 10, the action is direct pass to player 5, and value of player 5 is 0.5, so the final evaluation of the action-state will be 5. example in python grpc:

actions = []
teammate_effector = pb2.TeammateEffector(
coefficients={2: 1.2, 5: 1.6}, # if action target is player 2, multiply by 1.2.
apply_based_on_first_layer=False
)
planner_evaluation_effector = pb2.PlannerEvaluationEffector(
# opponent_effector= ...
teammate_effector= teammate_effector
# action_type_effector= ...
)
planner_evaluation = pb2.PlannerEvaluation(
effectors=planner_evaluation_effector,
)
helios_offensive_planner = pb2.HeliosOffensivePlanner(
lead_pass=True,
direct_pass=False,
through_pass=True,
simple_pass=True,
short_dribble=True,
long_dribble=True,
simple_shoot=True,
simple_dribble=False,
cross=True,
server_side_decision=False,
max_depth=5,
max_nodes=800,
evalution=planner_evaluation
)
actions.append(pb2.PlayerAction(helios_offensive_planner=helios_offensive_planner))
return pb2.PlayerActions(actions=actions)
Field Type Label Description
coefficients TeammateEffector.CoefficientsEntry repeated The map of the coefficients of the teammates. The key of the map is the uniform number of the teammate, and the value is the coefficient of the teammate. The value should be started from 0.0.
apply_based_on_first_layer bool If this value is true, the coefficients will be calculated based on the first action target of each action chain. For example, if we have a chain of actions like [direct_pass to 5, simple_pass to 6, simple_pass to 7], the coefficients will be calculated based on the coeeficient of the player 5 for all of the actions.

TeammateEffector.CoefficientsEntry

Field Type Label Description
key int32
value float

TeammateMessage

Field Type Label Description
uniform_number int32
position RpcVector2D
body_direction float

ThreePlayerMessage

Field Type Label Description
first_uniform_number int32
first_position RpcVector2D
second_uniform_number int32
second_position RpcVector2D
third_uniform_number int32
third_position RpcVector2D

TrainerAction

Field Type Label Description
do_kick_off DoKickOff
do_move_ball DoMoveBall
do_move_player DoMovePlayer
do_recover DoRecover
do_change_mode DoChangeMode
do_change_player_type DoChangePlayerType

TrainerActions

Field Type Label Description
actions TrainerAction repeated

Turn

Turn is the message that represents the turn action in the soccer simulation. By using this action, agent can turn to a direction relative to the current body direction. The rcssserver, calculates the next body direction of the agent based on current body direction, relative direction and velocity of the agent.

Field Type Label Description
relative_direction float The relative direction of the turn action to the body direction of the agent. The direction can be between -180 to 180.

TurnNeck

Field Type Label Description
moment float

TwoPlayerMessage

Field Type Label Description
first_uniform_number int32
first_position RpcVector2D
second_uniform_number int32
second_position RpcVector2D

View_ChangeWidth

Field Type Label Description
view_width ViewWidth

View_Normal

View_Synch

View_Wide

WaitRequestMessage

WorldModel

WorldModel is the message that represents the world model in the soccer simulation. The WorldModel message contains all the information about the current state of the game.

Field Type Label Description
intercept_table InterceptTable The intercept table of the agent.
our_team_name string The name of our team.
their_team_name string The name of their team.
our_side Side The side of our team. It can be LEFT or RIGHT.
last_set_play_start_time int32 The last set play start time.
self Self The information about the agent itself.
ball Ball The information about the ball.
teammates Player repeated
opponents Player repeated
unknowns Player repeated
our_players_dict WorldModel.OurPlayersDictEntry repeated
their_players_dict WorldModel.TheirPlayersDictEntry repeated
our_goalie_uniform_number int32 The uniform number of our goalie.
their_goalie_uniform_number int32 The uniform number of their goalie.
offside_line_x float The x-coordinate of the offside line of opponent team.
ofside_line_x_count int32 How many cycles ago the agent has seen (calculated) the offside line.
kickable_teammate_id int32 The ID of the kickable teammate. To get the information about the kickable teammate, you can find a player in teammates or our_players_dict with this ID.
kickable_opponent_id int32 The ID of the kickable opponent. To get the information about the kickable opponent, you can find a player in opponents or their_players_dict with this ID.
last_kick_side Side The last side that the ball was kicked.
last_kicker_uniform_number int32 The last uniform number that the ball was kicked.
cycle int32 The current cycle of the game.
game_mode_type GameModeType The current game mode type.
left_team_score int32 The score of the left team.
right_team_score int32 The score of the right team.
is_our_set_play bool Whether it is our set play or not.
is_their_set_play bool Whether it is their set play or not.
stoped_cycle int32 The number of cycles that the game has stopped. For example, when the cycle is 90, and stoped_cycle is 10, it means the game has stopped at 90th cycle for 10 cycles.
our_team_score int32 The score of our team.
their_team_score int32 The score of their team.
is_penalty_kick_mode bool Whether it is penalty kick mode or not.
helios_home_positions WorldModel.HeliosHomePositionsEntry repeated The home positions of the agents in the helios strategy. Helios base code is using Delanaray triangulation to calculate the home positions.
our_defense_line_x double The x-coordinate of our defense line. The diffence line is minimum x-coordinate of our players (except goalie) and ball.
their_defense_line_x double The x-coordinate of their defense line. The diffence line is minimum x-coordinate of their players (except goalie) and ball.
our_defense_player_line_x double The x-coordinate of our defense player line. The diffence player line is minimum x-coordinate of our players (except goalie).
their_defense_player_line_x double The x-coordinate of their defense player line. The diffence player line is minimum x-coordinate of their players (except goalie).
kickable_teammate_existance bool Whether the kickable teammate exists or not.
kickable_opponent_existance bool Whether the kickable opponent exists or not.
penalty_kick_state PenaltyKickState The penalty kick state.
see_time int32 The time that the agent has seen the world model.
time_stopped int32
set_play_count int32
game_mode_side Side

WorldModel.HeliosHomePositionsEntry

Field Type Label Description
key int32
value RpcVector2D

WorldModel.OurPlayersDictEntry

Field Type Label Description
key int32
value Player

WorldModel.TheirPlayersDictEntry

Field Type Label Description
key int32
value Player

bhv_doForceKick

bhv_doHeardPassRecieve

bhv_goalieFreeKick

AgentType

AgentType is the enum that represents the different types of agents.

Name Number Description
PlayerT 0
CoachT 1
TrainerT 2

CardType

Type of player's card.

Name Number Description
NO_CARD 0
YELLOW 1
RED 2

GameModeType

Name Number Description
BeforeKickOff 0
TimeOver 1
PlayOn 2
KickOff_ 3
KickIn_ 4
FreeKick_ 5
CornerKick_ 6
GoalKick_ 7
AfterGoal_ 8
OffSide_ 9
PenaltyKick_ 10
FirstHalfOver 11
Pause 12
Human 13
FoulCharge_ 14
FoulPush_ 15
FoulMultipleAttacker_ 16
FoulBallOut_ 17
BackPass_ 18
FreeKickFault_ 19
CatchFault_ 20
IndFreeKick_ 21
PenaltySetup_ 22
PenaltyReady_ 23
PenaltyTaken_ 24
PenaltyMiss_ 25
PenaltyScore_ 26
IllegalDefense_ 27
PenaltyOnfield_ 28
PenaltyFoul_ 29
GoalieCatch_ 30
ExtendHalf 31
MODE_MAX 32

InterceptActionType

InterceptActionType is the enum that represents the different types of intercept actions.

Name Number Description
UNKNOWN_Intercept_Action_Type 0 Unknown intercept action type.
OMNI_DASH 1 Omni dash intercept action type. Means the agent will dash to the ball in any direction.
TURN_FORWARD_DASH 2 Turn forward dash intercept action type. Means the agent will turn to the ball and dash to the ball.
TURN_BACKWARD_DASH 3 Turn backward dash intercept action type. Means the agent will turn to the ball and dash to the ball in the backward direction.

LoggerLevel

Name Number Description
NoneLevel 0
SYSTEM 1
SENSOR 2
WORLD 4
ACTION 8
INTERCEPT 16
KICK 32
HOLD 64
DRIBBLE 128
PASS 256
CROSS 512
SHOOT 1024
CLEAR 2048
BLOCK 4096
MARK 8192
POSITIONING 16384
ROLE 32768
TEAM 65536
COMMUNICATION 131072
ANALYZER 262144
ACTION_CHAIN 524288
PLAN 1048576 TRAINING = 0x80000000; LEVEL_ANY = 0xffffffff;

RpcActionCategory

Name Number Description
AC_Hold 0
AC_Dribble 1
AC_Pass 2
AC_Shoot 3
AC_Clear 4
AC_Move 5
AC_NoAction 6

RpcServerLanguageType

Name Number Description
UNKNOWN_LANGUAGE 0
PYThON 1
JAVA 2
CPP 3
CSHARP 4
RUBY 5
JAVE_SCRIPT 6
GO 7

Side

Name Number Description
UNKNOWN 0
LEFT 1
RIGHT 2

ViewWidth

Enum representing the different view widths available in the soccer simulation. For more information, see the documentation at link.

Name Number Description
NARROW 0 Narrow view width (60 degrees).
NORMAL 1 Normal view width (90 degrees).
WIDE 2 Wide view width (180 degrees).

Game

The Game service provides various RPC methods for interacting with a soccer simulation.

Loading
sequenceDiagram
participant SS as SoccerSimulationServer
participant SP as SoccerSimulationProxy
participant PM as PlayMakerServer
Note over SS,PM: Run
SP->>SS: Connect
SS->>SP: OK, Unum
SS->>SP: ServerParam
SS->>SP: PlayerParam
SS->>SP: PlayerType (0)
SS->>SP: PlayerType (1)
SS->>SP: PlayerType (17)
SP->>PM: Register(RegisterRequest)
PM->>SP: RegisterResponse
SP->>PM: SendInitMessage(InitMessage)
PM->>SP: Empty
SP->>PM: SendServerParams(ServerParam)
PM->>SP: Empty
SP->>PM: SendPlayerParams(PlayerParam)
PM->>SP: Empty
SP->>PM: SendPlayerType(PlayerType(0))
PM->>SP: Empty
SP->>PM: SendPlayerType(PlayerType(1))
PM->>SP: Empty
SP->>PM: SendPlayerType(PlayerType(17))
PM->>SP: Empty
SS->>SP: Observation
Note over SP: Convert observation to State
SP->>PM: GetPlayerActions(State)
PM->>SP: PlayerActions
Note over SP: Convert Actions to Low-Level Commands
SP->>SS: Commands
Method Name Request Type Response Type Description
GetPlayerActions State PlayerActions
GetCoachActions State CoachActions
GetTrainerActions State TrainerActions
SendInitMessage InitMessage Empty
SendServerParams ServerParam Empty
SendPlayerParams PlayerParam Empty
SendPlayerType PlayerType Empty
Register RegisterRequest RegisterResponse
SendByeCommand RegisterResponse Empty
GetBestPlannerAction BestPlannerActionRequest BestPlannerActionResponse

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)