pub trait Agent {
type Tensor: R2lTensor;
type Actor: Actor<Tensor = Self::Tensor> + Clone;
// Required methods
fn actor(&self) -> Self::Actor;
fn learn<B: TrajectoryBatch<Self::Tensor>>(
&mut self,
buffers: &[B],
) -> Result<(), Error>;
fn set_learning_rate(&mut self, learning_rate: f64);
}Expand description
Trainable on-policy component that owns an actor and learns from rollouts.
Required Associated Types§
Required Methods§
Sourcefn set_learning_rate(&mut self, learning_rate: f64)
fn set_learning_rate(&mut self, learning_rate: f64)
Sets the learning rate used by future updates.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".