Struct shakmaty_syzygy::Dtz[][src]

pub struct Dtz(pub i32);

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]

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

Increases the absolute value by plies.

Trait Implementations

impl Debug for Dtz
[src]

Formats the value using the given formatter. Read more

impl Copy for Dtz
[src]

impl Clone for Dtz
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Dtz
[src]

impl PartialEq for Dtz
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Ord for Dtz
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialOrd for Dtz
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl From<Dtz> for i32
[src]

Performs the conversion.

impl From<Dtz> for i64
[src]

Performs the conversion.

impl From<Dtz> for i128
[src]

Performs the conversion.

impl From<u8> for Dtz
[src]

Performs the conversion.

impl From<i8> for Dtz
[src]

Performs the conversion.

impl From<u16> for Dtz
[src]

Performs the conversion.

impl From<i16> for Dtz
[src]

Performs the conversion.

impl From<i32> for Dtz
[src]

Performs the conversion.

impl Neg for Dtz
[src]

The resulting type after applying the - operator.

Performs the unary - operation.

impl Add for Dtz
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl AddAssign for Dtz
[src]

Performs the += operation.

impl Sub for Dtz
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl SubAssign for Dtz
[src]

Performs the -= operation.

Auto Trait Implementations

impl Send for Dtz

impl Sync for Dtz