Files
sor/Server
27e1b7c8a3 Implement AI Phase 3: MCTS engine, ELO tracking, self-play, calibration
- MCTS (UCT) decision engine for difficulty tiers 6-8 (MctsNode, MctsSimulator,
  MonteCarloEngine); tiers 6-8 updated from Heuristic → MCTS in AiDifficultyProfiles
- AiEloService: separate ELO ledger for AI accounts (ai_elo_records table)
  so calibration games don't pollute the human RankScore leaderboard
- FinalizeGameAsync / FinalizeMultiPlayerGameAsync: AI accounts are now guarded
  from RankScore and OriginPoints adjustments (IsAi check)
- AiPlayerSessionManager: async GameEnded handler calls AiEloService
- SelfPlayRunner: pure in-process AI vs AI game loop (no DB, no NATS)
- SelfPlayOrchestrator: batch runner loading real decks from DB, parallel games
- FeatureExtractor: GameState → float[1024] feature vector for ML training
- GameReplayExporter: replays completed sessions → TrainingRecord JSONL
- TrainingDataWriter: async JSONL writer
- AiCalibrationJob: pairwise self-play calibration (D1vD2…D9vD10), writes
  AiCalibrationRun rows to GameDbContext
- EF migration: ai_elo_records + ai_calibration_runs tables applied to remote DB
- SOR.Admin: references SOR.Ai; new AI section in NavMenu with ELO Leaderboard
  and Calibration pages; SelfPlayOrchestrator + AiCalibrationJob registered

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-12 18:35:23 -04:00
..
2026-04-12 13:36:37 -04:00