Repository navigation
Conversation
This was referenced Nov 2, 2026
dayfine
added a commit
that referenced
this pull request
Nov 4, 2026
dayfine
commented
Nov 4, 2026
| const std::string& opponent_slug = *opponent.begin(); | ||
| // wins is incremented after each battle is won: battles 1-3 (wins < 3) are | ||
| // against rental Pokemon, and battle 4 (wins == 3) is against the legendary boss. | ||
| const bool in_boss_battle = (wins == 3); |
Owner
Author
There was a problem hiding this comment.
nit: define this as an internal reader function in the unnamed namespace on line 16
namespace {
bool IsBossBattle(const GlobalState & state) {
return state.wins == 3;
}
} // namspace
Owner
Author
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
force-pushed
the
swsh/maxlair-boss-tests
branch
from
November 8, 2026 07:50
e019799 to
1e5f52a
Compare
dayfine
force-pushed
the
swsh/maxlair-boss-fix
branch
from
November 8, 2026 07:50
e17fba3 to
76266ba
Compare
dayfine
added a commit
that referenced
this pull request
Nov 11, 2026
) * Fix Max Lair boss inference and boss-catch reporting * Max Lair: preserve supported rental-form ambiguity 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. * Max Lair: keep going on an opponent misread instead of resetting 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 * Max Lair: use is_boss_battle() for the stage check in accept_opponent() Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss * Max Lair: keep the battle read's candidates when the summary read is 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 * Max Lair: an ambiguous read is accepted only in rental battles (wins < 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 * Max Lair: limit the fix to not recording a wrong boss 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 --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Owner
Author
|
Merged upstream as PokemonAutomation#1851 (in main as b79d9e0); closing the fork copy. |
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.
Mirror of upstream PokemonAutomation#1851 plus one commit addressing Mysticial's review: a persistent opponent/stage mismatch after the summary retry no longer resets the adventure.
read_battle_menu: log + dump image on mismatch, then continue. A wrong opponent only costs move choice;accept_opponent()still never records a rental as the boss.compatible_rental_forms): an ambiguous read passes in a rental battle when no candidate is a boss.{lycanroc-midday, magmar}now accepted; unknown-slug case removed with the rule.Testing:
Test_MaxLairBossStatetable tests; fork CI (mac, windows-clang, ubuntu). Not yet run on hardware; the previous tip (aab6684) ran 30+ adventures on console A.🤖 Generated with Claude Code
https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss