Struct OffPolicyStrategy
pub struct OffPolicyStrategy { /* private fields */ }Expand description
Off-policy reinforcement learning strategy with multi-env experience collection and double-batching.
Implementations§
§impl OffPolicyStrategy
impl OffPolicyStrategy
pub fn new(config: OffPolicyConfig) -> OffPolicyStrategy
pub fn new(config: OffPolicyConfig) -> OffPolicyStrategy
Create a new off-policy base strategy.
Trait Implementations§
§impl<RLC> RLStrategy<RLC> for OffPolicyStrategywhere
RLC: RLComponentsTypes,
<RLC as RLComponentsTypes>::PolicyObs: SliceAccess,
<RLC as RLComponentsTypes>::PolicyAction: SliceAccess,
impl<RLC> RLStrategy<RLC> for OffPolicyStrategywhere
RLC: RLComponentsTypes,
<RLC as RLComponentsTypes>::PolicyObs: SliceAccess,
<RLC as RLComponentsTypes>::PolicyAction: SliceAccess,
§fn train_loop(
&self,
training_components: RLComponents<RLC>,
learner_agent: &mut <RLC as RLComponentsTypes>::LearningAgent,
starting_epoch: usize,
env_init: <RLC as RLComponentsTypes>::EnvInit,
) -> (<RLC as RLComponentsTypes>::Policy, AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>)
fn train_loop( &self, training_components: RLComponents<RLC>, learner_agent: &mut <RLC as RLComponentsTypes>::LearningAgent, starting_epoch: usize, env_init: <RLC as RLComponentsTypes>::EnvInit, ) -> (<RLC as RLComponentsTypes>::Policy, AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>)
Training loop for this strategy
§fn train(
&self,
learner_agent: <RLC as RLComponentsTypes>::LearningAgent,
training_components: RLComponents<RLC>,
env_init: <RLC as RLComponentsTypes>::EnvInit,
) -> RLResult<<RLC as RLComponentsTypes>::Policy>
fn train( &self, learner_agent: <RLC as RLComponentsTypes>::LearningAgent, training_components: RLComponents<RLC>, env_init: <RLC as RLComponentsTypes>::EnvInit, ) -> RLResult<<RLC as RLComponentsTypes>::Policy>
Train the learner agent with this strategy.
Auto Trait Implementations§
impl Freeze for OffPolicyStrategy
impl RefUnwindSafe for OffPolicyStrategy
impl Send for OffPolicyStrategy
impl Sync for OffPolicyStrategy
impl Unpin for OffPolicyStrategy
impl UnsafeUnpin for OffPolicyStrategy
impl UnwindSafe for OffPolicyStrategy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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