pub trait Agent {
type Observation;
type Action;
// Required methods
fn act(&mut self, obs: &Self::Observation, training: bool) -> Self::Action;
fn handle_step(
&mut self,
obs: &Self::Observation,
action: &Self::Action,
reward: f32,
next_obs: &Self::Observation,
done: bool,
);
fn episode_end(&mut self);
}Required Associated Types§
type Observation
type Action
Required Methods§
fn act(&mut self, obs: &Self::Observation, training: bool) -> Self::Action
fn handle_step( &mut self, obs: &Self::Observation, action: &Self::Action, reward: f32, next_obs: &Self::Observation, done: bool, )
fn episode_end(&mut self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".