Expand description
playtest: the game’s named bots (its entrants) each play its stage K
times from seeds seed, seed + 1, …, the game measures every try,
and its checks say per bot whether it succeeded as often as wanted
(shuyi_core::bots::playtest). The game gives the plan
(GameTools::playtest_plan): its stages, its entrants and their
groups, its checks and how one try is played. This plays the tries on
every core (crate::pool), times them, and judges them once in seed
order, so the report never depends on the thread count. The answer
passes unless a rate fell under its floor.
Each entrant’s line carries the plan’s summary items (Summary),
and kept keeps every run in a history and says what the last run
of the same stage, entrants and options found.
Each try keeps its commands and its record for replay, if the game
gives one (TryKept), and each entrant its outcomes counted and the
spread of its turns and measures. A plan with no checks is a plain bot
run: nothing is judged, and it passes when every try played.
Structs§
- Played
- How one entrant’s tries went, besides the report: its label, its speed, its summary and the last run’s headline.
- Playtest
Args - What
playtest’s arguments ask for: the input, the file to write the JSON answer to, if any, and whether the text is brief. - Playtest
Input - What
playtestplays. A number left out is the game’s default (GameTools::playtest_defaults). - Playtest
Output - What
playtestfound on one stage. - Previous
- The last run before this one, from the history.
- Spread
- How a number spread over an entrant’s tries.
- TryKept
- What the answer keeps of one try besides the report’s line: how many commands were applied, and its record.
Enums§
- Summary
- One number of an entrant’s tries, as
playtestprints it after the entrant’s name. A try missing the measure counts it as 0.labeldefaults to the measure’s name ("most"forMost).
Constants§
- DEFAULT_
HISTORY - Where the history is kept when the input doesn’t say, from the project’s folder.
- DEFAULT_
TRIES - The tries when neither the input nor the game says: 100 from seed 0, each stopped at turn 200.
- MAX_
TRIES - The most tries of each entrant one
playtestplays.
Functions§
- brief
textwithout the table’s line per try (--brief).- kept
playtest, each stage’s run kept in the history underroot(unlessno_history) and compared with the last one kept there: each entrant’swasand the stage’sprevious. A history that can’t be written fails the answer, naming the file.- options_
text - The game’s start
options, a line each, for a usage. - parse_
args - Reads
playtest’s arguments (not--json). - playtest
playtest:input’s tries ofgame’s plan, played on threads and judged; a report a stage, one unlessevery_stage. It keeps no history:keptdoes.- text
- What
playtestfound, for people: for each stage, the plan’s title, the report’s table, then a line per entrant with its label, its summary, its speed and what it was in the last run, and that run’s date and commit. A stage with no checks, a plain bot run, then has each entrant’s outcomes counted and the spread of its turns and measures. - usage
playtest’s usage, with the game’s startoptions.