Home * Chess * Checkmate
Foolsmate.jpg

Checkmate (often shortened to mate) occurs if a king is under immediate attack by one (or two) opponent pieces (in check) and has no way to remove it from attack on the next move. Checkmate is the object of the game of chess, it ends with the mate giving player as the winner, and the mated player the loser.
Shannon Larratt - Fool's mate (2007) [1] [2] [3]

Mate Score

At the Root

At the root the score of a mated player is the worst score one can get, that is a negative score with the greatest absolute value of the score range. It is quite common and sufficient to use something like this in C, C++:
#include <limits.h>
/* (-32768/2 = -16384) */
#define VALUE_MATED (SHRT_MIN/2)
Inside a 16-bit short integer range, assuming centipawn evaluation, it translates to roughly being 16 queens down. Note that using SHRT_MIN instead of SHRT_MIN/2 as mate value has issues in greater/less comparisons of additive expressions, where summands around SHRT_MIN or SHRT_MAX may under- or overflow, which has somehow relaxed with the advent of the usual 32-bit sign-extension.

Down the Tree

Inside a negamax based search, most [4] programs assign VALUE_MATED + ply distance to the root as worst case score if entering a node, which if propagated as mate score along the Principal variation to the root, translates in mate in odd plies (positive values), or getting mated in even plies. However, those scores need ply-adjustment if stored as exact score inside the transposition table, and re-adjustment if retrieving from TT. An alternative approach, not only related to mate scores was proposed by Harm Geert Muller, The Delay Penalty as implemented in Micro-Max [5] [6] [7] [8].

Detecting Mate

Some programs rely on pseudo-legal move generation, and find Checkmate if all those moves are in fact illegal after making and finding the "refutation" of capturing the king. At the latest, if no legal move was found, programs need the information whether the king is in check to decide about checkmate or stalemate score. Despite, most programs (should be) are aware of check in advance, and use special move generator(s) if in check or even in double check:

  • Double check
    • Only King moves or captures
  • Single check
    1. Capture the checking piece
    2. King moves or captures
    3. In case of distant checks, interposing a piece between the threatening sliding piece and the king

See also


Publications

1952

1965 ...

1980 ...

2000 ...

2010 ...


Forum Posts

1997 ...

2000 ...

2005 ...

2010 ...

2015 ...


Leonid's Positions


External Links


References

  1. ^ Shannon Larratt - Fool's mate (2007) from Tableaux ayant pour sujet les échecs
  2. ^ In Loving Memory of Shannon Larratt 1:24, YouTube Video
  3. ^ Shannon Larratt is Zentastic › Blog archives, February 09, 2007
  4. ^ The Code for the Rybka-Mate-Bug by Chrilly Donninger, CCC, December 13, 2005
  5. ^ Evaluation: Aging - The Delay Penalty from Micro-Max by Harm Geert Muller
  6. ^ Re: Transposition Tables by Harm Geert Muller, CCC, September 26, 2007
  7. ^ Delayed-loss-bonus discussion goes here by Harm Geert Muller, CCC, September 28, 2007
  8. ^ Seeing a promotion, but not playing it... by Harm Geert Muller, CCC, January 24, 2010
  9. ^ Frank Phillips' KNNKP position revisited ... by Guy Haworth, CCC, September 18, 2003 » Endgame Tablebases

What links here?


Up one Level