feat(robot): shrink endgame think time when both sides pass #86
Reference in New Issue
Block a user
Delete Branch "feature/robot-endgame-shrink"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
When the two most recent journal moves are both passes — the board and the robot's rack are frozen, so the robot is bound to pass again — the robot now answers on a shortened schedule instead of waiting out its long late-game think time (up to 90 min), so a decided game is not dragged out.
The shortened delay is a
[0.8, 1.5]×band around the human's last-move think time (the gap between the last two journal entries), clamped to[30 s, 8 min]and taken as a min with the normal schedule, so the robot never moves slower than before. A slow human collapses to the 8-min cap; a fast human is tracked, with the floor keeping the robot from passing suspiciously instantly.Why
In a dead-drawn endgame the next move is a forced pass; the long deliberation only stalls the game.
How
selectMovepasses only with no legal play and a bag that cannot refill the rack, and both persist once both sides pass) — no bag read, no engine replay.RobotTurnscarries newEndgamePass+OppLastMove, filled by one batchedgame_moveswindow query on the scan (mirrorsanalytics.go; reads the journal only, no schema change).maybeMoveshrinks the delay via the new deterministicendgamePassDelay. The sleep window is unchanged (honoured upstream inhandle).NextMoveAt(admin ETA) is left as the normal-schedule upper bound.Tests
endgamePassDelaybounds/anchor/floor/cap/determinism, and that it is always shorter than the late-game schedule.RobotTurnsreportsEndgamePass/OppLastMovefor a manufactured two-pass state (and not for a single pass), and the driver acts on the shrunk schedule.Docs updated in the same PR:
ARCHITECTURE.md§7,FUNCTIONAL.md(+_ru),backend/README.md.