Expand description
An autobalance search: the game’s Knobs change a stage a little at
a time (one more enemy, a weaker trap, a later ambush), the
playtest runner replays it with the bots, and the search stops when
every rate check is inside its band. autobalance does it all and
says what it changed, in the knobs’ own words. autobalance_by is
the same search with the caller playing each setting (on threads of
its own) and saying when to stop (a time limit).
The bots never change. Only the stage does: the search takes the entrants and the checks as they are and has no way to reach their settings, since bots tuned until they pass would prove nothing.
The search is a pattern search over the knobs’ integer steps, scored
by distance. Every run plays the same seeds, so settings are
compared on the same luck, and the same inputs always give the same
changes. What it finds is the smallest change set this search found,
not one proved the smallest.
Structs§
- Balance
Settings - How hard the search works.
- Balanced
- What the search found. Its
Displaysays why it stopped, the changes one per line, then the reports before and after. - Change
- One knob the search moved.
Enums§
- Stop
- Why the search stopped.
Traits§
- Knob
- One way the game lets the search change a stage definition
S: a bounded integer step, 0 being the stage as authored.
Functions§
- autobalance
- Changes
stagewithknobsuntil every rate check ofchecksputs every one ofentrantsinside its band, assettingssays. The entrants and the checks are never changed: only the stage is. - autobalance_
by autobalance’s search, each setting played byevaluate: the report of the stage it is given, played as theTriesit is given say, its checks judged (a caller with threads plays the seeds on them andplaytest::judges them once). Its first error stops the search.- distance
- How far
report’s rates lie outside their bands: over everyCheck::Rate,max(0, min * count - successes * 100, successes * 100 - max * count), summed. 0 exactly when every rate is inside its band. ACheck::Mediandoesn’t count: it is about the bots, not the stage.