Trait border_core::core::base::Env[][src]

pub trait Env {
    type Obs: Obs;
    type Act: Act;
    type Info: Info;
    fn step(&mut self, a: &Self::Act) -> (Step<Self>, Record)
    where
        Self: Sized
;
fn reset(
        &mut self,
        is_done: Option<&Vec<i8>>
    ) -> Result<Self::Obs, Box<dyn Error>>; }
Expand description

Represents an environment, typically an MDP.

Associated Types

type Obs: Obs[src]

Observation of the environment.

type Act: Act[src]

Action of the environment.

type Info: Info[src]

Information in the self::Step object.

Required methods

fn step(&mut self, a: &Self::Act) -> (Step<Self>, Record) where
    Self: Sized
[src]

Performes an interaction step.

fn reset(
    &mut self,
    is_done: Option<&Vec<i8>>
) -> Result<Self::Obs, Box<dyn Error>>
[src]

Reset the i-th environment if is_done[i]==1.0. Thei-th return value should be ignored if is_done[i]==0.0.

Implementors