pub struct Transition<B: Backend, S, A> {
pub state: S,
pub next_state: S,
pub action: A,
pub reward: Tensor<B, 1>,
pub done: Tensor<B, 1>,
}Expand description
A state transition in an environment.
Fields§
§state: SThe initial state.
next_state: SThe state after the step was taken.
action: AThe action taken in the step.
reward: Tensor<B, 1>The reward.
done: Tensor<B, 1>If the environment has reached a terminal state.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<B, S, A> Freeze for Transition<B, S, A>where
S: Freeze,
A: Freeze,
<B as Backend>::FloatTensorPrimitive: Freeze,
<B as Backend>::QuantizedTensorPrimitive: Freeze,
impl<B, S, A> RefUnwindSafe for Transition<B, S, A>where
S: RefUnwindSafe,
A: RefUnwindSafe,
<B as Backend>::FloatTensorPrimitive: RefUnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B, S, A> Send for Transition<B, S, A>
impl<B, S, A> Sync for Transition<B, S, A>
impl<B, S, A> Unpin for Transition<B, S, A>where
S: Unpin,
A: Unpin,
<B as Backend>::FloatTensorPrimitive: Unpin,
<B as Backend>::QuantizedTensorPrimitive: Unpin,
impl<B, S, A> UnsafeUnpin for Transition<B, S, A>where
S: UnsafeUnpin,
A: UnsafeUnpin,
<B as Backend>::FloatTensorPrimitive: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B, S, A> UnwindSafe for Transition<B, S, A>where
S: UnwindSafe,
A: UnwindSafe,
<B as Backend>::FloatTensorPrimitive: UnwindSafe,
<B as Backend>::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