pub struct Step<E: Env> {
pub act: E::Act,
pub obs: E::Obs,
pub reward: Vec<f32>,
pub is_terminated: Vec<i8>,
pub is_truncated: Vec<i8>,
pub info: E::Info,
pub init_obs: E::Obs,
}
Expand description
Represents an action, observation and reward tuple (a_t, o_t+1, r_t)
with some additional information.
An environment emits Step
object at every interaction steps.
This object might be used to create transitions (o_t, a_t, o_t+1, r_t)
.
Fields§
§act: E::Act
Action.
obs: E::Obs
Observation.
reward: Vec<f32>
Reward.
is_terminated: Vec<i8>
Flag denoting if episode is terminated.
is_truncated: Vec<i8>
Flag denoting if episode is truncated.
info: E::Info
Information defined by user.
init_obs: E::Obs
Initial observation. If is_done[i] == 0
, the corresponding element will not be used.
Implementations§
Auto Trait Implementations§
impl<E> Freeze for Step<E>
impl<E> RefUnwindSafe for Step<E>where
<E as Env>::Act: RefUnwindSafe,
<E as Env>::Obs: RefUnwindSafe,
<E as Env>::Info: RefUnwindSafe,
impl<E> Send for Step<E>
impl<E> Sync for Step<E>
impl<E> Unpin for Step<E>
impl<E> UnwindSafe for Step<E>
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