pub struct EpsilonGreedy {
pub n_opts: usize,
pub eps_start: f64,
pub eps_final: f64,
pub final_step: usize,
}Expand description
Epsilon-greedy explorer for DQN.
Fields§
§n_opts: usize§eps_start: f64§eps_final: f64§final_step: usizeImplementations§
Source§impl EpsilonGreedy
impl EpsilonGreedy
Sourcepub fn with_final_step(final_step: usize) -> DqnExplorer
pub fn with_final_step(final_step: usize) -> DqnExplorer
Constructs epsilon-greedy explorer.
TODO: improve interface.
Sourcepub fn action(&mut self, a: &Tensor) -> Tensor
pub fn action(&mut self, a: &Tensor) -> Tensor
Takes an action based on the observation and the critic.
Sourcepub fn action_with_best(&mut self, a: &Tensor) -> (Tensor, bool)
pub fn action_with_best(&mut self, a: &Tensor) -> (Tensor, bool)
Takes an action based on the observation and the critic.
Trait Implementations§
Source§impl Clone for EpsilonGreedy
impl Clone for EpsilonGreedy
Source§fn clone(&self) -> EpsilonGreedy
fn clone(&self) -> EpsilonGreedy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EpsilonGreedy
impl Debug for EpsilonGreedy
Source§impl<'de> Deserialize<'de> for EpsilonGreedy
impl<'de> Deserialize<'de> for EpsilonGreedy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EpsilonGreedy
impl PartialEq for EpsilonGreedy
Source§impl Serialize for EpsilonGreedy
impl Serialize for EpsilonGreedy
impl StructuralPartialEq for EpsilonGreedy
Auto Trait Implementations§
impl Freeze for EpsilonGreedy
impl RefUnwindSafe for EpsilonGreedy
impl Send for EpsilonGreedy
impl Sync for EpsilonGreedy
impl Unpin for EpsilonGreedy
impl UnwindSafe for EpsilonGreedy
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