Realm

oa::ml::CompiledEnvironment

Replayable reset/step/observation contract for one Environment. Implementations must keep every replay-visible piece of episode state in device-resident matrices: the captured plans bind those buffers once and replay the identical command sequence, so no host-computed value may differ across replays. Deterministic per-episode variation belongs in on-device counters (as CartPole’s episode_index does) or in the cursor words above.

TrRust public API

Declaration

pub trait CompiledEnvironment: Environment { // Required methods fn replay_initialized(&self) -> bool; fn replay_slots(&self) -> Vec<&Matrix>; fn replay_identity(&self) -> Vec<u64>; fn record_reset_replay( &mut self, only_done: bool, cursor: &Matrix, ) -> Result<()>; fn record_step_replay( &mut self, action: &Matrix, cursor: &Matrix, ) -> Result<EnvironmentTransition>; fn replay_observation(&mut self, observation: Matrix); // Provided methods fn replay_valid(&self) -> bool { ... } fn check_status(&self) -> Result<()> { ... } }
Public Rust declaration.

Public Methods

fn replay_initialized(&self) -> bool
fn replay_slots(&self) -> Vec<&Matrix>
fn replay_identity(&self) -> Vec<u64>
fn record_reset_replay( &mut self, only_done: bool, cursor: &Matrix, ) -> Result<()>
fn record_step_replay( &mut self, action: &Matrix, cursor: &Matrix, ) -> Result<EnvironmentTransition>
fn replay_observation(&mut self, observation: Matrix)
fn replay_valid(&self) -> bool
fn check_status(&self) -> Result<()>

Public Method Documentation

fn replay_initialized( &self ) -> bool
No public source comment is attached to this declaration.
fn replay_slots( &self ) -> Vec<&Matrix>
No public source comment is attached to this declaration.
fn replay_identity( &self ) -> Vec<u64>
No public source comment is attached to this declaration.
fn record_reset_replay( &mut self, only_done: bool, cursor: &Matrix, ) -> Result<()>
No public source comment is attached to this declaration.
fn record_step_replay( &mut self, action: &Matrix, cursor: &Matrix ) -> Result<EnvironmentTransition>
No public source comment is attached to this declaration.
fn replay_observation( &mut self, observation: Matrix )
No public source comment is attached to this declaration.
fn replay_valid( &self ) -> bool
No public source comment is attached to this declaration.
fn check_status(&self) -> Result<()>
No public source comment is attached to this declaration.