Trait renforce::model::Model
[−]
[src]
pub trait Model<S: Space, A: Space> { fn transition(&self,
curr: &S::Element,
action: &A::Element,
next: &S::Element)
-> f64; fn reward(&self,
curr: &S::Element,
action: &A::Element,
next: &S::Element)
-> f64; fn update(&mut self, transition: Transition<S, A>); }
Represents a (nondeterministic) model of an environment The model itself is composed of the transition and reward functions
Required Methods
fn transition(&self,
curr: &S::Element,
action: &A::Element,
next: &S::Element)
-> f64
curr: &S::Element,
action: &A::Element,
next: &S::Element)
-> f64
Returns the probabilty of moving from curr to next when performing action
fn reward(&self,
curr: &S::Element,
action: &A::Element,
next: &S::Element)
-> f64
curr: &S::Element,
action: &A::Element,
next: &S::Element)
-> f64
Returns the reward received when moving from curr to next when performing action
fn update(&mut self, transition: Transition<S, A>)
Updates the model using information from the given transition
Implementors
impl<S: FiniteSpace, A: FiniteSpace> Model<S, A> for PlainModel<S, A> where S::Element: Hash + Eq,
A::Element: Hash + Eq