pub struct MetaObservation<O, A, FI> {
pub inner_observation: Option<O>,
pub prev_step: Option<InnerStepObs<A, FI>>,
pub episode_done: bool,
}
Expand description
An observation from a meta enviornment.
Note
The generic feedback type FI
is the inner feedback E::Feedback::Inner
for MetaEnv<E>
.
Fields
inner_observation: Option<O>
The current inner observation on which the next step will act.
Is None
if this is a terminal state, in which case episode_done
must be True
.
prev_step: Option<InnerStepObs<A, FI>>
Observation of the previous inner step.
Is None
if this is the first step of an inner episode.
episode_done: bool
Whether the previous step ended the inner episode.
Trait Implementations
sourceimpl<TC, OS, AS, FS> Actor<MetaObservation<<OS as Space>::Element, <AS as Space>::Element, <FS as Space>::Element>, <AS as Space>::Element> for ResettingMetaAgent<TC, OS, AS, FS> where
TC: BuildAgent<OS, AS, FS>,
TC::Agent: BatchUpdate<OS::Element, AS::Element, Feedback = FS::Element>,
OS: Space + Clone,
AS: NonEmptySpace + Clone,
FS: Space + Clone,
impl<TC, OS, AS, FS> Actor<MetaObservation<<OS as Space>::Element, <AS as Space>::Element, <FS as Space>::Element>, <AS as Space>::Element> for ResettingMetaAgent<TC, OS, AS, FS> where
TC: BuildAgent<OS, AS, FS>,
TC::Agent: BatchUpdate<OS::Element, AS::Element, Feedback = FS::Element>,
OS: Space + Clone,
AS: NonEmptySpace + Clone,
FS: Space + Clone,
type EpisodeState = InnerEpisodeState<<TC as BuildAgent<OS, AS, FS>>::Agent, <OS as Space>::Element, <AS as Space>::Element>
type EpisodeState = InnerEpisodeState<<TC as BuildAgent<OS, AS, FS>>::Agent, <OS as Space>::Element, <AS as Space>::Element>
Stores state for each episode.
sourcefn initial_state(&self, rng: &mut Prng) -> Self::EpisodeState
fn initial_state(&self, rng: &mut Prng) -> Self::EpisodeState
Create the initial actor state for the start of a new episode.
sourcefn act(
&self,
state: &mut Self::EpisodeState,
obs: &MetaObservation<OS::Element, AS::Element, FS::Element>,
rng: &mut Prng
) -> AS::Element
fn act(
&self,
state: &mut Self::EpisodeState,
obs: &MetaObservation<OS::Element, AS::Element, FS::Element>,
rng: &mut Prng
) -> AS::Element
Select an action in response to an observation. Read more
sourceimpl<TC, OS, AS, FS> Agent<MetaObservation<<OS as Space>::Element, <AS as Space>::Element, <FS as Space>::Element>, <AS as Space>::Element> for Arc<ResettingMetaAgent<TC, OS, AS, FS>> where
TC: BuildAgent<OS, AS, FS>,
TC::Agent: BatchUpdate<OS::Element, AS::Element, Feedback = FS::Element>,
OS: Space + Clone,
AS: NonEmptySpace + Clone,
FS: Space + Clone,
impl<TC, OS, AS, FS> Agent<MetaObservation<<OS as Space>::Element, <AS as Space>::Element, <FS as Space>::Element>, <AS as Space>::Element> for Arc<ResettingMetaAgent<TC, OS, AS, FS>> where
TC: BuildAgent<OS, AS, FS>,
TC::Agent: BatchUpdate<OS::Element, AS::Element, Feedback = FS::Element>,
OS: Space + Clone,
AS: NonEmptySpace + Clone,
FS: Space + Clone,
sourceimpl<TC, OS, AS, FS> BatchUpdate<MetaObservation<<OS as Space>::Element, <AS as Space>::Element, <FS as Space>::Element>, <AS as Space>::Element> for Arc<ResettingMetaAgent<TC, OS, AS, FS>> where
OS: Space,
AS: Space,
FS: Space,
impl<TC, OS, AS, FS> BatchUpdate<MetaObservation<<OS as Space>::Element, <AS as Space>::Element, <FS as Space>::Element>, <AS as Space>::Element> for Arc<ResettingMetaAgent<TC, OS, AS, FS>> where
OS: Space,
AS: Space,
FS: Space,
No updates at the meta-level.
type HistoryBuffer = NullBuffer
sourcefn buffer(&self) -> Self::HistoryBuffer
fn buffer(&self) -> Self::HistoryBuffer
Create a new history buffer.
sourcefn min_update_size(&self) -> HistoryDataBound
fn min_update_size(&self) -> HistoryDataBound
Request a minimum amount of on-policy data for the next batch update.
sourcefn batch_update<'a, I>(&mut self, _buffers: I, _logger: &mut dyn StatsLogger) where
I: IntoIterator<Item = &'a mut Self::HistoryBuffer>,
Self::HistoryBuffer: 'a,
fn batch_update<'a, I>(&mut self, _buffers: I, _logger: &mut dyn StatsLogger) where
I: IntoIterator<Item = &'a mut Self::HistoryBuffer>,
Self::HistoryBuffer: 'a,
Update the agent from a collection of history buffers. Read more
sourceimpl<O: Clone, A: Clone, FI: Clone> Clone for MetaObservation<O, A, FI>
impl<O: Clone, A: Clone, FI: Clone> Clone for MetaObservation<O, A, FI>
sourcefn clone(&self) -> MetaObservation<O, A, FI>
fn clone(&self) -> MetaObservation<O, A, FI>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<O: PartialEq, A: PartialEq, FI: PartialEq> PartialEq<MetaObservation<O, A, FI>> for MetaObservation<O, A, FI>
impl<O: PartialEq, A: PartialEq, FI: PartialEq> PartialEq<MetaObservation<O, A, FI>> for MetaObservation<O, A, FI>
sourcefn eq(&self, other: &MetaObservation<O, A, FI>) -> bool
fn eq(&self, other: &MetaObservation<O, A, FI>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MetaObservation<O, A, FI>) -> bool
fn ne(&self, other: &MetaObservation<O, A, FI>) -> bool
This method tests for !=
.
impl<O: Copy, A: Copy, FI: Copy> Copy for MetaObservation<O, A, FI>
impl<O, A, FI> StructuralPartialEq for MetaObservation<O, A, FI>
Auto Trait Implementations
impl<O, A, FI> RefUnwindSafe for MetaObservation<O, A, FI> where
A: RefUnwindSafe,
FI: RefUnwindSafe,
O: RefUnwindSafe,
impl<O, A, FI> Send for MetaObservation<O, A, FI> where
A: Send,
FI: Send,
O: Send,
impl<O, A, FI> Sync for MetaObservation<O, A, FI> where
A: Sync,
FI: Sync,
O: Sync,
impl<O, A, FI> Unpin for MetaObservation<O, A, FI> where
A: Unpin,
FI: Unpin,
O: Unpin,
impl<O, A, FI> UnwindSafe for MetaObservation<O, A, FI> where
A: UnwindSafe,
FI: UnwindSafe,
O: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more