Trait rsrl::domains::Domain

source ·
pub trait Domain {
    type StateSpace: Space;
    type ActionSpace: Space;

    fn emit(&self) -> Observation<<Self::StateSpace as Space>::Value>;
    fn step(
        &mut self,
        a: <Self::ActionSpace as Space>::Value
    ) -> Transition<<Self::StateSpace as Space>::Value, <Self::ActionSpace as Space>::Value>; fn is_terminal(&self) -> bool; fn reward(
        &self,
        from: &Observation<<Self::StateSpace as Space>::Value>,
        to: &Observation<<Self::StateSpace as Space>::Value>
    ) -> f64; fn state_space(&self) -> Self::StateSpace; fn action_space(&self) -> Self::ActionSpace; }
Expand description

An interface for constructing reinforcement learning problem domains.

Required Associated Types§

State space representation type class.

Action space representation type class.

Required Methods§

Emit an observation of the current state of the environment.

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

Returns true if the current state is terminal.

Compute the reward associated with a transition from one state to another.

Returns an instance of the state space type class.

Returns an instance of the action space type class.

Implementors§