@@ -41,6 +41,7 @@ message AiConfig
4141 required DefensePlayConfig defense_play_config = 11 ;
4242 required RobotNavigationObstacleConfig robot_navigation_obstacle_config = 12 ;
4343 required AiParameterConfig ai_parameter_config = 13 ;
44+ required ReceiverTacticConfig receiver_tactic_config = 14 ;
4445}
4546
4647message AiControlConfig
@@ -64,12 +65,34 @@ message AttackerTacticConfig
6465 // The radius of the circle around a friendly robot around which
6566 // we think an enemy is about to steal the ball
6667 required double enemy_about_to_steal_ball_radius = 1
67- [default = 0.1 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 4.0 ];
68+ [default = 0.4 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 4.0 ];
6869
6970 // The minimum open angle to the goal that we require before taking a shot
7071 required double min_open_angle_for_shot_deg = 2 [
7172 default = 6.0 ,
72- (bounds).min_double_value = 0.0 ,
73+ (bounds).min_double_value = 0.1 ,
74+ (bounds).max_double_value = 90.0
75+ ];
76+ }
77+
78+ message ReceiverTacticConfig
79+ {
80+ // Whether one touch kicks should be enabled or not
81+ required bool enable_one_touch_kick = 1 [default = true ];
82+
83+ // The minimum open angle to the goal that we require before taking a one touch kick
84+ required double min_open_angle_for_one_touch_deg = 2 [
85+ default = 6.0 ,
86+ (bounds).min_double_value = 0.1 ,
87+ (bounds).max_double_value = 90.0
88+ ];
89+
90+ // TODO (#2570): try to make it as big as possible when tuning
91+ // The maximum deflection angle that we will attempt a one-touch kick towards the
92+ // enemy goal
93+ required double max_deflection_for_one_touch_deg = 3 [
94+ default = 60.0 ,
95+ (bounds).min_double_value = 10.0 ,
7396 (bounds).max_double_value = 90.0
7497 ];
7598}
@@ -84,6 +107,52 @@ message CornerKickPlayConfig
84107
85108message PassingConfig
86109{
110+ // Note that the order the fields are defined here is the order that
111+ // they are displayed in Thunderscope's Parameters widget, and the order
112+ // is independent of the field's numbering.
113+
114+ reserved 8 , 5 ;
115+
116+ /***** Pass generation parameters *****/
117+ // The number of passes to sample per robot.
118+ required uint32 pass_gen_num_samples_per_robot = 21
119+ [default = 5 , (bounds).min_int_value = 1 , (bounds).max_int_value = 100 ];
120+ // The minimum standard deviation (in meters) of the normal sampling distribution
121+ // used to generate passes around robots. This STD is used when the robot is
122+ // stationary.
123+ required double pass_gen_min_rand_sample_std_dev_meters = 22 [
124+ default = 0.4 ,
125+ (bounds).min_double_value = 0.01 ,
126+ (bounds).max_double_value = 3.0
127+ ];
128+ // The rate of growth of the STD as the robot velocity increases.
129+ required double pass_gen_rand_sample_std_dev_robot_vel_multiplier = 23 [
130+ default = 0.15 ,
131+ (bounds).min_double_value = 0.0 ,
132+ (bounds).max_double_value = 0.5
133+ ];
134+ // The rate of growth of the distance offset of the center of the normal
135+ // distribution as the robot velocity increases. If set to 0, the center
136+ // of the sampled receiving positions will be the same as the robot's position.
137+ required double pass_gen_rand_sample_center_robot_vel_multiplier = 24
138+ [default = 0.3 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 1.0 ];
139+ // The minimum pass speed (in m/s)
140+ required double min_pass_speed_m_per_s = 6
141+ [default = 2.0 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 5.0 ];
142+ // The maximum pass speed (in m/s)
143+ required double max_pass_speed_m_per_s = 7 [
144+ default = 6.0 ,
145+ (bounds).min_double_value = 0.0 ,
146+ (bounds).max_double_value = 10.0
147+ ];
148+ // The max speed at which a pass should be received
149+ required double max_receive_speed_m_per_s = 11
150+ [default = 2.0 , (bounds).min_double_value = 1.0 , (bounds).max_double_value = 4.0 ];
151+ // The number of steps of gradient descent to perform in each iteration
152+ required int32 number_of_gradient_descent_steps_per_iter = 9
153+ [default = 2 , (bounds).min_int_value = 0 , (bounds).max_int_value = 100 ];
154+
155+ /***** Cost function parameters *****/
87156 // The offset from the sides of the field to place the rectangular
88157 // sigmoid we use to determine what areas to pass to
89158 required double static_field_position_quality_x_offset = 1
@@ -97,45 +166,108 @@ message PassingConfig
97166 // to the goal having less of an effect.
98167 required double static_field_position_quality_friendly_goal_distance_weight = 3
99168 [default = 0.3 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 1.0 ];
169+ // The estimated delay in seconds between the time we commit to a pass and the time
170+ // the pass is taken.
171+ required double pass_delay_sec = 12
172+ [default = 0.3 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 1.0 ];
173+ // The extra time added to the minimum time that it will take a friendly
174+ // robot to reach the receiving position and orientation.
175+ required double friendly_time_to_receive_slack_sec = 13
176+ [default = 0.1 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 1.0 ];
100177 // This controls how heavily we weigh an enemy robot being near the pass
101178 // receiver when calculating enemy risk to a pass
102179 required double enemy_proximity_importance = 4 [
103180 default = 0.5 ,
104- (bounds).min_double_value = 0.0 ,
181+ (bounds).min_double_value = 0.01 ,
105182 (bounds).max_double_value = 10.0
106183 ];
107- // The maximum angle that we have to rotate after receiving a pass to
108- // shoot that we think would likely result in a goal. Note that we may
109- // try to take shots that require us to rotate more then this, it's more
110- // of a soft limit.
111- required double ideal_max_rotation_to_shoot_degrees = 5 [
112- default = 60.0 ,
184+ // A value multiplied by the duration that our enemy robot model predicts will
185+ // take an enemy robot to intercept a pass. 1 implies that our enemy robot model
186+ // is exactly correct, with higher values meaning that the enemy will take longer
187+ // to intercept the pass, and lower values meaning that the enemy will intercept
188+ // the pass earlier than we anticipate.
189+ required double enemy_interception_time_multiplier = 14 [
190+ default = 1.0 ,
113191 (bounds).min_double_value = 0.0 ,
114- (bounds).max_double_value = 180 .0
192+ (bounds).max_double_value = 10 .0
115193 ];
116- // The minimum pass speed (in m/s)
117- required double min_pass_speed_m_per_s = 6
118- [default = 1 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 5.0 ];
119- // The maximum pass speed (in m/s)
120- required double max_pass_speed_m_per_s = 7 [
121- default = 6.0 ,
194+ // This controls how heavily we weigh the time the enemy team has to intercept a pass.
195+ // Increasing this value increases the risk (decreasing the score) associated with a
196+ // pass that the enemy could intercept.
197+ required double enemy_interception_risk_importance = 15 [
198+ default = 4.0 ,
122199 (bounds).min_double_value = 0.0 ,
123- (bounds).max_double_value = 10 .0
200+ (bounds).max_double_value = 20 .0
124201 ];
125- // How long we think the enemy will take to recognize we're passing and start
126- // moving to intercept
127- required double enemy_reaction_time = 8
128- [default = 0.4 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 3.0 ];
129- // The number of steps of gradient descent to perform in each iteration
130- required int32 number_of_gradient_descent_steps_per_iter = 9
131- [default = 2 , (bounds).min_int_value = 0 , (bounds).max_int_value = 100 ];
132- // Cost visualization parameters
202+ // The distance in meters along the x-axis from the passer that we prefer the receiver
203+ // to be when receiving a pass on the friendly half. Note that this is a soft limit
204+ // and the receiver may be further back.
205+ required double backwards_pass_distance_meters = 16 [
206+ default = -1.0 ,
207+ (bounds).min_double_value = -10.0 ,
208+ (bounds).max_double_value = 5.0
209+ ];
210+ // The max distance in meters that the receiver can be from the passer when receiving
211+ // a pass.
212+ required double receiver_ideal_max_distance_meters = 17 [
213+ default = 10.0 ,
214+ (bounds).min_double_value = 0.1 ,
215+ (bounds).max_double_value = 20.0
216+ ];
217+ // The min distance in meters that the receiver can be from the passer when receiving
218+ // a pass.
219+ required double receiver_ideal_min_distance_meters = 18 [
220+ default = 1.5 ,
221+ (bounds).min_double_value = 0.1 ,
222+ (bounds).max_double_value = 20.0
223+ ];
224+ // The minimum open angle (in degrees) for an ideal shot on enemy goal from the
225+ // receiver's position. Any angle greater than this is also considered ideal, where as
226+ // angles below this are considered less ideal and are given a lower score.
227+ required double min_ideal_pass_shoot_goal_open_angle_deg = 19 [
228+ default = 10.0 ,
229+ (bounds).min_double_value = 1.0 ,
230+ (bounds).max_double_value = 45.0
231+ ];
232+ // The min score that ratePassShootScore return. Used to limit the cost function
233+ // from returning a very low score, causing the rest of the cost functions to be
234+ // ignored.
235+ required double min_pass_shoot_score = 20
236+ [default = 0.5 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 1.0 ];
237+
238+ /***** Visualization parameters *****/
239+ // Cost function visualization parameters
133240 required CostVisualizationConfig cost_vis_config = 10 ;
134- // The max speed at which a pass should be received
135- required double max_receive_speed = 11
136- [default = 2.0 , (bounds).min_double_value = 1.0 , (bounds).max_double_value = 4.0 ];
137- required double backwards_pass_distance = 13
138- [default = 0.5 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 2.0 ];
241+ // Pass generator visualization parameters
242+ required PassGeneratorVisualizationConfig pass_gen_vis_config = 25 ;
243+
244+ /***** Receiver position generation parameters *****/
245+ required ReceiverPositionGeneratorConfig receiver_position_generator_config = 26 ;
246+ }
247+
248+ message ReceiverPositionGeneratorConfig
249+ {
250+ // A multiplier to incentivize using the same receiver position as the previous
251+ // iteration
252+ required double previous_best_receiver_position_score_multiplier = 1
253+ [default = 1.5 , (bounds).min_double_value = 1.0 , (bounds).max_double_value = 3.0 ];
254+ // The number of samples to generate initially for each zone to get a sense of the
255+ // best zones.
256+ required uint32 num_initial_samples_per_zone = 2
257+ [default = 5 , (bounds).min_int_value = 1 , (bounds).max_int_value = 100 ];
258+ // The number of additional samples to generate for the top zones after the initial
259+ // samples. Used to get a more accurate max score.
260+ required uint32 num_additional_samples_per_top_zone = 3
261+ [default = 20 , (bounds).min_int_value = 1 , (bounds).max_int_value = 100 ];
262+ // The minimum angle (in degrees) between a receiver, the ball, and a previously
263+ // selected receiver.
264+ required double min_angle_between_receivers_deg = 4 [
265+ default = 20.0 ,
266+ (bounds).min_double_value = 0.0 ,
267+ (bounds).max_double_value = 45.0
268+ ];
269+
270+ required ReceiverPositionGeneratorVisualizationConfig receiver_vis_config = 5 ;
139271}
140272
141273message GoalieTacticConfig
@@ -246,6 +378,14 @@ message ShootOrPassPlayConfig
246378 (bounds).max_double_value = 1.0
247379 ];
248380
381+ // The minimum pass quality we're willing to attempt before ramping
382+ // down the score to abs_min_pass_score
383+ required double min_perfect_pass_score = 6 [
384+ default = 0.85 ,
385+ (bounds).min_double_value = 0.0 ,
386+ (bounds).max_double_value = 1.0
387+ ];
388+
249389 // When we're choosing a pass, we start by looking for a pass with a perfect score
250390 // of 1, and then over time lower the score we're will to accept. This parameter
251391 // how fast we ramp down to abs_min_pass_score. This is in seconds.
@@ -254,11 +394,11 @@ message ShootOrPassPlayConfig
254394
255395 // threshold to decide if the ball has been kicked by a robot
256396 required double ball_shot_threshold = 3
257- [default = 4 .0 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 5.0 ];
397+ [default = 1 .0 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 5.0 ];
258398
259399 // threshold to decide if the ball has been kicked by a robot
260400 required double min_distance_to_pass = 4
261- [default = 0.1 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 1.0 ];
401+ [default = 0.2 , (bounds).min_double_value = 0.0 , (bounds).max_double_value = 1.0 ];
262402
263403 // threshold for the distance between passer and receiver
264404 required double short_pass_threshold = 5
@@ -423,10 +563,28 @@ message CostVisualizationConfig
423563 required int32 num_cols = 2
424564 [default = 45 , (bounds).min_int_value = 1 , (bounds).max_int_value = 100 ];
425565 // cost functions
426- required bool static_position_quality = 3 [default = false ];
566+ required bool static_position_quality = 3 [default = false ];
567+ required bool pass_forward_quality = 7 [default = false ];
568+ required bool pass_not_too_close_quality = 8 [default = false ];
569+
427570 required bool pass_friendly_capability = 4 [default = false ];
428571 required bool pass_enemy_risk = 5 [default = false ];
429572 required bool pass_shoot_score = 6 [default = false ];
573+ required bool enemy_proximity_risk = 9 [default = false ];
574+ required bool enemy_interception_risk = 10 [default = false ];
575+
576+ required bool passer_position_score = 11 [default = false ];
577+ required bool receiver_position_score = 12 [default = false ];
578+ }
579+
580+ message PassGeneratorVisualizationConfig
581+ {
582+ required bool visualize_sampled_passes = 1 [default = false ];
583+ }
584+
585+ message ReceiverPositionGeneratorVisualizationConfig
586+ {
587+ required bool visualize_best_receiving_positions_and_zones = 1 [default = false ];
430588}
431589
432590message PossessionTrackerConfig
0 commit comments