Add gen7 compatibility#87
Open
hagitran wants to merge 5 commits into
Open
Conversation
- Parser: unlock gen 7 in _parse_gen; implement _parse_zpower, _parse_mega, _parse_burst; thread can_z/can_mega flags from Turn through ReplayState to UniversalState; add MultipleZMove/MultipleMega consistency checks - Z-move names stripped from had_moves after use (one-turn transforms, not permanent move slots); backup_from_future trims full-PP predictor guesses when an observed move would overflow the 4-slot limit - check_gimmick_consistency: mega valid in gens 6-7, Z only gen 7; Zoroark ActionMisaligned skipped when ZOROARK warning is set - Tokenizer: DefaultObservationSpace-v1-gen7 built from 200 gen7ou replays (2639 tokens); gen7ou added to SUPPORTED_BATTLE_FORMATS - Gen7ObservationSpace: DefaultObservationSpace + can_z/can_mega (50 dims) - action_idx_to_BattleOrder: +9 maps to mega/Z/tera based on what's available; Z only applied when move matches the held crystal - stat_reader: PreloadedSmogonUsageStats falls back to full history when a date-windowed load is empty (handles retired formats with recent dates) - Baselines: gen 7 added to BASELINES_BY_GEN (fixes KeyError: 7) - 196/200 bootstrap replays pass full pipeline; 4 remaining are data quality issues (incomplete downloads, early forfeit) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… replays parse. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 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.
Adds gen7ou: replay parser, observation space, tokenizer, and action mapping for mega/Z-moves (sharing the +9 slots like tera).
The main issue is Z-moves: the log shows the Z-move name, not the base move, so the base move is resolved by crystal type in forward fill when already revealed, otherwise enforced in team prediction and a final fallback in from_ReplayAction. Also haven't tested online play.