Struct renforce::model::PlainModel
[−]
[src]
pub struct PlainModel<S: FiniteSpace, A: FiniteSpace> where S::Element: Hash + Eq,
A::Element: Hash + Eq { /* fields omitted */ }
StraightForward model that approximates probabilities can counting observations
Methods
impl<S: FiniteSpace, A: FiniteSpace> PlainModel<S, A> where S::Element: Hash + Eq,
A::Element: Hash + Eq
[src]
A::Element: Hash + Eq
fn new() -> PlainModel<S, A>
Creates a new PlainModel
Trait Implementations
impl<S: Debug + FiniteSpace, A: Debug + FiniteSpace> Debug for PlainModel<S, A> where S::Element: Hash + Eq,
A::Element: Hash + Eq,
S::Element: Debug,
A::Element: Debug
[src]
A::Element: Hash + Eq,
S::Element: Debug,
A::Element: Debug
impl<S: FiniteSpace, A: FiniteSpace> Model<S, A> for PlainModel<S, A> where S::Element: Hash + Eq,
A::Element: Hash + Eq
[src]
A::Element: Hash + Eq
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