Skip to main content

Module autobalance

Module autobalance 

Source
Expand description

autobalance: the game’s knobs change one of its stages until each of its named bots (its entrants) succeeds as often as its checks’ bands want (shuyi_core::autobalance_by). The bots never change, only the stage. The game gives the plan (GameTools::autobalance_plan): its entrants and checks, as playtest has them, and the stage the search may change, with its knobs (Tunable). This runs the search, each setting’s tries played on every core (crate::pool) and judged once in seed order, so what it finds never depends on the thread count. It stops at the budget of evaluations or the time limit with the best setting seen, says the changes in the knobs’ words and, with apply, has the game write the changed stage. The answer passes when every rate is in its band.

Structs§

AutobalanceInput
What autobalance searches. A number left out is the default: the game’s for the tries (GameTools::playtest_defaults), the engine’s for the rest.
AutobalanceOutput
What autobalance found.

Constants§

DEFAULT_BUDGET
The evaluations when the input doesn’t say.
MAX_BUDGET
The most evaluations a search may make.

Functions§

autobalance
autobalance: input’s search of one of game’s stages, its tries played on threads and judged.
parse_args
Reads autobalance’s arguments (not --json).
text
What autobalance found, for people: the plan’s title, why the search stopped, the changes and the reports before and after, then what was written and how long it took.
usage
autobalance’s usage, with the game’s start options.