pub struct RandomAgent { /* private fields */ }Expand description
A random policy.
Implementations§
Source§impl RandomAgent
impl RandomAgent
Sourcepub fn n_opts_steps(&self) -> usize
pub fn n_opts_steps(&self) -> usize
Returns the number of optimization steps;
Trait Implementations§
Source§impl<R: ReplayBufferBase> Agent<BorderAtariEnv<BorderAtariObs, BorderAtariAct, BorderAtariObsRawFilter<BorderAtariObs>, BorderAtariActRawFilter<BorderAtariAct>>, R> for RandomAgent
impl<R: ReplayBufferBase> Agent<BorderAtariEnv<BorderAtariObs, BorderAtariAct, BorderAtariObsRawFilter<BorderAtariObs>, BorderAtariActRawFilter<BorderAtariAct>>, R> for RandomAgent
Source§fn opt_with_record(&mut self, _buffer: &mut R) -> Record
fn opt_with_record(&mut self, _buffer: &mut R) -> 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_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§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§impl Configurable for RandomAgent
impl Configurable for RandomAgent
Auto Trait Implementations§
impl Freeze for RandomAgent
impl RefUnwindSafe for RandomAgent
impl Send for RandomAgent
impl Sync for RandomAgent
impl Unpin for RandomAgent
impl UnwindSafe for RandomAgent
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more