pub struct HeuristicBot { /* private fields */ }Expand description
A deterministic rule-of-thumb player.
Keeps follow a fixed ladder — bank made hands, chase the biggest
matched set, then straights, then a paired upper face — and category
choice maximizes points over par. Averages
216 points over 10 000 seeded games (examples/arena.rs) against
the optimal 254.59; use OptimalBot when
strength matters more than startup time.
Implementations§
Source§impl HeuristicBot
impl HeuristicBot
Sourcepub fn new() -> Self
pub fn new() -> Self
A bot with the default HeuristicConfig.
Sourcepub const fn config(self, config: HeuristicConfig) -> Self
pub const fn config(self, config: HeuristicConfig) -> Self
Replaces the tuning knobs, builder style.
Trait Implementations§
Source§impl Clone for HeuristicBot
impl Clone for HeuristicBot
Source§fn clone(&self) -> HeuristicBot
fn clone(&self) -> HeuristicBot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HeuristicBot
Source§impl Debug for HeuristicBot
impl Debug for HeuristicBot
Source§impl Default for HeuristicBot
impl Default for HeuristicBot
Source§fn default() -> HeuristicBot
fn default() -> HeuristicBot
Returns the “default value” for a type. Read more
Source§impl Strategy for HeuristicBot
impl Strategy for HeuristicBot
Source§fn choose_action(&mut self, view: &View<'_>) -> TurnAction
fn choose_action(&mut self, view: &View<'_>) -> TurnAction
Decides with rolls remaining: hold and reroll, or score now.
Source§fn choose_category(&mut self, view: &View<'_>) -> Category
fn choose_category(&mut self, view: &View<'_>) -> Category
Decides after the final roll: which category to score.
Auto Trait Implementations§
impl Freeze for HeuristicBot
impl RefUnwindSafe for HeuristicBot
impl Send for HeuristicBot
impl Sync for HeuristicBot
impl Unpin for HeuristicBot
impl UnsafeUnpin for HeuristicBot
impl UnwindSafe for HeuristicBot
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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