[][src]Trait rsrl_domains::Domain

pub trait Domain {
    type StateSpace: Space;
    type ActionSpace: Space;
    fn state_space(&self) -> Self::StateSpace;
fn action_space(&self) -> Self::ActionSpace;
fn emit(&self) -> Observation<State<Self>>;
fn step(&mut self, a: &Action<Self>) -> (Observation<State<Self>>, Reward); fn transition(
        &mut self,
        a: Action<Self>
    ) -> Transition<State<Self>, Action<Self>> { ... }
fn rollout<F>(
        self,
        pi: F,
        step_limit: Option<usize>
    ) -> Trajectory<State<Self>, Action<Self>>
    where
        F: FnMut(&State<Self>) -> Action<Self>,
        Self: Sized
, { ... } }

An interface for constructing reinforcement learning problem domains.

Associated Types

type StateSpace: Space

State space representation type class.

type ActionSpace: Space

Action space representation type class.

Loading content...

Required methods

fn state_space(&self) -> Self::StateSpace

Returns an instance of the state space type class.

fn action_space(&self) -> Self::ActionSpace

Returns an instance of the action space type class.

fn emit(&self) -> Observation<State<Self>>

Emit an observation of the current state of the environment.

fn step(&mut self, a: &Action<Self>) -> (Observation<State<Self>>, Reward)

Transition the environment forward a single step given an action, a.

Loading content...

Provided methods

fn transition(
    &mut self,
    a: Action<Self>
) -> Transition<State<Self>, Action<Self>>

fn rollout<F>(
    self,
    pi: F,
    step_limit: Option<usize>
) -> Trajectory<State<Self>, Action<Self>> where
    F: FnMut(&State<Self>) -> Action<Self>,
    Self: Sized

Loading content...

Implementors

impl Domain for Acrobot[src]

impl Domain for CartPole[src]

impl Domain for CliffWalk[src]

impl Domain for ContinuousMountainCar[src]

impl Domain for HIVTreatment[src]

impl Domain for MountainCar[src]

impl Domain for Roulette[src]

type StateSpace = Reals

type ActionSpace = Ordinal

Loading content...