Skip to content

[Max Lair] Don't use a non-boss as boss in State - #1851

Merged
Mysticial merged 7 commits into
PokemonAutomation:mainfrom
dayfine:upstream/swsh-maxlair-boss-fix
Nov 11, 2026
Merged

Mysticial merged 7 commits into
PokemonAutomation:mainfrom
dayfine:upstream/swsh-maxlair-boss-fix

Conversation

@dayfine

@dayfine dayfine commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Base: main; follows the merged test-only preparation in #1846. This diff contains only the behavior fix.

The Problem

Boss Finder could remember a OCR misread (mimikyu-disguised) as the legendary boss, retain it after correctly reading Kyurem, and crash on the caught screen after a loss.

The Fix

Only take valid boss name as boss

Though, this will leave an empty boss name, which still crashes BossFinder when determining boss balls

Error log: bug report.log

@dayfine

dayfine commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Potentially could do more refactor of PokemonSwSh_MaxLair_Run_Battle.cpp as well and add tests there. Let me know if you prefer that to happen.

if (!state.accept_opponent()){
stream.log("Boss found before 3 wins. Something is seriously out-of-sync.", COLOR_RED);
dump_image(stream.logger(), MODULE_NAME, "BossBeforeEnd", snapshot);
stream.log("Opponent does not match the battle stage after summary read.", COLOR_RED);

@Mysticial Mysticial Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misreads are quite common. If I'm reading this correctly, this will throw and reset the adventure on a misread even if it's temporary. This happens a lot when the opponent has a lot of bright colors and the camera pans over it with the name overlaid when the read happens.

Generally speaking, we will allow incorrect information if it still results in forward progress. But the only reason why it matters here with the boss is to avoid accidentally taking a boss.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes ran into this and it reset 13 runs straight in Standard.

  • Removed some sources of the misread (when opponent is indeed ambiguous)
  • Removed the return false here, which only affects the move selection below (so might affect win rate)

@Mysticial

Mysticial commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Because this touches a critical part of the program, and your Claude said it didn't do any actual tests, please run this for 20 - 50 adventures and log all the failures and recoveries to make sure they flow properly.

Xerneas is a good candidate boss because the antlers are bright and the same color as the name at the top of the screen. So they very often will interfere with the OCR. I do know there are non-bosses that have this problem, but I don't remember any particular one off the top of my head.

dayfine and others added 2 commits November 7, 2026 20:28
Port the state fix and regressions from e17fba3 in fork #172. Supported rental forms sharing one OCR species remain candidates before the boss stage; unrelated, unknown and boss-stage ambiguity still reject. Preserve the existing inline opponent-read flow.

The 19 native state tests reproduced two failures before the fix and all pass after it. No console actions performed.
A read that still doesn't fit the battle stage after the summary retry is
almost always an OCR misread, and a wrong opponent only costs move choice.
Log it and continue instead of resetting the adventure. The boss stays
protected: accept_opponent() still never records a rental as the boss.

Drop the rental-form whitelist: an ambiguous read is fine in a rental
battle as long as no candidate is a boss, which is all that matters once a
mismatch no longer resets.

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

dayfine commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Xerneas is a good candidate boss

I ran (in Standard):

  • 20+ Nihilego
  • 20+ Kyurm
  • 10+ Xerneas

The thing with Xerneas is that I've caught it before this, so on caught menu there are always only 3 opponents even if I won.

@pa-devbot pa-devbot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review: Verified on the PR head: pa-build succeeds and the full CLI suite passes (20,353 passed, 0 failed, 3 audio env-skips, all unrelated). I also hand-checked all 19 MaxLairBossState table cases against the new accept_opponent() / boss_if_caught() and they all match.

Assessment: well-scoped fix. Both root causes are addressed:

  1. boss can only ever be assigned from a slug that passes is_boss(), so a rental misread can no longer be remembered as the boss and survive a later correct read — that was what crashed EndBattleDecider_BossFinder::get_filter() on the caught screen.
  2. boss_if_caught() now returns the boss only at wins == 4, so a lost adventure no longer takes the boss-caught path.

The "keep going instead of resetting" change is safe as far as I can trace: select_move() already handles an empty opponent (random move), so a fully failed read degrades to suboptimal move choice instead of a crash. Keying the summary-path override on in_boss_battle_with_known_boss() also fixes the old !state.boss.empty() case where a remembered rental blocked state.opponent = {state.boss}.

Questions (for the author, who has console test results):

  1. Cheer-only consoles. If a console's team is wiped out before the boss battle and the boss is caught by the surviving consoles, does that console still get the ball-throw screen (so throw_balls increments it to wins == 4)? If not, its boss_if_caught() is "" at the caught screen, and BossFinder treats its end of adventure as "boss not caught" (continue) where the old code applied the boss action (e.g. CATCH_AND_STOP_PROGRAM on the host, which knows the boss from the den sprite). Is that intended?
  2. Co-op non-host consoles. Run_CaughtScreen.cpp:205 uses the local state (state_tracker[console_index]), but only the host gets state.boss from the den sprite read; a non-host's local boss depends on its own battle-4 read. If that read fails, boss_if_caught() is "" even with wins == 4, so that console may continue while the host stops. This predates the PR (the old code returned "" there too), but passing infer_actual_state(console_index) there would majority-vote the host's boss across consoles and make the end-of-adventure decision consistent.

Notes / optional follow-ups (not blockers):

  • If inferred.boss is empty or unknown, BossFinder::get_filter() still throws from throw_balls (den-sprite read failed at start and all battle-4 reads failed). Rare and pre-existing, but the same crash family; a fallback (normal ball or error-dump) would harden it.
  • PokemonSwSh_MaxLair_Run_Battle.cpp:84: snapshot is only assigned inside the retry block. The final dump_image is only reachable when the second accept_opponent() fails, which today implies retry was true (nothing mutates state in between), so it is safe — but a one-line comment would guard against a future edit dumping a default-constructed snapshot.
  • The Run_Battle refactor suggested in the thread is fine as a follow-up: the stage-matching logic now lives in GlobalState and is table-tested, which is the part that needed the regression coverage.

@dayfine

dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Questions (for the author, who has console test results):

  1. Cheer-only consoles. If a console's team is wiped out before the boss battle and the boss is caught by the surviving consoles, does that console still get the ball-throw screen (so throw_balls increments it to wins == 4)?

I think so -- though I never played this in a multi-switch / multi-player mode.

If not, ...

So supposedly this won't happen

  1. Co-op non-host consoles. Run_CaughtScreen.cpp:205 uses the local state (state_tracker[console_index]), but only the host gets state.boss from the den sprite read; a non-host's local boss depends on its own battle-4 read. If that read fails, boss_if_caught() is "" even with wins == 4, so that console may continue while the host stops. This predates the PR (the old code returned "" there too), but passing infer_actual_state(console_index) there would majority-vote the host's boss across consoles and make the end-of-adventure decision consistent.

Acknowledged since it's preexisting and thus out-of-scope

@Mysticial

Copy link
Copy Markdown
Collaborator

I'm testing this right now and it is failed consistently with:

2026-11-08 20:38:07.202027 - [Console 0]: Current State: Move Select
2026-11-08 20:38:07.290310 - [Console 0]: String Match Result: "Persian" -> "pers1an" -> (pers1an): (persian) (log10p = -4.89279)
2026-11-08 20:38:07.290381 - [Console 0]: Ambiguous Read Result: {"persian", "persian-alola"}
2026-11-08 20:38:07.290397 - [Console 0]: Unable to read opponent from battle. Attempting to read from summary.
2026-11-08 20:38:07.290847 - [Console 0]: issue_buttons(): Y, delay = 1080ms, hold = 80ms, cooldown = 0ms
2026-11-08 20:38:07.291488 - [Console 0]: issue_dpad(): up, delay = 480ms, hold = 80ms, cooldown = 0ms
2026-11-08 20:38:07.292151 - [Console 0]: issue_buttons(): A, delay = 2080ms, hold = 80ms, cooldown = 0ms
2026-11-08 20:38:07.292173 - [Console 0]: wait_for_all()
2026-11-08 20:38:10.963546 - [Console 0]: Type Read Result:
    normal : 0.0757804
    normal : 0.367816

2026-11-08 20:38:11.038627 - [Console 0]: String Match Result: "Persian" -> "pers1an" -> (pers1an): (persian) (log10p = -4.89279)
2026-11-08 20:38:11.040889 - [Console 0]: Compiling Error Report...
2026-11-08 20:38:11.276794 - [Console 0]: Saving Error Report...
2026-11-08 20:38:11.344837 - [Global]: Found 1 unsent error reports.
2026-11-08 20:38:11.344897 - [Global]: Attempting to send 1 error reports.
2026-11-08 20:38:11.581663 - [Global]: Error report suppressed due to rate limit.
2026-11-08 20:38:11.582207 - [Global]: Moved error report 20261108-203811038681.
2026-11-08 20:38:11.585220 - [Console 0]: issue_mash_button(): B, duration = 3000ms
2026-11-08 20:38:11.621786 - [Console 0]: wait_for_all()
2026-11-08 20:38:14.596971 - [Console 0]: Opponent does not match the battle stage after summary read.
2026-11-08 20:38:14.598060 - [Console 0]: Compiling Error Report...
2026-11-08 20:38:14.780985 - [Console 0]: Saving Error Report...
Screenshot

dayfine and others added 2 commits November 8, 2026 20:54
…empty

An ambiguous battle read (both Persian forms) was replaced by an empty
summary read, which accept_opponent() rejects. Keeping the candidates
lets a rental battle go on with the ambiguity it already accepts.

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

74c0512 replaced the `wins < 3` check on ambiguous reads in
accept_opponent() with `!is_boss_battle()`, which also accepted an
ambiguous read at wins == 4, after the last battle. That broke the existing
test "form ambiguity is only valid during rental battles". Add
is_rental_battle() and use it there.

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

dayfine commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Seems to be pre-existing issues that got validated more strictly now (that opponent cannot be empty):

2026-11-08 20:38:10.963546 - [Console 0]: Type Read Result:
    normal : 0.0757804
    normal : 0.367816

Then neither persian variants matches types and opponents become empty.

Seems this is because the O is normal got mistake for the circle type symbol, which is a separate issue we can try to fix with this example (to prevent two of the same type).

For this one, we can go back to header read when summary read is empty (32c94cc), and then if (opponent.size() > 1){ is already handled.

@Mysticial

Copy link
Copy Markdown
Collaborator

I have some more questions now. When OCR is completely unreliable (which is often the case for Chinese) and there are multiple (or none) results throughout the adventure, will this error?

The priorities in descending order of importance are:

  1. Never take a boss.
  2. Guarantee forward progress.
  3. Optimal play.

In the case where OCR is unreliable, we want the program to continue as long as it doesn't read a boss in the first 3 battles.

Back to main's behavior except one rule: at the boss stage, accept_opponent()
records the boss only from a single boss-species read. A rental misread
(Kyurem read as Mimikyu on 2026-11-02, which later crashed Boss Finder)
no longer becomes the boss; a later turn's correct read still records it.

Reverts the other changes in this PR (stage-mismatch retries, the rental-form
ambiguity rules, the summary fallback, continuing instead of resetting, and
boss_if_caught() requiring four wins) to keep the change to that one rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine dayfine changed the title Fix Max Lair Boss Finder after failed adventures [Max Lair] Don't take a non-boss as boss Nov 9, 2026
@dayfine

dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Actually the bug I was fixing was indeed an OCR failure:

This is from the release log SerialPrograms-20261101-153713815683.log, at 2026-11-02 06:13:06:

I was battling Kyurem 酋雷姆, and

String Match Result: Multiple Candidates =>
    -1.52723 : "[TabeQ]" -> "tabeq" -> (謎擬q): (mimikyu)
    -1.30972 : "[TabeQ]" -> "tabeq" -> (sde明4): (charjabug)
    -1.30972 : "[TabeQ]" -> "tabeq" -> (za周毅欣): (slowbro)
    -1.30972 : "[TableQ" -> "tab1eq" -> (丞工陸11): (raichu)
    -1.11207 : "[TabeQ]" -> "tabeq" -> (旱巨一e巨飛匣1): (emolga)

The game is in Traditional Chinese, but OCR turned the boss's name, Kyurem, into the Latin junk "[TabeQ]". The string matcher then fuzzy-matched that junk against the Chinese dictionary. Every candidate was a weak match, and it took the best one, Mimikyu (log10p -1.5), over a near-tie (-1.3).

So right now the risk is optimal play -- if we don't fix the Normal-Normal thing (in persian example), we fall back to the header read and which might not be the exact mon, and the move selection might not be optimal.


So let me see, I am making these change minimal now to just show:

  • don't use an invalid boss name, which will crash
  • and this only comes up in boss finder, where the boss needs to be looked up
    • so in that sense this crash is not fatal, the user can still take the switch and save the route
  • the next thing we would try is to use the summary read which matches the type, which is why persian failed
    • and I can make the repeated types fix first
    • So this O issue would only happen in certain lanugages, or we need a better positioned boxes
    • then Kyurem can be matched to ice / dragon, to fill the boss, avoiding empty boss to crash

@dayfine dayfine changed the title [Max Lair] Don't take a non-boss as boss [Max Lair] Don't use a non-boss as boss in State Nov 9, 2026
dayfine added a commit to dayfine/CommandLineTests that referenced this pull request Nov 10, 2026
… (Persian)

From PokemonAutomation/Arduino-Source#1851. Read by the MaxLairSummaryOpponentReader test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Mysticial pushed a commit to PokemonAutomation/CommandLineTests that referenced this pull request Nov 10, 2026
… (Persian) (#45)

From PokemonAutomation/Arduino-Source#1851. Read by the MaxLairSummaryOpponentReader test.


Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@jw098

jw098 commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Do you have a screenshot of the OCR failure? So we can add it to the test suite?

@dayfine

dayfine commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Do you have a screenshot of the OCR failure? So we can add it to the test suite @jw098

No, I only have the logs (given the OCR misread itself doesn't fail, but the wrong name will fail in later step). This can be hard to reproduce I guess given reading the name while in battle will contain the background so it's nondeterministic. I searched my logs for ~20 Kyurem battles and the OCR misread happened just once.

So retrying from summary read should be more defensive. Or we would read it in battle from multiple frames and get a vote?

@jw098

jw098 commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

If it's truly an OCR misread, I would expect that the OCR read on Kyurem should nearly always fail. I wonder if we're misdiagnosing the issue. I wonder if it would be good idea to just record the screen + output window with OBS, to see if you can catch the error.

@dayfine

dayfine commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

ok let me record some kyurem videos and try to run OCR against each frames

@dayfine

dayfine commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

@jw098 I recorded a 5-mins long video with Kyerum boss and asked AI to run OCR on every single frame and check what the result is. I am not sure if our sampling of what frame to run OCR against is deterministic, but seems to me the issue is that there is a really long tail (and it might depend on what's in the background), and once in a million time that garbage result might be matches with a valid pokemon name?

Full OCR results below:

OCR Accuracy Evaluation: Kyurem Max Lair Raid

  • Source Video: /Users/difan/Library/Application Support/SerialPrograms/Profiles/lab-A/Screenshots/video-20261110-165617820588.mp4
  • Time Range Evaluated: 01:20.0 (frame 800) to 05:00.2 (frame 3002) — total 2,202 frames
  • Target Text: 酋雷姆 (Kyurem, Traditional Chinese chi_tra)
  • Engine: Tesseract 5 (chi_tra.traineddata, PSM 7, white threshold [120..255])

1. Summary Metrics

Metric Frames Percentage
Total Frames in Range 2,202 100.00%
Boss Name Absent (attack animations, camera cuts) 1,499 68.07%
Boss Name Present 703 31.93%
Exact Clean Match ('酋雷姆') 447 63.58%
Exact Match with Noise / Punctuation 91 12.94%
Fuzzy Match (PA Levenshtein $\le 1$) 86 12.23%
Missed / Severely Occluded 79 11.24%
Total Effective Match in Pokémon Automation 624 / 703 88.76%

2. Determinism Analysis

Tesseract OCR is 100% deterministic on static image crops. A 3-run verification across 50 frames confirmed 0 inconsistencies ($0.00%$ variance). Re-running the pipeline yields byte-for-byte identical classifications and counts.


3. Full Distribution of All 177 Unique Outputs (703 Frames)

3.1 Exact Match — Clean (1 unique string, 447 frames / 63.58%)

Raw OCR Output Count % of Present
'酋雷姆' 447 63.58%

3.2 Exact Match — With Edge / Punctuation Noise (44 unique strings, 91 frames / 12.94%)

Raw OCR Output Count % of Present
'酋雷姆﹍' 24 3.41%
'酋雷姆﹍,' 6 0.85%
'酋雷姆﹒' 4 0.57%
'酋雷姆‵' 4 0.57%
'酋雷姆,' 3 0.43%
'﹍酋雷姆﹍' 3 0.43%
'′酋雷姆﹍' 3 0.43%
'酋雷姆′' 2 0.28%
'酋雷姆/' 2 0.28%
'酋雷姆﹣' 2 0.28%
'ˉ酋雷姆﹍' 2 0.28%
'﹍酋雷姆' 2 0.28%
'酋雷姆ˊ' 2 0.28%
'ˍ酋雷姆。贄' 1 0.14%
'˙酋雷姆,‧﹚' 1 0.14%
',/酋雷姆' 1 0.14%
'酋雷姆(' 1 0.14%
'」﹨酋雷姆' 1 0.14%
'[﹨酋雷姆' 1 0.14%
'﹁﹨﹨酋雷姆' 1 0.14%
'ˍ酋雷姆' 1 0.14%
'ˉ酋雷姆' 1 0.14%
'酋雷姆﹍﹒' 1 0.14%
'酋雷姆﹛' 1 0.14%
'酋雷姆〉' 1 0.14%
'﹌酋雷姆﹍' 1 0.14%
'˙酋雷姆﹍' 1 0.14%
'′酋雷姆ˉ' 1 0.14%
'|酋雷姆}' 1 0.14%
'ˍ酋雷姆。' 1 0.14%
'葉酋雷姆﹍' 1 0.14%
'﹒酋雷姆' 1 0.14%
'酋雷姆一' 1 0.14%
'酋雷姆﹍﹒﹣' 1 0.14%
'酋雷姆。﹒' 1 0.14%
'關酋雷姆' 1 0.14%
'酋雷姆‧﹒' 1 0.14%
'酋雷姆﹍2﹒' 1 0.14%
'酋雷姆5' 1 0.14%
'酋雷姆‥﹍' 1 0.14%
'酋雷姆﹕' 1 0.14%
'‵酋雷姆' 1 0.14%
'酋雷姆﹍,﹒' 1 0.14%
'酋雷姆﹍‧﹒' 1 0.14%
',酋雷姆' 1 0.14%

3.3 Fuzzy Match (60 unique strings, 86 frames / 12.23%)

Raw OCR Output Count % of Present
'酋露姆' 11 1.56%
'臾雷姆' 6 0.85%
'酋電姆' 3 0.43%
'ˍ馗雷姆' 3 0.43%
'﹍臾雷姆' 3 0.43%
'﹍春雷姆ˍ' 2 0.28%
'ˍ首雷姆' 2 0.28%
',馗雷姆' 2 0.28%
'ˍ臾雷姆' 2 0.28%
'‥馗雷姆' 2 0.28%
'華雷姆' 1 0.14%
'﹒ˍ馗雷姆﹍' 1 0.14%
'酋雷翅”謹ˉˋ' 1 0.14%
'新旱雷姆,ˋ、﹨W,' 1 0.14%
'酋露姆﹁' 1 0.14%
'酋震姆' 1 0.14%
'酋雪姆' 1 0.14%
'ˊ,臾雷姆' 1 0.14%
'|【﹁馗雷姆' 1 0.14%
'酋雷訴' 1 0.14%
'酋霖姆' 1 0.14%
'﹣酉雷姆﹍' 1 0.14%
'ˉ首雷姆﹍' 1 0.14%
'酋雷娠/' 1 0.14%
'臾雷姆′' 1 0.14%
'﹍酥雷姆彌' 1 0.14%
'ˍ春雷姆弱' 1 0.14%
'ˍ春雷姆' 1 0.14%
'ˍ酉雷姆4' 1 0.14%
'ˍ酋雷砦、' 1 0.14%
'ˍ首雷姆﹍' 1 0.14%
'ˍ馗雷姆。' 1 0.14%
'﹍臾雷姆﹍' 1 0.14%
'﹍﹣首雷姆' 1 0.14%
',馗雷姆′' 1 0.14%
'酋雷妲,,' 1 0.14%
'。﹒酋電姆' 1 0.14%
'﹒﹒馗雷姆' 1 0.14%
'=﹒臾雷姆' 1 0.14%
'﹒,﹣臼雷姆﹒' 1 0.14%
',臾雷姆' 1 0.14%
'”臾雷姆' 1 0.14%
'﹁臾雷姆' 1 0.14%
',馗雷姆﹍' 1 0.14%
'﹁﹣﹣首雷姆‵' 1 0.14%
'0一頭雷姆' 1 0.14%
'ˍ臼雷姆,' 1 0.14%
'‵”臼雷姆,' 1 0.14%
'”。首雷姆' 1 0.14%
'”﹒首雷姆' 1 0.14%
'﹍首雷姆' 1 0.14%
'﹣﹣馗雷姆' 1 0.14%
'﹍馗雷姆' 1 0.14%
'舂雷姆' 1 0.14%
'﹒馗雷姆' 1 0.14%
'《﹒首雷姆' 1 0.14%
'‧馗雷姆' 1 0.14%
'下一舂雷姆' 1 0.14%
'﹣臾雷姆' 1 0.14%
'酋電姆。' 1 0.14%

3.4 Missed / Occluded Frames (72 unique strings, 79 frames / 11.24%)

Raw OCR Output Count % of Present
'' (blank) 3 0.43%
'﹍西雷娠ˍ' 2 0.28%
'曲甯嫘' 2 0.28%
'ˉ' 2 0.28%
'﹒' 2 0.28%
',' 2 0.28%
'ˍ酉雷砦﹣' 2 0.28%
'。吳畫對' 1 0.14%
'﹁w,參' 1 0.14%
'芳露姆﹍引' 1 0.14%
'ˍ' 1 0.14%
'﹁早,苑雷坨﹍' 1 0.14%
'讀/茹雷姑ˋ﹍﹒' 1 0.14%
'2酉雷娼8﹍‥' 1 0.14%
'酉雷嫺﹒4' 1 0.14%
'酉雷妮﹣A,' 1 0.14%
'﹁﹣首雷姮' 1 0.14%
',,首寄國' 1 0.14%
'ˍ日窪尋' 1 0.14%
'2' 1 0.14%
',酉雷然' 1 0.14%
'(囊ˍ' 1 0.14%
'西雷妾' 1 0.14%
'曲甯嫘_' 1 0.14%
'曲甯嫘”' 1 0.14%
'﹣' 1 0.14%
'﹣茹,k' 1 0.14%
'ˊ一x﹨' 1 0.14%
'‧_{' 1 0.14%
'′' 1 0.14%
'”首雷娠嘈' 1 0.14%
'ˍ首雷娠情' 1 0.14%
'ˍ首雷娠邊' 1 0.14%
'ˍ首雷娠曠' 1 0.14%
'﹍酥雷娠蠕' 1 0.14%
'﹍酉雷媜' 1 0.14%
'ˍ馗雷砦﹁' 1 0.14%
'ˍ酉雷砦﹌' 1 0.14%
'ˍ首雷砦﹣' 1 0.14%
'ˍ酉雷砦。' 1 0.14%
'一,啁膳' 1 0.14%
'。隔' 1 0.14%
'劣﹒唐' 1 0.14%
'﹁4ˋ倉' 1 0.14%
'卿。進' 1 0.14%
'圍' 1 0.14%
'烏' 1 0.14%
'鶩|' 1 0.14%
'圓謹﹩' 1 0.14%
'M〝)」ˍ闐' 1 0.14%
'ˋ功蹋﹍,' 1 0.14%
'【檯˙_珮' 1 0.14%
'瞞泰﹍' 1 0.14%
'ˍ普m' 1 0.14%
'ggggaˍ' 1 0.14%
'論' 1 0.14%
',ˉ' 1 0.14%
'鄙武' 1 0.14%
'gy﹍漢,' 1 0.14%
'刊L檯′﹛\霾葉'` 1 0.14%
'#】' 1 0.14%
'一十' 1 0.14%
'庸' 1 0.14%
'﹢﹩人' 1 0.14%
',﹚達鑣' 1 0.14%
'﹣一一﹌' 1 0.14%
'0臾電姆' 1 0.14%
'曲震嫘' 1 0.14%
'﹣﹒臾電姆' 1 0.14%
'﹍﹒罡電姆﹣' 1 0.14%
'M俠速振經' 1 0.14%

@jw098

jw098 commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

That's one possibility. The other possibility is that the program thinks it's on a screen where it can read Kyurem's name, but it was actually on a different screen where there was no text in that box. The OCR then hallucinates text from the background image. In which case the issue isn't the OCR, but with our state machine being out of sync.

@dayfine

dayfine commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

@jw098 right, though either way a misread OCR should be handled, right? The idea is that an invalid read (non-boss) is treated the same way as an empty string (which already falls back to summary read iirc). That handles all garbage / invalid OCR reads no matter where they come from.

@Mysticial
Mysticial merged commit b79d9e0 into PokemonAutomation:main Nov 11, 2026
7 of 8 checks passed
@dayfine
dayfine deleted the upstream/swsh-maxlair-boss-fix branch November 11, 2026 05:48
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.

4 participants