You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.
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:
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:
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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:
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.
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.
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.
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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:
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.
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.
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.
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.
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.
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.
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.