pub struct OffPolicyStrategy { /* 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 OffPolicyStrategy
impl OffPolicyStrategy
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
impl<RLC> RLStrategy<RLC> for OffPolicyStrategy
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 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
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