Trait renforce::util::DifferentiableFunc
[−]
[src]
pub trait DifferentiableFunc<S: Space, A: Space, T: Num>: ParameterizedFunc<T> { fn get_grad(&self, state: &S::Element, action: &A::Element) -> Vec<T>; fn calculate(&self, state: &S::Element, action: &A::Element) -> T; }
A differentiable function taking in (state, action) pairs
Required Methods
fn get_grad(&self, state: &S::Element, action: &A::Element) -> Vec<T>
Calculates the gradient of the output with respect to this function's parameters
fn calculate(&self, state: &S::Element, action: &A::Element) -> T
Calculates the result of calling function on given input
Implementors
impl<F: Float, A: FiniteSpace, S: Space, Q> DifferentiableFunc<S, A, F> for GreedyQAgent<S, A, Q> where Q: QFunction<S, A> + DifferentiableFunc<S, A, F>
impl<F: Float, S: Space, A: FiniteSpace, Q, T> DifferentiableFunc<S, A, F> for EGreedyQAgent<S, A, Q, T> where T: Chooser<A::Element>,
Q: QFunction<S, A> + DifferentiableFunc<S, A, F>impl<S: Space, A: Space, F: Float + Debug> DifferentiableFunc<S, A, F> for VLinear<F, S>
impl<S: Space, A: FiniteSpace, F: Float + Debug> DifferentiableFunc<S, A, F> for QLinear<F, S, A> where A::Element: Hash + Eq