pub struct EpisodeRecord {
pub total_reward: f64,
pub length: usize,
pub status: EpisodeStatus,
pub extras: HashMap<String, f64>,
}Expand description
Stats recorded for a single completed episode.
Produced by the runner at every episode boundary and fed to StatsTracker.
The extras map holds any additional per-episode scalars the user wants
to track (e.g. custom environment metrics).
Fields§
§total_reward: f64Total undiscounted reward for the episode.
length: usizeNumber of steps in the episode.
status: EpisodeStatusHow the episode ended.
extras: HashMap<String, f64>Arbitrary scalar extras provided by the user or environment.
Implementations§
Source§impl EpisodeRecord
impl EpisodeRecord
pub fn new(total_reward: f64, length: usize, status: EpisodeStatus) -> Self
pub fn with_extra(self, key: impl Into<String>, value: f64) -> Self
Trait Implementations§
Source§impl Clone for EpisodeRecord
impl Clone for EpisodeRecord
Source§fn clone(&self) -> EpisodeRecord
fn clone(&self) -> EpisodeRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EpisodeRecord
impl Debug for EpisodeRecord
Source§impl<'de> Deserialize<'de> for EpisodeRecord
impl<'de> Deserialize<'de> for EpisodeRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EpisodeRecord
impl RefUnwindSafe for EpisodeRecord
impl Send for EpisodeRecord
impl Sync for EpisodeRecord
impl Unpin for EpisodeRecord
impl UnsafeUnpin for EpisodeRecord
impl UnwindSafe for EpisodeRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more