pub struct OffPolicyStrategy<RLC: RLComponentsTypes> { /* private fields */ }Available on crate feature
rl only.Expand description
Off-policy reinforcement learning strategy with multi-env experience collection and double-batching.
Implementations§
Source§impl<RLC: RLComponentsTypes> OffPolicyStrategy<RLC>
impl<RLC: RLComponentsTypes> OffPolicyStrategy<RLC>
Sourcepub fn new(config: OffPolicyConfig) -> Self
pub fn new(config: OffPolicyConfig) -> Self
Create a new off-policy base strategy.
Trait Implementations§
Source§impl<RLC> RLStrategy<RLC> for OffPolicyStrategy<RLC>where
RLC: RLComponentsTypes,
RLC::PolicyObs: SliceAccess<RLC::Backend>,
RLC::PolicyAction: SliceAccess<RLC::Backend>,
impl<RLC> RLStrategy<RLC> for OffPolicyStrategy<RLC>where
RLC: RLComponentsTypes,
RLC::PolicyObs: SliceAccess<RLC::Backend>,
RLC::PolicyAction: SliceAccess<RLC::Backend>,
Source§fn train_loop(
&self,
training_components: RLComponents<RLC>,
learner_agent: &mut RLC::LearningAgent,
starting_epoch: usize,
env_init: RLC::EnvInit,
) -> (RLC::Policy, RLEventProcessorType<RLC>)
fn train_loop( &self, training_components: RLComponents<RLC>, learner_agent: &mut RLC::LearningAgent, starting_epoch: usize, env_init: RLC::EnvInit, ) -> (RLC::Policy, RLEventProcessorType<RLC>)
Training loop for this strategy
Source§fn train(
&self,
learner_agent: RLC::LearningAgent,
training_components: RLComponents<RLC>,
env_init: RLC::EnvInit,
) -> RLResult<RLC::Policy>
fn train( &self, learner_agent: RLC::LearningAgent, training_components: RLComponents<RLC>, env_init: RLC::EnvInit, ) -> RLResult<RLC::Policy>
Train the learner agent with this strategy.
Auto Trait Implementations§
impl<RLC> Freeze for OffPolicyStrategy<RLC>
impl<RLC> RefUnwindSafe for OffPolicyStrategy<RLC>where
RLC: RefUnwindSafe,
impl<RLC> Send for OffPolicyStrategy<RLC>where
RLC: Send,
impl<RLC> Sync for OffPolicyStrategy<RLC>where
RLC: Sync,
impl<RLC> Unpin for OffPolicyStrategy<RLC>where
RLC: Unpin,
impl<RLC> UnsafeUnpin for OffPolicyStrategy<RLC>
impl<RLC> UnwindSafe for OffPolicyStrategy<RLC>where
RLC: 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
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