File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,10 @@ impl SearchSuggestor {
9494 if let Some ( some_suggested_search_index) = suggested_search_index {
9595 self . heatmap . has_decided_for_heatmap_tile = true ;
9696 let max_heatmap_value = self . heatmap . map [ some_suggested_search_index] ;
97- self . heatmap . heat_change_threshold = max_heatmap_value * 0.8 ; // TODO: make parameter
97+ self . heatmap . heat_change_threshold = max_heatmap_value
98+ * context
99+ . search_suggestor_configuration
100+ . tile_target_heat_threshold_factor ; // TODO: make parameter
98101 }
99102 self . heatmap . last_maximum_heatmap_position = suggested_search_index;
100103 } else {
@@ -191,7 +194,9 @@ impl SearchSuggestor {
191194 1.0 ,
192195 ) ;
193196 if is_inside_sight && distancse_to_tile > 0.25 {
194- * value *= 1.0 - 0.05 * relative_distance_to_tile;
197+ * value *= 1.0
198+ - context. search_suggestor_configuration . decay_distance_factor
199+ * relative_distance_to_tile;
195200 }
196201 } ) ;
197202 }
Original file line number Diff line number Diff line change @@ -428,6 +428,8 @@ pub struct SearchSuggestorParameters {
428428 pub own_ball_weight : f32 ,
429429 pub team_ball_weight : f32 ,
430430 pub rule_ball_weight : f32 ,
431+ pub decay_distance_factor : f32 ,
432+ pub tile_target_heat_threshold_factor : f32 ,
431433}
432434
433435#[ derive(
Original file line number Diff line number Diff line change 16141614 "minimum_validity" : 0.01 ,
16151615 "own_ball_weight" : 1.0 ,
16161616 "team_ball_weight" : 1.0 ,
1617- "rule_ball_weight" : 1.0
1617+ "rule_ball_weight" : 1.0 ,
1618+ "decay_distance_factor" : 0.05 ,
1619+ "tile_target_heat_threshold_factor" : 0.5
16181620 },
16191621 "physical_constants" : {
16201622 "gravity_acceleration" : 9.81
You can’t perform that action at this time.
0 commit comments