Repository navigation
Add the game_end when the game clock reaches the time limit - #140
Merged
Merged
Conversation
A game stopped by Season 4's two-hour limit needed its game_end added by hand (#138). Extraction now finds the first sample where the clock has ticked up to 2:00:00 (a jump there from far below is a misread and doesn't count), keeps only the claims seen by then, plus the mark debounce, and, when no line or unbeatable majority settled the game first, adds a game_end at that point so the square count decides it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main moved scoring to _settle_game, which runs once the match's season is known. The time limit now fits that: _game_events returns the game's events and the sample where the clock reached two hours, and _settle_game adds the GAME_END there and calls the count, as it does for a points game that ran out of time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #138. A game stopped by Season 4's two-hour limit (Adef vs Vswed, video 100) needed its
game_endadded by hand. Now extraction adds it.What changes
extract._detect_time_limit: finds the first sample where the game clock reads 2:00:00 or more (_TIME_LIMIT_S). The clock has to tick up to it: if the previous reading is more than_CLOCK_STEP_TOLERANCE_Sbelow, it's a misread and doesn't count.extract._game_events: the per-game event steps (start, claims, winner, end), moved out ofextract_videoso they can be tested without a video. When the limit is reached:_MARK_DEBOUNCE_SAMPLES, so a square already showing at the limit is still confirmed. The overlay freezes the clock, but a square handed in late can still turn on the board (Season 4 match 107).game_endis added as the last event.determine_winner(..., time_up=True)then decides on the count: majority for the leader, a tie when level.EventTypedocstring and CLAUDE.md.Testing
tests/pipeline/test_extract.py: a win on the count, a tie, a claim after the limit dropped, a claim showing at the limit counted, a misread jump to two hours ignored, and a game settled before the limit keeping its owngame_end.Known limits
🤖 Generated with Claude Code