M2: бот и headless-прогон матчей

- PlayerView: проекция состояния, в которой боту видно только то,
  что видно живому игроку (своя рука, стол, размеры чужих рук, счётчики)
- BasicBot: политика из GAMEPLAY.md, полностью детерминированная
- Match: обёртка с состоянием и подпиской на события (её же возьмёт UI)
- runMatch: прогон матча без движка и без таймеров
- soak-тесты: 3500 полных матчей (боты и случайные легальные ходы,
  2-4 игрока), инварианты состояния проверяются после каждого действия
- npm run stats:bot — распределение исходов самоигры

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
ftc
2026-09-13 10:43:06 +03:00
co-authored by Claude Opus 5
parent fddab60527
commit c60fbcbb94
19 changed files with 927 additions and 13 deletions
+5 -5
View File
@@ -44,11 +44,11 @@ progress. The Cocos layer only renders state and turns taps into actions.
- [x] End conditions and loser ("fool") determination
- [x] Unit tests covering every rule clause, including the add-card limits
### M2 — Bot and headless match runner `[ ]`
- [ ] `PlayerView` projection — a bot sees only what a player legitimately sees
- [ ] `BasicBot` exactly per GAMEPLAY.md "Basic bot"
- [ ] `MatchRunner` driving a full headless match
- [ ] Soak test: thousands of seeded self-play matches finish with no illegal state
### M2 — Bot and headless match runner `[x]`
- [x] `PlayerView` projection — a bot sees only what a player legitimately sees
- [x] `BasicBot` exactly per GAMEPLAY.md "Basic bot"
- [x] `MatchRunner` driving a full headless match
- [x] Soak test: thousands of seeded self-play matches finish with no illegal state
### M3 — Savegame module `[ ]`
- [ ] `ISaveSection` contract, `SaveManager` registry, JSON keyed by section name