feat: overhaul hype score algorithm with 9 hockey-driven improvements
- Empty net detection: pulled goalie triggers +150-250 bonus, stacks with PP - Playoff series importance: Game 7 Cup Final = 200, elimination games scale by round; fallback of 100 when series data unavailable - Period-aware score differential: 2-goal deficit penalty DECREASES in final 2 min of P3 (goalie-pull zone), 3+ goal games get harsher penalties late - Persistent comeback narrative: tracks max deficit, sustained bonus for 2+ goal recoveries instead of one-shot spike (0-3 to 3-3 = 150 persistent) - Shootout special handling: flat base 550 with no time component; ranks below dramatic close P3 games (skills competition, not hockey) - Multi-man advantage: parses situationCode for 5v3/4v3, applies 1.6x PP mult - Non-linear time priority: elapsed^1.5 curve weights final minutes more - Matchup multiplier rebalance: P1/P2 from 2.0/1.65 to 1.5, tiebreaker not dominant factor - Frontend gauge max raised from 700 to 1000 with adjusted color thresholds Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ def make_game(
|
||||
away_record="38-27-09",
|
||||
game_type=2,
|
||||
situation=None,
|
||||
series_status=None,
|
||||
):
|
||||
clock = {
|
||||
"timeRemaining": f"{seconds_remaining // 60:02d}:{seconds_remaining % 60:02d}",
|
||||
@@ -47,6 +48,7 @@ def make_game(
|
||||
"gameOutcome": {"lastPeriodType": "REG"},
|
||||
"gameType": game_type,
|
||||
**({"situation": situation} if situation is not None else {}),
|
||||
**({"seriesStatus": series_status} if series_status is not None else {}),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user