oa::ml::environment::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.
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
Public Method Documentation
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.