Repository navigation
Fight goldens in CI: a change that moves fight odds re-blesses them - #92
Merged
Merged
Conversation
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.
Stage 2 of the fight simulator (stage 1: #91): ten standard fights are now checked against kept results in CI, so a change that moves fight odds has to show and re-bless the new table in the same PR.
sim/goldens/*.yml: ten standard matchups at fixed seeds (1..25 each).sim/goldens/*.txtholds the table each one prints.fight --check simplays them and fails on any table that moved, a table with no matchup, or a matchup with no table.fight --write simre-blesses only the tables that moved (src/sim/golden.rs).cargo run --release --locked --bin fight -- --check sim. It plays 250 fights in about 2.6s on 2 cores; parity's check takes 2.7s on the same cores..gitattributes:sim/** -text, so Windows checks the tables out byte for byte.fight MATCHUP.ymlprints its text table through the samegolden::table, so a golden matches what you see at the terminal.Testing:
fmtandclippy -D warningsare clean, andtests/sim.rspasses.--checkpasses on the current rules.The 25-seed tables are for detecting change, not for precision: every die is seeded, so any rule that moves a roll changes the text. Odds studies still use
sim/matchupsat 2,000 seeds. No rule or server change.The golden tables