Struct ratel_bandit::GreedyAgent
source · pub struct GreedyAgent<T> { /* private fields */ }
Expand description
Agent that follows the Greedy Algorithm.
Always chooses the arm with the highest estimated reward.
Implementations§
source§impl<T> GreedyAgent<T>
impl<T> GreedyAgent<T>
Trait Implementations§
source§impl<T: ToPrimitive> Agent<T> for GreedyAgent<T>
impl<T: ToPrimitive> Agent<T> for GreedyAgent<T>
source§fn action(&self) -> usize
fn action(&self) -> usize
The action chosen by the Agent. Picks the arm with the highest estimated return.
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 GreedyAgent<T>
impl<T> !Send for GreedyAgent<T>
impl<T> !Sync for GreedyAgent<T>
impl<T> Unpin for GreedyAgent<T>where
T: Unpin,
impl<T> !UnwindSafe for GreedyAgent<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