Stage 5: robot opponent (pool, seed-derived strategy, move driver, matchmaker substitution) #5

Merged
developer merged 1 commits from feature/stage-5-robot into master 2026-06-02 19:05:18 +00:00
Owner

Implements Stage 5 — a human-like robot opponent that substitutes for a missing human in 2-player auto-match.

  • internal/robot: durable kind=robot account pool (migration 00004); every per-game/turn choice derived deterministically from the game seed (restart-stable FNV mix); background move driver; margin targeting (band 1–30, closest-to-band); right-skewed [2,90]min delays (median ~10m); opponent-anchored sleep with ±3h drift; daytime nudge reply + proactive 12h nudge; friend/chat blocked via profile toggles.
  • engine.Candidates (decoded ranked plays); game.Candidates + RobotTurns; social.LastNudgeAt.
  • Matchmaker: 10s wait then robot substitution (reaper) + Poll delivery seam.
  • Config knobs; main wiring + boot-time pool provisioning.
  • Metrics: robot account_stats (authoritative) + robot_games_finished_total OTel counter + per-finish log.
  • Docs: PLAN, ARCHITECTURE, FUNCTIONAL(+ru), TESTING, README.
  • Tests: robot strategy units, matchmaker reaper/Poll, engine.Candidates; inttest robot full-game / substitution / proactive-nudge.
Implements Stage 5 — a human-like robot opponent that substitutes for a missing human in 2-player auto-match. - **internal/robot**: durable `kind=robot` account pool (migration 00004); every per-game/turn choice derived deterministically from the game seed (restart-stable FNV mix); background move driver; margin targeting (band 1–30, closest-to-band); right-skewed [2,90]min delays (median ~10m); opponent-anchored sleep with ±3h drift; daytime nudge reply + proactive 12h nudge; friend/chat blocked via profile toggles. - `engine.Candidates` (decoded ranked plays); `game.Candidates` + `RobotTurns`; `social.LastNudgeAt`. - Matchmaker: 10s wait then robot substitution (reaper) + `Poll` delivery seam. - Config knobs; main wiring + boot-time pool provisioning. - Metrics: robot `account_stats` (authoritative) + `robot_games_finished_total` OTel counter + per-finish log. - Docs: PLAN, ARCHITECTURE, FUNCTIONAL(+ru), TESTING, README. - Tests: robot strategy units, matchmaker reaper/Poll, engine.Candidates; inttest robot full-game / substitution / proactive-nudge.
developer added 1 commit 2026-06-02 19:03:17 +00:00
Stage 5: robot opponent (pool, seed-derived strategy, move driver, matchmaker substitution)
Tests · Go / test (push) Successful in 6s
Tests · Integration / integration (push) Successful in 10s
Tests · Go / test (pull_request) Successful in 5s
Tests · Integration / integration (pull_request) Successful in 10s
85baabe4ba
- internal/robot: durable kind='robot' account pool (migration 00004); every
  per-game and per-turn choice derived deterministically from the game seed
  (restart-stable FNV mix); a background move driver; margin targeting (band
  1-30, closest-to-band); right-skewed [2,90]min delays (median ~10m);
  opponent-anchored sleep with +/-3h drift; daytime nudge reply + proactive
  12h nudge; friend/chat blocked via profile toggles.
- engine.Candidates (decoded ranked plays); game.Candidates + RobotTurns;
  social.LastNudgeAt.
- matchmaker: 10s wait then robot substitution (reaper) + Poll delivery seam.
- config (BACKEND_ROBOT_DRIVE_INTERVAL, BACKEND_LOBBY_ROBOT_WAIT,
  BACKEND_LOBBY_REAPER_INTERVAL); main wiring + boot-time pool provisioning.
- metrics: robot account_stats (authoritative balance) + robot_games_finished_total
  OTel counter + per-finish log.
- docs: PLAN, ARCHITECTURE, FUNCTIONAL(+ru), TESTING, README; account.go comment.
- tests: robot strategy units, matchmaker reaper/Poll, engine.Candidates; inttest
  robot full-game / substitution / proactive-nudge.
developer merged commit 104eb2a978 into master 2026-06-02 19:05:18 +00:00
developer deleted branch feature/stage-5-robot 2026-06-02 19:05:18 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#5