pub struct TimeStep<B: Backend, S, A, C> {
pub env_id: usize,
pub transition: Transition<B, S, A>,
pub done: bool,
pub ep_len: usize,
pub cum_reward: f64,
pub action_context: C,
}Available on crate feature
rl only.Expand description
A timestep debscribing an iteration of the state/decision process.
Fields§
§env_id: usizeThe environment id.
transition: Transition<B, S, A>The burn_rl::Transition.
done: boolTrue if the environment reaches a terminal state.
ep_len: usizeThe running length of the current episode.
cum_reward: f64The running cumulative reward.
action_context: CThe action’s context for this timestep.
Trait Implementations§
Auto Trait Implementations§
impl<B, S, A, C> Freeze for TimeStep<B, S, A, C>where
C: Freeze,
S: Freeze,
A: Freeze,
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B, S, A, C> RefUnwindSafe for TimeStep<B, S, A, C>where
C: RefUnwindSafe,
S: RefUnwindSafe,
A: RefUnwindSafe,
<B as BackendTypes>::FloatTensorPrimitive: RefUnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B, S, A, C> Send for TimeStep<B, S, A, C>
impl<B, S, A, C> Sync for TimeStep<B, S, A, C>
impl<B, S, A, C> Unpin for TimeStep<B, S, A, C>where
C: Unpin,
S: Unpin,
A: Unpin,
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B, S, A, C> UnsafeUnpin for TimeStep<B, S, A, C>where
C: UnsafeUnpin,
S: UnsafeUnpin,
A: UnsafeUnpin,
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B, S, A, C> UnwindSafe for TimeStep<B, S, A, C>where
C: UnwindSafe,
S: UnwindSafe,
A: UnwindSafe,
<B as BackendTypes>::FloatTensorPrimitive: UnwindSafe,
<B as BackendTypes>::QuantizedTensorPrimitive: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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