pub struct EaaiSimpleBot<R> { /* private fields */ }Expand description
The reference baseline of the EAAI-2021 Gin Rummy challenge
A port of SimpleGinRummyPlayer from Todd Neller’s challenge
framework: it ignores everything the opponent does, takes the face-up
card only when it immediately joins a meld, sheds a uniformly random
card among those leaving minimal deadwood — refusing to repeat a
(draw, discard) pair within a round, the original’s loop breaker —
and knocks at the first legal opportunity. It exists as a fixed
measuring stick for comparisons across engines and papers, not as a
good player, so there are no tuning knobs.
Departures from the Java original, none of which change its policy
under the challenge rules: the knock spread is best_melds’s
optimal arrangement rather than a random optimal one (this affects
only which layoffs the defender is offered); layoffs use this crate’s
greedy layoff in place of the framework’s automatic first-fit sweep;
and the knock threshold follows View::knock_limit rather than a
hardcoded 10, so the bot stays legal under any ruleset.
The EAAI framework has no big gin, so this bot never declares it; run
benchmarks with big_gin_bonus: None for exactly the challenge’s
round conditions.
Implementations§
Trait Implementations§
Source§impl<R: Clone> Clone for EaaiSimpleBot<R>
impl<R: Clone> Clone for EaaiSimpleBot<R>
Source§fn clone(&self) -> EaaiSimpleBot<R>
fn clone(&self) -> EaaiSimpleBot<R>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<R: Debug> Debug for EaaiSimpleBot<R>
impl<R: Debug> Debug for EaaiSimpleBot<R>
Source§impl<R: Rng> Strategy for EaaiSimpleBot<R>
impl<R: Rng> Strategy for EaaiSimpleBot<R>
Source§fn offer_upcard(&mut self, view: &View<'_>) -> UpcardAction
fn offer_upcard(&mut self, view: &View<'_>) -> UpcardAction
Source§fn choose_draw(&mut self, view: &View<'_>) -> DrawAction
fn choose_draw(&mut self, view: &View<'_>) -> DrawAction
Source§fn play_turn(&mut self, view: &View<'_>) -> TurnAction
fn play_turn(&mut self, view: &View<'_>) -> TurnAction
Auto Trait Implementations§
impl<R> Freeze for EaaiSimpleBot<R>where
R: Freeze,
impl<R> RefUnwindSafe for EaaiSimpleBot<R>where
R: RefUnwindSafe,
impl<R> Send for EaaiSimpleBot<R>where
R: Send,
impl<R> Sync for EaaiSimpleBot<R>where
R: Sync,
impl<R> Unpin for EaaiSimpleBot<R>where
R: Unpin,
impl<R> UnsafeUnpin for EaaiSimpleBot<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for EaaiSimpleBot<R>where
R: UnwindSafe,
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
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>
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>
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