Enum shakmaty_syzygy::Wdl
source · #[repr(i32)]
pub enum Wdl {
Loss,
BlessedLoss,
Draw,
CursedWin,
Win,
}
Expand description
WDL50. 5-valued evaluation of a position in the context of the 50-move drawing rule.
Variants§
Loss
Unconditional loss.
BlessedLoss
Loss that can be saved by the 50-move rule.
Draw
Unconditional draw.
CursedWin
Win that can be frustrated by the 50-move rule.
Win
Unconditional win.
Implementations§
source§impl Wdl
impl Wdl
sourcepub fn from_outcome(outcome: Outcome, pov: Color) -> Wdl
pub fn from_outcome(outcome: Outcome, pov: Color) -> Wdl
Converts outcome
to a Wdl
from the given point of view.
sourcepub fn from_dtz_after_zeroing(dtz: MaybeRounded<Dtz>) -> Wdl
pub fn from_dtz_after_zeroing(dtz: MaybeRounded<Dtz>) -> Wdl
Converts dtz
to Wdl
.
In general the result would be
ambiguous for MaybeRounded::Rounded(Dtz(100))
and
MaybeRounded::Rounded(Dtz(-100))
.
This conversion assumes that such values were given
immediately after a capture or pawn move, in which case
the outcome is an unconditional win or loss.
Since playing the tablebase mainline preserves the game theoretical
outcome, this method may also be used on dtz.add_plies(plies)
if the mainline has been followed for plies
halfmoves since the last
capture or pawn move.
Trait Implementations§
source§impl From<Wdl> for AmbiguousWdl
impl From<Wdl> for AmbiguousWdl
source§fn from(wdl: Wdl) -> AmbiguousWdl
fn from(wdl: Wdl) -> AmbiguousWdl
source§impl Ord for Wdl
impl Ord for Wdl
source§impl PartialOrd<Wdl> for Wdl
impl PartialOrd<Wdl> for Wdl
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more