tools: classify the mission briefing instead of filing it as menu

The briefing map is cyan and satisfies every clause of the menu rule (b-r > 30,
r < 45, little white), with no earlier rule claiming it -- so it was labelled
`menu`.  That made wait_screen.sh report NEVER REACHED READY ROOM on a run that
had successfully done LOAD GAME -> slot 01 -> YES and was three screens further
on: a working route scored as a failed one, pointing the next debugging step at
an input path that was fine.

Cyan has b and g nearly equal (b-g ~ 5) where the menu's blue leads its green
(b-g ~ 32), so `r < 20 and g > 30 and b - g < 20` separates them; the r floor
keeps the title screen out.  The file's own docstring already carried the
briefing's mean as an aside -- it just never had a class.

Verified against all eight signatures the file documents (2 menu variants, title,
ready room, flight, 3 briefing measurements): no regressions, and the captured
briefing image now reads `briefing`.
This commit is contained in:
Sylpheed RE agent
2026-08-26 20:47:15 +00:00
parent 64fe8ebdcd
commit eb21c977ef
2 changed files with 79 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ Measured on known-good captures of each screen (1280x720, no menu bar):
movie green 0% white varies no green at all
Usage: screen_id.py <png> [--json]
Prints one of: title | menu | readyroom | flight | other, plus the features.
Prints one of: title | menu | briefing | readyroom | flight | other, plus the features.
"""
import json
import subprocess
@@ -73,6 +73,24 @@ def classify(f):
# which put one run in OPTIONS and the next in BRIEFINGS.
if f["b"] > 110 and f["r"] < 40 and f["b"] - f["g"] > 60:
return "readyroom"
# The mission BRIEFING map is cyan, not blue, and without this rule it falls
# straight through to the menu test below (dark, b - r > 30, r < 45, little
# white -- all true of it). MEASURED 2026-08-26: that mislabel made
# `wait_screen.sh readyroom` report NEVER REACHED READY ROOM on a run that
# had in fact navigated LOAD GAME -> slot 01 -> YES and was sitting on the
# briefing three screens further on, which is the worst kind of failure --
# a successful route scored as a failed one.
#
# What separates them is that cyan has blue and green nearly equal, while
# the menu's blue runs far ahead of its green:
#
# briefing (1.4, 45.2, 49.6) (5.5, 49.1, 54.3) (4.6, 47.7, 54.5) b-g ~ 5
# main menu (25, 38, 70) (13, 26, 59) b-g ~ 32
#
# The r < 20 floor keeps the title screen (52.8, 66.1, 74.5, b-g 8.4) out;
# the ready room (b-g ~ 97) and flight (green rule) are already claimed above.
if f["r"] < 20 and f["g"] > 30 and f["b"] - f["g"] < 20:
return "briefing"
# The main menu is dark and strongly blue. TWO measured signatures, not one:
#
# white 3.5% mean (25, 38, 70) the 2026-07 reference at the top