pub struct Experience<V> {
pub state: usize,
pub action: usize,
pub reward: V,
pub new_state: usize,
}Expand description
One step’s outcome, reported to QLearner::update_from_experience
(tinymind (C++)’s experience_t).
Fields§
§state: usizeThe state the step started in; the update changes its Q value. A state
of STATES or more changes nothing (tinymind (C++)’s invalid state).
action: usizeThe action taken.
reward: VThe reward it earned.
new_state: usizeThe state it led to.
Trait Implementations§
Source§impl<V: Clone> Clone for Experience<V>
impl<V: Clone> Clone for Experience<V>
impl<V: Copy> Copy for Experience<V>
Source§impl<V: Debug> Debug for Experience<V>
impl<V: Debug> Debug for Experience<V>
Source§impl<V: PartialEq> PartialEq for Experience<V>
impl<V: PartialEq> PartialEq for Experience<V>
impl<V: PartialEq> StructuralPartialEq for Experience<V>
Auto Trait Implementations§
impl<V> Freeze for Experience<V>where
V: Freeze,
impl<V> RefUnwindSafe for Experience<V>where
V: RefUnwindSafe,
impl<V> Send for Experience<V>where
V: Send,
impl<V> Sync for Experience<V>where
V: Sync,
impl<V> Unpin for Experience<V>where
V: Unpin,
impl<V> UnsafeUnpin for Experience<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for Experience<V>where
V: 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