Trait renforce::util::VFunction
[−]
[src]
pub trait VFunction<S: Space>: Debug { fn eval(&self, state: &S::Element) -> f64; fn update(&mut self, state: &S::Element, new_val: f64, alpha: f64); }
VFunction Trait
Represents a function V: S -> R that takes in a state and returns its value
Required Methods
fn eval(&self, state: &S::Element) -> f64
Evaluate the function on the given state
fn update(&mut self, state: &S::Element, new_val: f64, alpha: f64)
Update the function using the given information (alpha is learning rate)
Implementors
impl<S: Space, A: FiniteSpace> VFunction<S> for BinaryVAgent<S, A>
impl<S: FiniteSpace> VFunction<S> for VTable<S> where S::Element: Hash + Eq
impl<F: Float + Debug, S: Space> VFunction<S> for VLinear<F, S>