Struct renforce::agent::qagents::EGreedyQAgent [] [src]

pub struct EGreedyQAgent<S: Space, A: FiniteSpace, Q: QFunction<S, A>, T: Chooser<A::Element>> { /* fields omitted */ }

Epsilon Greedy Q-Agent

Represents an agent that acts randomly with probabilty epsilon and acts greedily with probabilty (1 - epsilon)

Methods

impl<S: Space, A: FiniteSpace, Q, T> EGreedyQAgent<S, A, Q, T> where T: Chooser<A::Element>,
        Q: QFunction<S, A>
[src]

Returns a new EGreedyQAgent with the given information

Sets new value for epsilon

Returns a GreedyQAgent using this agent's q_function

Trait Implementations

impl<S: Debug + Space, A: Debug + FiniteSpace, Q: Debug + QFunction<S, A>, T: Debug + Chooser<A::Element>> Debug for EGreedyQAgent<S, A, Q, T>
[src]

Formats the value using the given formatter.

impl<S: Space, A: FiniteSpace, Q, T> Agent<S, A> for EGreedyQAgent<S, A, Q, T> where T: Chooser<A::Element>,
        Q: QFunction<S, A>
[src]

Returns the actions the agent should perform in the given state

impl<S: Space, A: FiniteSpace, Q, T> QFunction<S, A> for EGreedyQAgent<S, A, Q, T> where T: Chooser<A::Element>,
        Q: QFunction<S, A>
[src]

Evaluate the function on the given state and action

Update the function using the given information (alpha is learning rate)

impl<N: Num, S: Space, A: FiniteSpace, Q, T> ParameterizedFunc<N> for EGreedyQAgent<S, A, Q, T> where T: Chooser<A::Element>,
        Q: QFunction<S, A> + ParameterizedFunc<N>
[src]

Returns number of parameters used by the function

Returns the parameters used by the function

Changes the parameters used by the function

impl<F: Float, S: Space, A: FiniteSpace, Q, T> FeatureExtractor<S, A, F> for EGreedyQAgent<S, A, Q, T> where T: Chooser<A::Element>,
        Q: QFunction<S, A> + FeatureExtractor<S, A, F>
[src]

Number of features that can be calculated

Vector containg the values of all the features for this state

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>
[src]

Calculates the gradient of the output with respect to this function's parameters

Calculates the result of calling function on given input