Struct ratel_bandit::EpsilonGreedyAgent
source · pub struct EpsilonGreedyAgent<T> { /* private fields */ }
Expand description
Agent that follows the Epsilon-Greedy Algorithm.
A fixed (usually small) percentage of the time it picks a random arm; the rest of the time it picks the arm with the highest expected reward.
Implementations§
Trait Implementations§
source§impl<T: ToPrimitive> Agent<T> for EpsilonGreedyAgent<T>
impl<T: ToPrimitive> Agent<T> for EpsilonGreedyAgent<T>
source§fn action(&self) -> usize
fn action(&self) -> usize
The action chosen by the Agent. A random action with probability epsilon
and the greedy
action otherwise.
source§fn current_estimate(&self, arm: usize) -> f64
fn current_estimate(&self, arm: usize) -> f64
The Agent’s current estimate of the value of a Bandit’s arm.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for EpsilonGreedyAgent<T>
impl<T> !Send for EpsilonGreedyAgent<T>
impl<T> !Sync for EpsilonGreedyAgent<T>
impl<T> Unpin for EpsilonGreedyAgent<T>where
T: Unpin,
impl<T> !UnwindSafe for EpsilonGreedyAgent<T>
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