brackt/app/services/simulations/__tests__
Chris Parsons a6bb1330e6
Fix darts simulator: bracket bug, ELO calibration, fallback Elo (#284)
* fix: lower darts ELO_DIVISOR to 400 and fallback Elo to 1400

ELO_DIVISOR 500 → 400: elite darts is more skill-dominated than the
previous setting implied. A 400-point gap now gives ~78% per-set win
probability (vs ~73% before).

fallbackElo 1600 → 1400: unseeded PDC World Championship entrants
(regional qualifiers, Q-School players) are materially weaker than
seeded tour professionals. 1400 better reflects that gap.

Combined effect: a dominant player (e.g. 2000 Elo vs 1400-1600 field)
now produces EV ≈ 65 instead of ≈ 30, which better matches expectations
for a top-ranked player in a 128-player bracket.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: lower darts ELO_DIVISOR to 200 for realistic EV distribution

With the actual PDC field (top players clustered 1800–1970 Elo, Littler at
~2080), ELO_DIVISOR=400 made the gap between world #1 and the top 8 too
soft — EV for Littler came out ~37 instead of the expected 65–70.

ELO_DIVISOR=200 calibrates correctly for this field: a 100-pt gap now
gives ~62% per-set win probability (vs ~56% at 400), sharply rewarding
the best players while still allowing upsets. Littler at 2084 produces
EV ≈ 65–70 against the real PDC tour roster.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: seed darts bracket by Elo instead of world ranking

World ranking (PDC Order of Merit) is prize-money-based and can diverge
from current skill — e.g. Kevin Doets (1818 Elo) was ranked 35th while
Joe Cullen (1667 Elo) held the 32nd seed. Seeding the weaker player and
leaving the stronger one unseeded contradicts the Elo-based match model.

Seeding by Elo descending ensures the 32 strongest players (by the same
metric used to compute match probabilities) get protected bracket positions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* revert: restore world-ranking-based seeding for darts bracket

Seeding should follow the PDC Order of Merit (world ranking), not Elo.
Reverts the previous Elo-seeding commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: interleave seeded and unseeded R1 pairs in darts bracket

Previously, all 32 seeded-vs-unseeded matches were added to r1Pairs
first (indices 0–31) and all 32 unseeded-vs-unseeded matches last
(indices 32–63). Since R2 pairs adjacent R1 winners, this created two
completely separate sub-brackets that only converged at the Final:
  - Seeded sub-bracket: top players eliminating each other early
  - Unseeded sub-bracket: high-Elo unseeded players (e.g. Doets 1818,
    Zonneveld 1806) steamrolling weak opponents and making the Final
    ~20% of the time

Fix: interleave each seeded match with its adjacent unseeded-vs-unseeded
match. Seeded pair i is at r1Pairs[2i], unseeded pair i is at r1Pairs[2i+1].
From R2 onwards, winners from seeded and unseeded regions now merge
correctly as in a real single-elimination bracket.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 00:47:47 -04:00
..
afl-simulator.test.ts Add AFL season + finals simulator (closes #126) (#204) 2026-03-22 01:57:39 -07:00
cs-major-simulator.test.ts Fix CS Major simulator bugs and accuracy issues (#276) 2026-04-07 17:28:24 -04:00
darts-simulator.test.ts Fix darts simulator: bracket bug, ELO calibration, fallback Elo (#284) 2026-04-09 00:47:47 -04:00
golf-simulator.test.ts Add golf qualifying points simulator (Plackett-Luce Monte Carlo) (#223) 2026-03-24 21:46:02 -07:00
llws-simulator.test.ts Add LLWS bracket Monte Carlo simulator (#280) 2026-04-08 16:52:10 -04:00
mlb-simulator.test.ts Rework MLB simulator: RDif-based matchup probs, 2026 data, fixes #227 (#228) 2026-03-25 19:05:12 -07:00
ncaa-football-simulator.test.ts Add NCAA Football CFP simulator (12-team bracket) (#278) 2026-04-08 09:48:32 -04:00
ncaam-simulator.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
ncaaw-simulator.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -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 NHL simulator seeding bugs and code quality issues (#281) 2026-04-08 21:33:33 -04: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 Add MLB playoff simulator with AL/NL division standings, fixes #121 (#225) 2026-03-25 08:47:02 -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 Add WNBA playoff simulator with SRS-based Elo ratings, fixes #125 (#231) 2026-03-26 00:34:51 -07:00
world-cup-simulator.test.ts Fix noisy and broken tests. 2026-03-31 15:53:43 -07:00