|
44 | 44 | MAX_VIEWPOINTS = 240 |
45 | 45 | MIN_NEW_CELLS = 6 |
46 | 46 | INITIAL_TRAVEL_COST_CELLS_PER_M = 12.0 |
47 | | -SWEEP_INFORMATION_DECAY_PER_M = 0.35 |
48 | | -SWEEP_NOVELTY_BONUS_CELLS_PER_M = 2.0 |
49 | | -SWEEP_NOVELTY_BONUS_MAX_M = 2.0 |
| 47 | +SWEEP_TRAVEL_COST_CELLS_PER_M = 1.0 |
| 48 | +SWEEP_NOVELTY_BONUS_CELLS_PER_M = 10.0 |
50 | 49 | SWEEP_BACKTRACK_PENALTY_CELLS = 12.0 |
51 | 50 | HANDLED_PERSON_ESTIMATED_DISTANCE_M = 1.5 |
52 | 51 | HANDLED_PERSON_VIEW_PENALTY_CELLS = 220.0 |
@@ -395,10 +394,9 @@ def _distance_from_observations(x: float, y: float, observations: list[dict]) -> |
395 | 394 |
|
396 | 395 |
|
397 | 396 | def _coverage_travel_utility(gain: int, route_distance_m: float, *, sweeping: bool) -> float: |
398 | | - """Score information against actual route cost without rewarding long trips.""" |
399 | | - if not sweeping: |
400 | | - return gain - INITIAL_TRAVEL_COST_CELLS_PER_M * route_distance_m |
401 | | - return gain / (1.0 + SWEEP_INFORMATION_DECAY_PER_M * route_distance_m) |
| 397 | + """Keep the first view local, then let coverage gain dominate route length.""" |
| 398 | + travel_cost = SWEEP_TRAVEL_COST_CELLS_PER_M if sweeping else INITIAL_TRAVEL_COST_CELLS_PER_M |
| 399 | + return gain - travel_cost * route_distance_m |
402 | 400 |
|
403 | 401 |
|
404 | 402 | def _backtrack_penalty(x: float, y: float, observations: list[dict]) -> float: |
@@ -534,7 +532,7 @@ def score_candidates(candidates: list[tuple[int, int]]) -> _View | None: |
534 | 532 | ) |
535 | 533 | score = ( |
536 | 534 | _coverage_travel_utility(gain, evaluation_distance, sweeping=bool(observations)) |
537 | | - + SWEEP_NOVELTY_BONUS_CELLS_PER_M * min(novelty, SWEEP_NOVELTY_BONUS_MAX_M) |
| 535 | + + SWEEP_NOVELTY_BONUS_CELLS_PER_M * novelty |
538 | 536 | - _backtrack_penalty(evaluation_x, evaluation_y, observations) |
539 | 537 | - 0.5 * _angular_distance(theta, pose.theta) |
540 | 538 | - person_view_penalty |
|
0 commit comments