Skip to main content

Module declaration

Module declaration 

Source
Expand description

What an arena says about itself.

The declaration is the complete, mechanical contract between an arena and everything around it: the host validates outputs against it, the site draws the arena’s Interface section and its metrics from it, and the CLI, the policy shell and botstadia-train generate their code from it. Nothing around an arena needs per-arena code.

An arena writes it once, in its declaration crate, with the builders here. Declaration::problems lists everything wrong with one, and an arena’s tests require it to be empty.

Structs§

Budgets
The work budgets, in fuel.
ChangelogEntry
Declaration
EventDecl
A moment worth marking on the timeline.
Problem
One thing wrong with a declaration.
SeriesDecl
One per-turn graph.
SliceDecl
A named run of elements inside a value, with its unit.
StatDecl
One session stat, one value per seat at the end.
ValueDecl
One observation or action.
WireSizes
The arena’s own maximum sizes, each under its platform ceiling.

Enums§

Aggregate
How a stat rolls up into a bot’s form over its recent sessions.
Better
Whether more of a stat is better. Decides the best value in a form.
Bounds
The allowed range of each element of a value, inclusive.
Dtype
A value’s element type.
Entrants
How many bots a session seats.
SeriesScope
Whose line a per-turn series draws.
StatKind
What a stat measures, which decides how the site words it.

Constants§

MAX_FRAME_BYTES
Platform ceiling on one replay frame, in bytes.
MAX_INPUT_BYTES
Platform ceiling on one seat’s input, in bytes.
MAX_OUTPUT_BYTES
Platform ceiling on one seat’s output, in bytes.

Functions§

is_slug
Lowercase letters, digits and single dashes, starting with a letter.
slice