Trait rsrl::policies::Policy

source ·
pub trait Policy<S> {
    type Action;

    fn sample(&mut self, input: &S) -> Self::Action;
    fn probability(&mut self, input: &S, a: Self::Action) -> f64;

    fn handle_terminal(&mut self, sample: &Transition<S, Self::Action>) { ... }
}
Expand description

Policy trait for functions that select between a set of values.

Required Associated Types§

Required Methods§

Sample the policy distribution for a given input.

Return the probability of selecting an action for a given input.

Provided Methods§

Implementors§