pub struct TestEnv { /* private fields */ }
Expand description
Environment for testing.
Trait Implementations§
Source§impl Agent<TestEnv, SimpleReplayBuffer<TestObsBatch, TestActBatch>> for TestAgent
impl Agent<TestEnv, SimpleReplayBuffer<TestObsBatch, TestActBatch>> for TestAgent
Source§fn opt_with_record(
&mut self,
_buffer: &mut SimpleReplayBuffer<TestObsBatch, TestActBatch>,
) -> Record
fn opt_with_record( &mut self, _buffer: &mut SimpleReplayBuffer<TestObsBatch, TestActBatch>, ) -> Record
Performs an optimization step and returns training metrics. Read more
Source§fn save_params(&self, _path: &Path) -> Result<Vec<PathBuf>>
fn save_params(&self, _path: &Path) -> Result<Vec<PathBuf>>
Saves the agent’s parameters to the specified directory. Read more
Source§fn load_params(&mut self, _path: &Path) -> Result<()>
fn load_params(&mut self, _path: &Path) -> Result<()>
Loads the agent’s parameters from the specified directory. Read more
Source§fn as_any_ref(&self) -> &dyn Any
fn as_any_ref(&self) -> &dyn Any
Returns a reference to the agent as a type-erased
Any
value. Read moreSource§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Returns a mutable reference to the agent as a type-erased
Any
value. Read moreSource§impl Env for TestEnv
impl Env for TestEnv
Source§fn reset(&mut self, _is_done: Option<&Vec<i8>>) -> Result<Self::Obs>
fn reset(&mut self, _is_done: Option<&Vec<i8>>) -> Result<Self::Obs>
Resets the environment to its initial state. Read more
Source§fn reset_with_index(&mut self, _ix: usize) -> Result<Self::Obs>
fn reset_with_index(&mut self, _ix: usize) -> Result<Self::Obs>
Resets the environment with a specific index. Read more
Source§fn step_with_reset(&mut self, a: &Self::Act) -> (Step<Self>, Record)where
Self: Sized,
fn step_with_reset(&mut self, a: &Self::Act) -> (Step<Self>, Record)where
Self: Sized,
Performs a step and automatically resets the environment if the episode ends. Read more
Auto Trait Implementations§
impl Freeze for TestEnv
impl RefUnwindSafe for TestEnv
impl Send for TestEnv
impl Sync for TestEnv
impl Unpin for TestEnv
impl UnwindSafe for TestEnv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more