[−][src]Struct shakmaty_syzygy::Dtz
Distance to zeroing of the half-move clock.
Zeroing the half-move clock while keeping the game theoretical result in hand guarantees making progress.
Can be off by one: Dtz(-n)
can mean a loss in n + 1
plies and Dtz(n)
can mean a win in n + 1
plies. This is guaranteed not to happen for
positions exactly on the edge of the 50-move rule, so that (with some care)
this never impacts results of practical play.
DTZ | WDL | |
---|---|---|
-100 <= n <= -1 | Loss | Unconditional loss (assuming the 50-move counter is zero). Zeroing move can be forced in -n plies. |
n < -100 | Blessed loss | Loss, but draw under the 50-move rule. A zeroing move can be forced in -n plies or -n - 100 plies (if a later phase is responsible for the blessing). |
0 | Draw | |
100 < n | Cursed win | Win, but draw under the 50-move rule. A zeroing move can be forced in n or n - 100 plies (if a later phase is responsible for the curse). |
1 <= n <= 100 | Win | Unconditional win (assuming the 50-move counter is zero). Zeroing move can be forced in n plies. |
Methods
impl Dtz
[src]
pub fn before_zeroing<T: Into<Wdl>>(wdl: T) -> Dtz
[src]
Converts wdl
to a DTZ, given that the best move is zeroing.
WDL | DTZ |
---|---|
Loss | -1 |
Blessed loss | -101 |
Draw | 0 |
Cursed win | 101 |
Win | 1 |
pub fn add_plies(self, plies: i32) -> Dtz
[src]
Increases the absolute value by plies
.
Trait Implementations
impl Add<Dtz> for Dtz
[src]
type Output = Dtz
The resulting type after applying the +
operator.
fn add(self, other: Dtz) -> Dtz
[src]
impl AddAssign<Dtz> for Dtz
[src]
fn add_assign(&mut self, other: Dtz)
[src]
impl Clone for Dtz
[src]
impl Copy for Dtz
[src]
impl Debug for Dtz
[src]
impl Eq for Dtz
[src]
impl From<Dtz> for i32
[src]
impl From<Dtz> for i64
[src]
impl From<Dtz> for i128
[src]
impl From<i16> for Dtz
[src]
impl From<i32> for Dtz
[src]
impl From<i8> for Dtz
[src]
impl From<u16> for Dtz
[src]
impl From<u8> for Dtz
[src]
impl Neg for Dtz
[src]
impl Ord for Dtz
[src]
fn cmp(&self, other: &Dtz) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Dtz> for Dtz
[src]
impl PartialOrd<Dtz> for Dtz
[src]
fn partial_cmp(&self, other: &Dtz) -> Option<Ordering>
[src]
fn lt(&self, other: &Dtz) -> bool
[src]
fn le(&self, other: &Dtz) -> bool
[src]
fn gt(&self, other: &Dtz) -> bool
[src]
fn ge(&self, other: &Dtz) -> bool
[src]
impl StructuralEq for Dtz
[src]
impl StructuralPartialEq for Dtz
[src]
impl Sub<Dtz> for Dtz
[src]
type Output = Dtz
The resulting type after applying the -
operator.
fn sub(self, other: Dtz) -> Dtz
[src]
impl SubAssign<Dtz> for Dtz
[src]
fn sub_assign(&mut self, other: Dtz)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Dtz
impl Send for Dtz
impl Sync for Dtz
impl Unpin for Dtz
impl UnwindSafe for Dtz
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,