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 some information.
Source§fn save_params<T: AsRef<Path>>(&self, _path: T) -> Result<()>
fn save_params<T: AsRef<Path>>(&self, _path: T) -> Result<()>
Save the parameters of the agent in the given directory.
This method commonly creates a number of files consisting the agent
in the directory. For example, the DQN agent in
border_tch_agent
crate saves
two Q-networks corresponding to the original and target networks.Source§impl Configurable<TestEnv> for TestAgent
impl Configurable<TestEnv> for TestAgent
Source§impl Env for TestEnv
impl Env for TestEnv
Source§type Info = TestInfo
type Info = TestInfo
Information in the self::Step object.
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 given 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,
Performes an environment step and reset the environment if an episode ends.
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