brackt/drizzle/meta/_journal.json
Chris Parsons 8c3663e01b
Add PDC World Darts Championship simulator with Elo-based bracket (#248)
Fixes #123

* Add PDC World Darts Championship simulator (128-player bracket)

- New DartsSimulator: 128-player single-elimination, 7 rounds with
  PDC-accurate best-of-sets formats (bo3/bo5/bo5/bo7/bo7/bo11/bo13).
  ELO_DIVISOR=500 via set-level Bernoulli model. Two simulation paths:
  Path A (bracket drawn) simulates from actual DB matches; Path B
  (pre-bracket) seeds top 32 by world ranking in fixed positions and
  randomly draws the remaining 96 per simulation run (50,000 iterations).
- darts_bracket added to simulatorTypeEnum and simulator registry.
- world_ranking nullable integer column added to participant_expected_values
  (migration 0067); batchSaveSourceElos now accepts and persists it.
- Admin route /admin/sports-seasons/:id/darts-elo: bulk import with format
  "Player Name, 2099, 1" (name, Elo, optional world ranking), fuzzy name
  matching, auto-runs simulation and updates EV/snapshots on save.
- DARTS_128 bracket template added (scoring starts at Quarterfinals).
- 30 unit tests: math helpers, bracket seeding structure, Path A/B integration.

https://claude.ai/code/session_01WZ6FjMmC2eBeZ1564M9Ruz

* Review fixes: pre-compute hot-loop invariants, import normalizeName

- Pre-compute seededSlots and getSeededMatchOrder(32) before the 50k
  simulation loop — was being recomputed every iteration
- Pad unseeded pool to 96 once before the loop instead of inside it
- Inline bracket-building in the hot loop using pre-computed seededSlots;
  removes the per-iteration call to buildR1Bracket/getSeededMatchOrder
- Remove dead SEEDED_R1_PAIRS constant (was never referenced)
- Import normalizeName from ~/lib/fuzzy-match instead of redefining it locally

https://claude.ai/code/session_01WZ6FjMmC2eBeZ1564M9Ruz

* Fix lint failures: unused vars, eqeqeq, toSorted

- Remove unused seededSet/unseededSet variables in test
- Replace != null with !== null && !== undefined (eqeqeq rule)
- Replace .sort() with .toSorted() in simulator and route (unicorn/no-array-sort)

https://claude.ai/code/session_01WZ6FjMmC2eBeZ1564M9Ruz

* Fix TS2552: restore seededSet declaration removed during lint fix

https://claude.ai/code/session_01WZ6FjMmC2eBeZ1564M9Ruz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-31 15:37:28 -07:00

482 lines
No EOL
9.9 KiB
JSON

{
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1732076135211,
"tag": "0000_short_donald_blake",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1760165302772,
"tag": "0001_serious_la_nuit",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1760166775427,
"tag": "0002_tired_iron_man",
"breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1760167848365,
"tag": "0003_public_shadowcat",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1760168383812,
"tag": "0004_spicy_zarda",
"breakpoints": true
},
{
"idx": 5,
"version": "7",
"when": 1760169537260,
"tag": "0005_abnormal_thunderbird",
"breakpoints": true
},
{
"idx": 6,
"version": "7",
"when": 1760241924414,
"tag": "0006_needy_junta",
"breakpoints": true
},
{
"idx": 7,
"version": "7",
"when": 1760327817376,
"tag": "0007_pink_nebula",
"breakpoints": true
},
{
"idx": 8,
"version": "7",
"when": 1760375514773,
"tag": "0008_salty_trauma",
"breakpoints": true
},
{
"idx": 9,
"version": "7",
"when": 1760392647508,
"tag": "0009_fuzzy_korvac",
"breakpoints": true
},
{
"idx": 10,
"version": "7",
"when": 1760469105799,
"tag": "0010_complex_the_stranger",
"breakpoints": true
},
{
"idx": 11,
"version": "7",
"when": 1760501621605,
"tag": "0011_gifted_mystique",
"breakpoints": true
},
{
"idx": 12,
"version": "7",
"when": 1760504208398,
"tag": "0012_yielding_phil_sheldon",
"breakpoints": true
},
{
"idx": 13,
"version": "7",
"when": 1760543654915,
"tag": "0013_pink_the_order",
"breakpoints": true
},
{
"idx": 14,
"version": "7",
"when": 1760588333462,
"tag": "0014_lowly_gateway",
"breakpoints": true
},
{
"idx": 15,
"version": "7",
"when": 1760589195551,
"tag": "0015_exotic_loners",
"breakpoints": true
},
{
"idx": 16,
"version": "7",
"when": 1760590495868,
"tag": "0016_majestic_roulette",
"breakpoints": true
},
{
"idx": 17,
"version": "7",
"when": 1760599350154,
"tag": "0017_calm_zarda",
"breakpoints": true
},
{
"idx": 18,
"version": "7",
"when": 1760996053371,
"tag": "0018_numerous_stardust",
"breakpoints": true
},
{
"idx": 19,
"version": "7",
"when": 1761112236540,
"tag": "0019_acoustic_ben_grimm",
"breakpoints": true
},
{
"idx": 20,
"version": "7",
"when": 1761719248881,
"tag": "0020_slim_spacker_dave",
"breakpoints": true
},
{
"idx": 21,
"version": "7",
"when": 1762190473418,
"tag": "0021_fair_ser_duncan",
"breakpoints": true
},
{
"idx": 22,
"version": "7",
"when": 1762191156317,
"tag": "0022_shiny_mother_askani",
"breakpoints": true
},
{
"idx": 23,
"version": "7",
"when": 1762200550705,
"tag": "0023_cynical_jack_power",
"breakpoints": true
},
{
"idx": 24,
"version": "7",
"when": 1763276901482,
"tag": "0024_faithful_mesmero",
"breakpoints": true
},
{
"idx": 25,
"version": "7",
"when": 1763277000000,
"tag": "0025_rename_participant_ev_season_to_sports_season",
"breakpoints": true
},
{
"idx": 26,
"version": "7",
"when": 1763278000000,
"tag": "0026_add_source_odds_to_participant_ev",
"breakpoints": true
},
{
"idx": 27,
"version": "7",
"when": 1763279000000,
"tag": "0027_add_projected_points_to_team_standings",
"breakpoints": true
},
{
"idx": 28,
"version": "7",
"when": 1763280000000,
"tag": "0028_add_tournament_groups",
"breakpoints": true
},
{
"idx": 29,
"version": "7",
"when": 1763281000000,
"tag": "0029_change_participant_ev_to_decimal",
"breakpoints": true
},
{
"idx": 30,
"version": "7",
"when": 1763282000000,
"tag": "0030_add_draft_picks_unique_slot",
"breakpoints": true
},
{
"idx": 31,
"version": "7",
"when": 1763283000000,
"tag": "0031_add_autodraft_queue_only",
"breakpoints": true
},
{
"idx": 32,
"version": "7",
"when": 1763284000000,
"tag": "0032_consolidate_playoff_pattern",
"breakpoints": true
},
{
"idx": 33,
"version": "7",
"when": 1763285000000,
"tag": "0033_add_schedule_event_type",
"breakpoints": true
},
{
"idx": 34,
"version": "7",
"when": 1763286000000,
"tag": "0034_add_ev_snapshots",
"breakpoints": true
},
{
"idx": 35,
"version": "7",
"when": 1763287000000,
"tag": "0035_increase_prob_precision",
"breakpoints": true
},
{
"idx": 36,
"version": "7",
"when": 1763288000000,
"tag": "0036_increase_ev_precision",
"breakpoints": true
},
{
"idx": 37,
"version": "7",
"when": 1763289000000,
"tag": "0037_add_simulator_type_to_sports",
"breakpoints": true
},
{
"idx": 38,
"version": "7",
"when": 1773122866361,
"tag": "0038_sad_wilson_fisk",
"breakpoints": true
},
{
"idx": 39,
"version": "7",
"when": 1773200000000,
"tag": "0039_add_ucl_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 40,
"version": "7",
"when": 1773262080928,
"tag": "0040_fat_puma",
"breakpoints": true
},
{
"idx": 41,
"version": "7",
"when": 1773557500336,
"tag": "0041_great_magma",
"breakpoints": true
},
{
"idx": 42,
"version": "7",
"when": 1773600000000,
"tag": "0042_migrate_event_date_to_starts_at",
"breakpoints": true
},
{
"idx": 43,
"version": "7",
"when": 1773634394633,
"tag": "0043_demonic_vanisher",
"breakpoints": true
},
{
"idx": 44,
"version": "7",
"when": 1773700000000,
"tag": "0044_add_ncaam_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 45,
"version": "7",
"when": 1773710000000,
"tag": "0045_add_ncaaw_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 46,
"version": "7",
"when": 1773720000000,
"tag": "0046_add_nba_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 47,
"version": "7",
"when": 1773730000000,
"tag": "0047_fix_nba_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 48,
"version": "7",
"when": 1773765768905,
"tag": "0048_eager_songbird",
"breakpoints": true
},
{
"idx": 49,
"version": "7",
"when": 1773800000000,
"tag": "0049_add_admin_picked_by_type",
"breakpoints": true
},
{
"idx": 50,
"version": "7",
"when": 1773821310661,
"tag": "0050_chief_peter_quill",
"breakpoints": true
},
{
"idx": 51,
"version": "7",
"when": 1773900000000,
"tag": "0051_add_standings_snapshot_unique_index",
"breakpoints": true
},
{
"idx": 52,
"version": "7",
"when": 1773897678653,
"tag": "0052_new_warbird",
"breakpoints": true
},
{
"idx": 53,
"version": "7",
"when": 1773903201189,
"tag": "0053_smooth_kingpin",
"breakpoints": true
},
{
"idx": 54,
"version": "7",
"when": 1774070769112,
"tag": "0054_massive_vulcan",
"breakpoints": true
},
{
"idx": 55,
"version": "7",
"when": 1774072156237,
"tag": "0055_special_vampiro",
"breakpoints": true
},
{
"idx": 56,
"version": "7",
"when": 1774167142673,
"tag": "0056_jittery_the_fallen",
"breakpoints": true
},
{
"idx": 57,
"version": "7",
"when": 1774239259550,
"tag": "0057_cultured_doctor_doom",
"breakpoints": true
},
{
"idx": 58,
"version": "7",
"when": 1774310000000,
"tag": "0058_add_unique_participant_ev",
"breakpoints": true
},
{
"idx": 59,
"version": "7",
"when": 1774329951326,
"tag": "0059_mysterious_jack_murdock",
"breakpoints": true
},
{
"idx": 60,
"version": "7",
"when": 1774330910098,
"tag": "0060_omniscient_outlaw_kid",
"breakpoints": true
},
{
"idx": 61,
"version": "7",
"when": 1774410244601,
"tag": "0061_violet_mephistopheles",
"breakpoints": true
},
{
"idx": 62,
"version": "7",
"when": 1774500000000,
"tag": "0062_add_mlb_bracket_simulator_type",
"breakpoints": true
},
{
"idx": 63,
"version": "7",
"when": 1774504559479,
"tag": "0063_bored_ultimo",
"breakpoints": true
},
{
"idx": 64,
"version": "7",
"when": 1774598151282,
"tag": "0064_fuzzy_wolfsbane",
"breakpoints": true
},
{
"idx": 65,
"version": "7",
"when": 1774719902130,
"tag": "0065_kind_mantis",
"breakpoints": true
},
{
"idx": 66,
"version": "7",
"when": 1774802533652,
"tag": "0066_stiff_siren",
"breakpoints": true
},
{
"idx": 67,
"version": "7",
"when": 1774900000000,
"tag": "0067_darts_bracket",
"breakpoints": true
}
]
}