brackt/app/services/simulations/__tests__
Claude 24de966b3b
Unify simulator strength on a single blended Elo
Replace the two parallel odds/Elo mechanisms with one model: every strength
source (raw Elo, projected wins, projected table points, futures odds) converts
to an Elo, those blend by weight into a single Elo, and that one Elo feeds every
simulator. This supersedes the earlier source-priority + per-match probability
blend approach.

Resolution (app/services/simulations/input-policy.ts):
- SimulatorInputPolicy gains baseEloPriority (order among the substitutable base
  sources: raw Elo / projected wins / projected table points) and oddsWeight
  (0–1). resolveSourceElos/resolveRatings now compute baseElo, derive an
  odds Elo via convertFuturesToElo, and blend: 0 = base only, 1 = futures
  override, between = weighted blend (method "blend").
- Drops the odds-inclusive sourceEloPriority and the prefersFuturesOdds helper.

Simulators consume the single resolved Elo:
- UCL, World Cup, NCAA Football, MLB drop their separate normalized-odds signal,
  convertFuturesToElo calls, and per-match probability blend; they read the
  resolved sourceElo (preserving each sim's hardcoded fallback Elo table). The
  optional SimulationContext oddsWeight plumbing (types.ts/runner.ts) is removed.
- UCL is routed through the central blend (requiredInputs sourceElo, derivable
  from sourceOdds) so any entered Elo and futures blend uniformly.
- College hockey already blends odds into Elo internally (and uses NPI rank the
  central resolver can't), so its central oddsWeight is set to 0 to avoid
  double-counting; the simulator is unchanged.

Manifest: per-profile oddsWeight defaults (World Cup/UCL/MLB 0.3, NCAA FB 0.4,
college hockey 0; global default 0.3).

UI: the Input Policy card exposes one "Futures vs. Elo — Odds Blend Weight"
control; the /admin/simulators inventory badge shows the effective blend
("Elo only" / "NN% blend" / "overrides Elo") with the odds participant count.

Tests: input-policy blend math (0/0.5/1) for Elo and ratings, baseEloPriority
and oddsWeight parsing/clamping, manifest per-profile weights; obsolete
source-priority and oddsWeight-context tests removed/replaced.

Note: this intentionally shifts the calibrated EV outputs of the four sims that
previously blended at the probability level (accepted in design discussion).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhNeB7gN6VKene7sdbBVQT
2026-06-26 01:39:12 +00:00
..
afl-simulator.test.ts Add projected-wins input mode to admin Elo Ratings page (#306) 2026-04-17 12:40:08 -07:00
auto-racing-simulator.test.ts claude/trusting-heisenberg-r6xnfi (#90) 2026-06-15 03:34:44 +00:00
brackt-simulator.test.ts Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
college-hockey-simulator.test.ts Fix college hockey bracket resolution (#396) 2026-05-08 12:29:39 -07:00
cs-major-simulator.test.ts Unify majors: score once, fan out across windows + tennis bracket EV 2026-06-22 20:32:22 -07:00
darts-simulator.test.ts Fix simulator correctness bugs and reduce test iteration counts (#61) 2026-05-31 17:39:43 +00:00
epl-simulator.test.ts Fix simulator correctness bugs and reduce test iteration counts (#61) 2026-05-31 17:39:43 +00:00
golf-simulator.test.ts Add not-participating exclusion support for event results (#446) 2026-05-19 11:13:32 -07:00
input-policy.test.ts Unify simulator strength on a single blended Elo 2026-06-26 01:39:12 +00:00
llws-simulator.test.ts Fix MLB standings 406 error and refactor ESPN adapter shared code (#62) 2026-06-01 03:31:18 +00:00
manifest.test.ts Unify simulator strength on a single blended Elo 2026-06-26 01:39:12 +00:00
mlb-simulator.test.ts Fix MLB simulator: projected wins drive seeding, perf fix, + surface simulate errors (#65) 2026-06-01 20:50:03 +00:00
mls-simulator.test.ts Add MLS standings sync and fix simulator conference resolution (#423) 2026-05-14 15:39:40 -07:00
nba-simulator.test.ts fix: NBA play-in bracket advancement bugs (#292) 2026-04-12 22:25:32 -07:00
ncaa-football-simulator.test.ts Unify simulator strength on a single blended Elo 2026-06-26 01:39:12 +00:00
ncaam-simulator.test.ts Upgrade NCAA preseason simulators (#419) 2026-05-12 22:26:25 -07:00
ncaaw-simulator.test.ts Upgrade NCAA preseason simulators (#419) 2026-05-12 22:26:25 -07:00
nfl-simulator.test.ts Add NFL season + playoffs Monte Carlo simulator (#272) 2026-04-07 09:39:34 -04:00
nhl-simulator.test.ts Fix simulator brackets: NHL bracket-aware mode, MLB/NBA/WNBA sourceElo support (#358) 2026-04-30 08:33:57 -07:00
nll-simulator.test.ts Add NLL box lacrosse simulator implementation plan and preseason-draftability guidance (#417) 2026-05-12 14:22:34 -07:00
runner.test.ts Unify futures odds with the simulation system 2026-06-25 22:11:32 +00:00
simulator-config.test.ts Fix college hockey bracket resolution (#396) 2026-05-08 12:29:39 -07:00
snooker-simulator.test.ts Add snooker bracket simulator and Elo ratings admin UI, fixes #119 2026-03-23 08:24:28 -07:00
tennis-simulator.test.ts Unify majors: score once, fan out across windows + tennis bracket EV 2026-06-22 20:32:22 -07:00
ucl-simulator.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
wnba-simulator.test.ts Fix simulator brackets: NHL bracket-aware mode, MLB/NBA/WNBA sourceElo support (#358) 2026-04-30 08:33:57 -07:00
world-cup-simulator.test.ts Reflect group stage in World Cup sim; seed R32 from real 2026 bracket 2026-06-23 12:15:45 -07:00