pub struct Declaration {Show 17 fields
pub arena_id: String,
pub arena_version: String,
pub changelog: Vec<ChangelogEntry>,
pub payload_schema_version: u32,
pub entrants: Entrants,
pub inputs: Vec<ValueDecl>,
pub outputs: Vec<ValueDecl>,
pub no_action: String,
pub control_rate: u32,
pub budgets: Budgets,
pub max_turns: u32,
pub wire: WireSizes,
pub stats: Vec<StatDecl>,
pub series: Vec<SeriesDecl>,
pub events: Vec<EventDecl>,
pub shaping_reward: String,
pub min_trainer_version: String,
}Fields§
§arena_id: StringThe arena’s slug, e.g. boxing. With the payload schema version, it
names the ladder.
arena_version: StringSemver. Bumped with every engine change.
changelog: Vec<ChangelogEntry>What changed in each version, newest first.
payload_schema_version: u32Bumped when inputs or outputs change. A new schema starts a new ladder.
entrants: Entrants§inputs: Vec<ValueDecl>Every observation value, in payload order.
outputs: Vec<ValueDecl>Every action value, in payload order. Their bounds are the only validity check on an output.
no_action: StringWhat a seat does with no valid action, in plain words. The engine implements it; it’s never inferred from the bounds.
control_rate: u32Turns per second.
budgets: Budgets§max_turns: u32Reaching it ends the session with a real result.
wire: WireSizes§stats: Vec<StatDecl>§series: Vec<SeriesDecl>§events: Vec<EventDecl>§shaping_reward: StringThe training-only shaping reward, in words. It never affects scoring.
min_trainer_version: StringThe oldest botstadia-train that can train on this version.
Implementations§
Source§impl Declaration
impl Declaration
pub fn to_json(&self) -> Vec<u8> ⓘ
pub fn from_json(bytes: &[u8]) -> Result<Self, Error>
pub fn stat_index(&self, key: &str) -> Option<usize>
pub fn series_index(&self, key: &str) -> Option<usize>
pub fn event_index(&self, key: &str) -> Option<usize>
Sourcepub fn input_payload_bytes(&self) -> usize
pub fn input_payload_bytes(&self) -> usize
The largest input payload the declaration allows.
Sourcepub fn output_payload_bytes(&self) -> usize
pub fn output_payload_bytes(&self) -> usize
The largest output payload the declaration allows.