brackt/app/services/simulations
Chris Parsons cbaab920f9
Add NBA playoff bracket Monte Carlo simulator (#154)
Adds a new `nba_bracket` simulator that projects both regular season
seedings and the full NBA playoff bracket, unlike other simulators that
operate on a pre-set bracket stored in the DB.

Algorithm:
- Per iteration: each team draws a conference seed (1–10) weighted by
  BBRef seed probabilities, then seeds 7–10 play the Play-In tournament
  (single elimination), then the resulting 8-team bracket is simulated
  as best-of-7 series using Elo playoff ratings
- Elo source: playoff rating (last 110 games, no regression to mean,
  postseason games weighted 3×) — appropriate for playoff matchup quality
- Seed probs source: Basketball-Reference (March 16, 2026), scaled from
  conditional to unconditional by multiplying by each team's Playoffs%

Placement tiers map to SimulationProbabilities:
  probFirst/Second → NBA champion / Finals loser
  probThird/Fourth → Conference Finals losers (2 per sim)
  probFifth–Eighth → Conference Semis losers (4 per sim)

Files:
- app/services/simulations/nba-simulator.ts (new)
- drizzle/0046_add_nba_bracket_simulator_type.sql (new)
- database/schema.ts: adds `nba_bracket` to simulatorTypeEnum
- app/services/simulations/registry.ts: registers NBASimulator

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 21:43:39 -07:00
..
__tests__ Add NCAAM and NCAAW bracket Monte Carlo simulators (#150) 2026-03-15 23:31:47 -07:00
auto-racing-simulator.ts Consolidate F1/IndyCar simulators into shared AutoRacingSimulator class (#151) 2026-03-16 12:22:08 -07:00
bracket-simulator.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
golf-simulator.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
nba-simulator.ts Add NBA playoff bracket Monte Carlo simulator (#154) 2026-03-16 21:43:39 -07:00
ncaam-simulator.ts Add NCAAM and NCAAW bracket Monte Carlo simulators (#150) 2026-03-15 23:31:47 -07:00
ncaaw-simulator.ts Fix UConn in NCAAW sim 2026-03-15 23:43:46 -07:00
registry.ts Add NBA playoff bracket Monte Carlo simulator (#154) 2026-03-16 21:43:39 -07:00
types.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
ucl-simulator.ts feat: add UCL bracket Monte Carlo simulator (#131) 2026-03-10 23:04:51 -07:00