feat: overhaul hype scoring algorithm
- Period base: playoff OT escalates indefinitely (P4=600, P5=750…), reg season P4=5-min OT (600), P5=shootout (700) - Time priority range increased (max ~300 vs old ~120), calibrated to period length so 5-min reg season OT reads correctly - Matchup multiplier inverted: higher period = less weight (any OT is exciting regardless of teams) - Replace unconditional score_total with closeness bonus: rewards tight games regardless of goal volume (5-4 == 1-0 at same diff) - Power play bonus: 30 (P1/P2) → 50/100/150 (P3 by time) → 200 (OT) - Comeback bonus: one-time pulse (+50/75/100 by period) when trailing team scores to within 2 goals; keyed on team names, clears after firing, skips intermission Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,8 @@ def make_game(
|
||||
start_time_utc="2024-04-10T23:00:00Z",
|
||||
home_record="40-25-10",
|
||||
away_record="38-27-09",
|
||||
game_type=2,
|
||||
situation=None,
|
||||
):
|
||||
clock = {
|
||||
"timeRemaining": f"{seconds_remaining // 60:02d}:{seconds_remaining % 60:02d}",
|
||||
@@ -43,6 +45,8 @@ def make_game(
|
||||
"record": away_record,
|
||||
},
|
||||
"gameOutcome": {"lastPeriodType": "REG"},
|
||||
"gameType": game_type,
|
||||
**({"situation": situation} if situation is not None else {}),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user