pub struct DefaultEvaluator<E: Env, P: Policy<E>> { /* private fields */ }
Expand description
A default Evaluator
.
This struct runs episodes of the given number of times.
Implementations§
Source§impl<E, P> DefaultEvaluator<E, P>
impl<E, P> DefaultEvaluator<E, P>
Sourcepub fn new(config: &E::Config, seed: i64, n_episodes: usize) -> Result<Self>
pub fn new(config: &E::Config, seed: i64, n_episodes: usize) -> Result<Self>
Constructs DefaultEvaluator
.
config
- Configuration of the environment.
seed
- Random seed, which will be used to create the environment.
n_episodes
- The number of episodes for evaluation.
The evaluator returns the mean value of cumulative reward in each episode.
Trait Implementations§
Auto Trait Implementations§
impl<E, P> Freeze for DefaultEvaluator<E, P>where
E: Freeze,
impl<E, P> RefUnwindSafe for DefaultEvaluator<E, P>where
E: RefUnwindSafe,
P: RefUnwindSafe,
impl<E, P> Send for DefaultEvaluator<E, P>
impl<E, P> Sync for DefaultEvaluator<E, P>
impl<E, P> Unpin for DefaultEvaluator<E, P>
impl<E, P> UnwindSafe for DefaultEvaluator<E, P>where
E: UnwindSafe,
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more