Struct renforce::trainer::CrossEntropy
[−]
[src]
pub struct CrossEntropy<F: Float> { /* fields omitted */ }
Cross Entropy method for parameter selection
Methods
impl<F: Float> CrossEntropy<F>
[src]
fn new(elite: f64,
num_samples: usize,
eval_period: TimePeriod,
iters: usize)
-> CrossEntropy<F>
num_samples: usize,
eval_period: TimePeriod,
iters: usize)
-> CrossEntropy<F>
Constructs a new CrossEntropy
fn elite(self, elite: f64) -> CrossEntropy<F>
Updates elite field of self
fn num_samples(self, num_samples: usize) -> CrossEntropy<F>
Updates num_samples field of self
fn eval_period(self, eval_period: TimePeriod) -> CrossEntropy<F>
Updates eval_period field of self
fn iters(self, iters: usize) -> CrossEntropy<F>
Updates iters field of self
Trait Implementations
impl<F: Debug + Float> Debug for CrossEntropy<F>
[src]
impl<F: Float, S: Space, A: Space, T> EpisodicTrainer<S, A, T> for CrossEntropy<F> where T: Agent<S, A> + ParameterizedFunc<F>
[src]
fn train_step(&mut self,
agent: &mut T,
env: &mut Environment<State=S, Action=A>)
agent: &mut T,
env: &mut Environment<State=S, Action=A>)
Trains agent using 1 "episodes" worth of exploration
fn train(&mut self, agent: &mut T, env: &mut Environment<State=S, Action=A>)
Trains agent to perform well in the environment, potentially acting out multiple episodes
impl<F: Float> Default for CrossEntropy<F>
[src]
fn default() -> CrossEntropy<F>
Creates a new CrossEntropy with some default values