Struct border_core::DefaultEvaluator
source · 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>where
E: Env,
P: Policy<E>,
impl<E, P> DefaultEvaluator<E, P>where E: Env, P: Policy<E>,
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> RefUnwindSafe for DefaultEvaluator<E, P>where E: RefUnwindSafe, P: RefUnwindSafe,
impl<E, P> Send for DefaultEvaluator<E, P>where E: Send, P: Send,
impl<E, P> Sync for DefaultEvaluator<E, P>where E: Sync, P: Sync,
impl<E, P> Unpin for DefaultEvaluator<E, P>where E: Unpin, P: Unpin,
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