Skip to main content

Agent

Trait Agent 

Source
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§

Required Methods§

Source

fn act(&mut self, obs: &Self::Observation, training: bool) -> Self::Action

Source

fn handle_step( &mut self, obs: &Self::Observation, action: &Self::Action, reward: f32, next_obs: &Self::Observation, done: bool, )

Source

fn episode_end(&mut self)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§