Skip to content

PokemonLZA AutoStory: detectors - #416

Draft
dayfine wants to merge 26 commits into
autostory/story-breakpointsfrom
plza/story-detectors
Draft

dayfine wants to merge 26 commits into
autostory/story-breakpointsfrom
plza/story-detectors

Conversation

@dayfine

@dayfine dayfine commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Depends on #448 (base autostory/story-breakpoints); the diff shows only this change.

PLZA AutoStory needs to recognise its story screens without reading text: the station platform, the cutscene skip badge, the autosave badge, the controls hint, the dialogue advance chevron, and the main mission banner and complete card. This adds one detector per screen. Each is a pixel reader that presses nothing and reads no on an empty frame. It also adds the colour-share helpers they share and the platform's reference cells as embedded JSON. The tests are two tables of name, input and expectation: synthetic frames, and console frames from CommandLineTests/PokemonLZA/AutoStoryDetectors/ (one folder per scene sequence, 1920x1080 JPEG). This branch's CI checks out dayfine/CommandLineTests, which has those frames. Compile-checked locally; Fork Draft CI runs the build and the PokemonLZA::AutoStoryDetectors tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 15 commits November 11, 2026 22:47
# Conflicts:
#	SerialPrograms/CMakeLists.txt
@dayfine
dayfine changed the base branch from autostory/engine to autostory/story-breakpoints November 13, 2026 22:46
dayfine and others added 5 commits November 13, 2026 14:56
…on; guard empty frames

The detector tests become two tables of {name, Input, Expectation}: synthetic
frames with what each detector must read on them, and recorded frame folders
with their frame count and per-frame reads, one runner each. A synthetic case
checks only the detectors it names, so the cases assert what the old bodies
did. Adds an empty image, on which every detector reads no.

PlatformArrivalDetector returns no on an empty frame instead of reaching
NaN distances; the reference's hex colors parse with from_chars and throw
ParseException on a bad digit; region loops use std::size. Frame file names
that are not numbered are skipped instead of throwing from std::stoi, and
the frames folder lookup returns an optional instead of "".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 14, 2026
dayfine and others added 4 commits November 13, 2026 23:16
…s say what each detector checks

The console-frame tests read environment-variable folders that only existed
on the lab machine, so CI always skipped them. They now read
CommandLineTests/PokemonLZA/AutoStoryDetectors/<sequence>/ (1920x1080 JPEG)
and fail when the folder is missing. Fork CI checks out dayfine/CommandLineTests,
which has these frames. The folder of 1.5 s frames with the autosave badge is
gone, so the autosave detector keeps only its synthetic tests.

The detector comments state what each one checks and the margins it keeps,
without naming the runs, frames or dates they were measured on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The console frames moved to CommandLineTests as quality-80 JPEG. JPEG keeps
colour at half resolution, so the white chevron over the player's orange
shorts (ArrivalPastMissionBanner/0138) lost blue below 235 at its edges and
split into pieces. White now asks blue for 220 (190-230 all work), and
stray pixels are allowed up to 9%: on JPEG the chevron has at most 6%, the
closest other shape 13%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

# Conflicts:
#	.github/workflows/cpp-ci-serial-programs-base.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant