Changes

Jump to: navigation, search

Checkmate

15,171 bytes added, 11:33, 8 May 2018
Created page with "'''Home * Chess * Checkmate''' border|right|thumb|[[Arts#Larratt|Shannon Larratt - Fool's mate (2007) <ref>Arts#Larratt|Shannon Lar..."
'''[[Main Page|Home]] * [[Chess]] * Checkmate'''

[[FILE:Foolsmate.jpg|border|right|thumb|[[Arts#Larratt|Shannon Larratt]] - Fool's mate (2007) <ref>[[Arts#Larratt|Shannon Larratt]] - [https://en.wikipedia.org/wiki/Fool's_mate Fool's mate] (2007) from Tableaux ayant pour sujet les échecs (dead link)</ref> <ref>[https://youtu.be/CILh2HaDS4Y?t=1m24s In Loving Memory of Shannon Larratt 1:24], [https://en.wikipedia.org/wiki/YouTube YouTube] Video</ref> <ref>[http://www.zentastic.com/blog/2007/02/page/6/ Shannon Larratt is Zentastic › Blog archives], February 09, 2007</ref> ]]

'''Checkmate''' (often shortened to '''mate''') occurs if a [[King|king]] is under immediate attack by one (or two) opponent pieces (in [[Check|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.

=Mate Score<span id="MateScore"></span>=
==At the Root==
At the [[Root|root]] the [[Score|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]], [[Cpp|C++]]:
<pre>
#include <limits.h>
/* (-32768/2 = -16384) */
#define VALUE_MATED (SHRT_MIN/2)
</pre>
Inside a 16-bit [[Word|short]] integer range, assuming [[Centipawns|centipawn]] evaluation, it translates to roughly being 16 queens down. Note that using [[Word#Ranges|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 [[Word#Ranges|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|negamax]] based [[Search|search]], most <ref>[https://www.stmintz.com/ccc/index.php?id=469728 The Code for the Rybka-Mate-Bug] by [[Chrilly Donninger]], [[CCC]], December 13, 2005</ref> programs assign ''VALUE_MATED + [[Ply|ply]] distance to the root'' as worst case score if entering a [[Node|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|exact score]] inside the [[Transposition Table|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]] <ref>[http://home.hccnet.nl/h.g.muller/delay.html Evaluation: Aging - The Delay Penalty] from [[Micro-Max]] by [[Harm Geert Muller]]</ref> <ref>[http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=147295&t=15129 Re: Transposition Tables] by [[Harm Geert Muller]], [[CCC]], September 26, 2007</ref> <ref>[http://www.talkchess.com/forum/viewtopic.php?t=16751 Delayed-loss-bonus discussion goes here] by [[Harm Geert Muller]], [[CCC]], September 28, 2007</ref> <ref>[http://www.talkchess.com/forum/viewtopic.php?t=31981 Seeing a promotion, but not playing it...] by [[Harm Geert Muller]], [[CCC]], January 24, 2010</ref>.

=Detecting Mate=
Some programs rely on [[Move Generation|pseudo-legal move generation]], and find Checkmate if all those moves are in fact illegal after [[Make Move|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|stalemate]] score. Despite, most programs (should be) are aware of check in advance, and use special [[Move Generation|move generator(s)]] if in check or even in [[Double Check|double check]]:

# [[Double Check|Double check]]
## Only King moves or captures
# [[Check|Single check]]
## Capture the checking piece
## King moves or captures
## In case of distant checks, interposing a piece between the threatening sliding piece and the king

=See also=
* [[Check]]
* [[Chess Problems, Compositions and Studies]]
* [[Mate at a Glance]]
* [[Mate Distance Pruning]]
* [[Mate-in-two]]
* [[Mate Search]]
* [[Stalemate]]

=Publications=
==1952==
* [[Dietrich Prinz]] ('''1952'''). ''Robot Chess''. Research, Vol. 6, reprinted 1988 in [[Computer Chess Compendium]] » [[Mate-in-two]]
==1965 ...==
* [[George Baylor|George W. Baylor]] ('''1965'''). ''[http://www.dtic.mil/docs/citations/AD0619018 Report on a Mating Combinations Program]''. SDC Paper, No. SP-2150, System Development Corporation, Santa Monica, Calif. » [[Mater]]
* [[George Baylor|George W. Baylor]], [[Herbert Simon|Herbert A. Simon]] ('''1966'''). ''[http://dl.acm.org/citation.cfm?id=1464182.1464233&coll=GUIDE&dl=GUIDE A chess mating combinations program]''. [https://en.wikipedia.org/wiki/American_Federation_of_Information_Processing_Societies AFIPS] [https://en.wikipedia.org/wiki/Joint_Computer_Conference Joint Computer Conferences], reprinted in [[Herbert Simon|Herbert A. Simon]] ('''1979'''). ''[http://yalepress.yale.edu/yupbooks/book.asp?isbn=9780300024326 Models of Thought]''. [https://en.wikipedia.org/wiki/Yale_University_Press Yale University Press], pp. 181-200, in [[David Levy]] (ed.) ('''1988'''). ''[[Computer Chess Compendium]]''.
* [[George Baylor|George W. Baylor]] ('''1966'''). ''A Computer Model of Checkmating Behaviour in Chess''. in [[Adriaan de Groot]], [[Walter R. Reitman]] (eds.) ('''1966'''). ''Heuristic Processes in Thinking''. International Congress of Psychology, [https://en.wikipedia.org/wiki/Nauka_%28publisher%29 Nauka], [https://en.wikipedia.org/wiki/Moscow Moscow]
* [[Vladimir E. Alekseev]] ('''1969'''). ''[http://oai.dtic.mil/oai/oai?verb=getRecord&metadataPrefix=html&identifier=AD0689470 Compilation of Chess Problems on a Computer]''. Technical translation FSTC-HT-23-124-69, US Army, NTIS AD 689470 ([http://www.worldcat.org/title/problemy-kibernetiki/oclc/1762911 Problemy Kibernetiki], 19, 1967)
==1980 ...==
* [[John Birmingham]], [[Peter Kent]] ('''1980'''). ''Mate at a Glance.'' [[Advances in Computer Chess 2]], reprinted in [[Computer Chess Compendium]]
* [[Max Bramer]] ('''1982'''). ''Finding Checkmates''. [https://en.wikipedia.org/wiki/Computer_and_Video_Games Computer & Video Games], [http://www.chesscomputeruk.com/html/publication_archive_1982.html Spring 1982], [http://www.chesscomputeruk.com/Computer___Video_Games_Spring_1982.pdf pdf] hosted by [[Mike Watters]] » [[Mater]]
* [[Don Beal]] ('''1984'''). ''Mating Sequences in the Quiescence Search''. [[ICGA Journal#7_3|ICCA Journal, Vol. 7, No. 3]]
==1990 ...==
* [[Thomas Mally]] ('''1993'''). ''Matt in Wieviel?'' [[PC Schach]] 3/93 (German)
==2000 ...==
* [[Vladan Vučković]] ('''2004'''). ''Realization of the Chess Mate Solver Application''. [http://www.doiserbia.nb.rs/issue.aspx?issueid=138 Yugoslav Journal of Operations Research, Volume 14, Number 2], [http://www.doiserbia.nbs.bg.ac.yu/img/doi/0354-0243/2004/0354-02430402273V.pdf pdf]
* [[Fridel Fainshtein]] ('''2006'''). ''An Orthodox k-Move Problem-Composer for Chess Directmates''. M.Sc. thesis, [[Bar-Ilan University]], [http://www.problemschach.de/KMOVEComposer.pdf pdf]
* [[Fridel Fainshtein]], [[Yaakov HaCohen-Kerner]] ('''2006'''). ''A Chess Composer of Two-Move Mate Problems''. [[ICGA Journal#29_1|ICGA Journal, Vol. 29, No. 1]], [http://homedir.jct.ac.il/%7Ekerner/pdf_docs/ICGA_computer_composer.pdf pdf]
* [[Ami Hauptman]], [[Moshe Sipper]] ('''2007'''). ''Evolution of an Efficient Search Algorithm for the Mate-In-N Problem in Chess''. [http://www.informatik.uni-trier.de/~%20LEY/db/conf/eurogp/eurogp2007.html EuroGP 2007], [http://www.cs.bgu.ac.il/~sipper/papabs/gpsearch.pdf pdf]
==2010 ...==
* [[Azlan Iqbal]] ('''2010'''). ''Aesthetics in Mate-In-3 Combinations''. Part I Combinatorics and Weights, [[ICGA Journal#33_3|ICGA Journal, Vol. 33, No. 3]]
* [[Azlan Iqbal]] ('''2010'''). ''Aesthetics in Mate-In-3 Combinations''. Part II Normality, [[ICGA Journal#33_4|ICGA Journal, Vol. 33, No. 4]]
* [[Taichi Ishitobi]], [[Alessandro Cincotti]], [[Hiroyuki Iida]] ('''2013'''). ''[https://dspace.jaist.ac.jp/dspace/handle/10119/11606?locale=en Shape-Keeping Technique and Its Application to Checkmate Problem Composition]''. [http://tr.aiide.org/ 2013 AIIDE Workshop]

=Forum Posts=
==1997 ...==
* [https://www.stmintz.com/ccc/index.php?id=10434 Mate in 4 explanation] by Howard Exner, [[CCC]], October 07, 1997
* [https://www.stmintz.com/ccc/index.php?id=12186 Mate in 30 testposition for Rebel 9!] by [[Jouni Uski]], [[CCC]], November 20, 1997 » [[Rebel]]
* [https://www.stmintz.com/ccc/index.php?id=13836 Mate in 18 moves?] by [[Ed Schroder|Ed Schröder]], [[CCC]], January 09, 1998
* [https://www.stmintz.com/ccc/index.php?id=58 Using too-shallow mate scores from the hash table] by [[David Eppstein]], [[CCC]], July 05, 1998
: [https://www.stmintz.com/ccc/index.php?id=21814 Re: Using too-shallow mate scores from the hash table] by [[David Eppstein]], [[CCC]], July 06, 1998
: [https://www.stmintz.com/ccc/index.php?id=21838 Re: Using too-shallow mate scores from the hash table] by [[Don Dailey]], [[CCC]], July 07, 1998
* [https://www.stmintz.com/ccc/index.php?id=22049 Solve for Mate] by Trefor Deane, [[CCC]], July 11, 1998
* [https://www.stmintz.com/ccc/index.php?id=32930 Mate the Royal Couple] by Hans Havermann, [[CCC]], November 14, 1998
* [https://www.stmintz.com/ccc/index.php?id=59646 Estimated # of checkmate positions?] by Jeff Anderson, [[CCC]], July 07, 1999
* [https://www.stmintz.com/ccc/index.php?id=67784 Mate solvers...] by [[Dann Corbit]], [[CCC]], September 07, 1999
* [https://www.stmintz.com/ccc/index.php?id=68037 Interesting mate test for hashing] by [[Robert Hyatt]], [[CCC]], September 10, 1999 » [[Transposition Table]]
: [https://www.stmintz.com/ccc/index.php?id=68340 Is "Interesting mate test..." the longest ever thread....] by Tina Long, [[CCC]], September 11, 1999
==2000 ...==
* [https://www.stmintz.com/ccc/index.php?id=123825 Mate in 1 - but Fritz 6 needs 1 hour!!!] by Christoph Fieberg, [[CCC]], August 10, 2000
* [https://www.stmintz.com/ccc/index.php?id=126780 What's the fastest mate-finder?] by [[Michel Langeveld]], [[CCC]], August 27, 2000
* [https://www.stmintz.com/ccc/index.php?id=130376 Questions about Mate Searching] by [[William Bryant]], [[CCC]], September 23, 2000 » [[Mate Search]]
* [https://www.stmintz.com/ccc/index.php?id=130700 Mate in 7 moves - diagram] by [[Eduard Nemeth]], [[CCC]], September 27, 2000 » [[Zugzwang]]
* [https://www.stmintz.com/ccc/index.php?id=209201 Static Mate Detection] by [[Gerd Isenberg]], [[CCC]], January 22, 2002 » [[Mate at a Glance]]
* [https://www.stmintz.com/ccc/index.php?id=287666 First mate in 2, then mate in 3] by [[Albert Bertilsson]], [[CCC]], March 03, 2003
* [https://www.stmintz.com/ccc/index.php?id=315666 Easy mate] by [[Frank Phillips]], [[CCC]], September 13, 2003 <ref>[https://www.stmintz.com/ccc/index.php?id=316547 Frank Phillips' KNNKP position revisited ...] by [[Guy Haworth]], [[CCC]], September 18, 2003 » [[Endgame Tablebases]]</ref>
==2005 ...==
* [https://www.stmintz.com/ccc/index.php?id=458757 Shortest ever mate?] by [[Tord Romstad]], [[CCC]], October 30, 2005
* [https://www.stmintz.com/ccc/index.php?id=469728 The Code for the Rybka-Mate-Bug] by [[Chrilly Donninger]], [[CCC]], December 13, 2005 » [[Rybka]]
* [https://www.stmintz.com/ccc/index.php?id=490808 Unusual Mate in 3] by [[Charles Roberson]], [[CCC]], March 02, 2006
* [http://www.talkchess.com/forum/viewtopic.php?t=16751 Delayed-loss-bonus discussion goes here] by [[Harm Geert Muller]], [[CCC]], September 28, 2007
* [http://www.talkchess.com/forum/viewtopic.php?t=24560 mate detetion issue] by [[Mike Adams]], [[CCC]], October 24, 2008 » [[Connect Four]], [[Fail-Soft]]
* [http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?tid=8533 How to check for checkmate/stalemate programmatically?] by Valentin, [[Computer Chess Forums|Rybka Forum]], November 22, 2008 » [[Stalemate]]
* [http://www.talkchess.com/forum/viewtopic.php?t=25705 Draw by repetition when mate is possible] by [[Mathieu Pagé]], [[CCC]], December 30, 2008 » [[Repetitions]]
==2010 ...==
* [http://www.talkchess.com/forum/viewtopic.php?t=37016 Puzzle with mate scores in TT] by [[Robert Purves]], [[CCC]], December 10, 2010 » [[Score]], [[Transposition Table]]
* [http://www.talkchess.com/forum/viewtopic.php?t=37616 Yet Another Mate Solving Test] by [[Jouni Uski]], [[CCC]], January 14, 2011
* [http://www.talkchess.com/forum/viewtopic.php?t=41640 Mate score in TT] by [[Marco Costalba]], [[CCC]], December 28, 2011 » [[Score]], [[Transposition Table]]
* [http://www.talkchess.com/forum/viewtopic.php?t=46737 Checkmate In Zero] by [[Christopher Conkie]], [[CCC]], January 02, 2013
* [http://www.talkchess.com/forum/viewtopic.php?t=52036 To be, or not to be checkmated] by [[Harm Geert Muller]], [[CCC]], April 18, 2014
* [http://www.talkchess.com/forum/viewtopic.php?t=54141 Mate score from the transposition table] by [[Evert Glebbeek]], [[CCC]], October 25, 2014 » [[Score]], [[Transposition Table]]
==2015 ...==
* [http://www.talkchess.com/forum/viewtopic.php?t=56455 Remember Leonid Liberman (author of LLCHESS)?] by [[Dann Corbit]], [[CCC]], May 23, 2015 » [[Checkmate#Leonid|Leonid's Positions]]
* [http://www.open-chess.org/viewtopic.php?f=5&t=2951 TT Mate scores] by rgoomes, [[Computer Chess Forums|OpenChess Forum]], February 10, 2016 » [[Score]], [[Transposition Table]]
* [http://www.talkchess.com/forum/viewtopic.php?t=59276 Funny mate in 6] by [[Sergei Markoff|Sergei S. Markoff]], [[CCC]], February 17, 2016
* [http://www.talkchess.com/forum/viewtopic.php?t=61134 Mate scores from IID] by [[Matthew R. Brades]], [[CCC]], August 16, 2016 » [[Internal Iterative Deepening]]
* [http://www.talkchess.com/forum/viewtopic.php?t=61731 Why do engines lack mate solving?] by [[Rasmus Althoff]], [[CCC]], October 15, 2016 » [[Mate Search]]
* [http://www.talkchess.com/forum/viewtopic.php?t=67049 Mate scores in TT (a new?... approach)] by Vince Sempronio, [[CCC]], April 09, 2018
* [http://www.talkchess.com/forum/viewtopic.php?t=67078 Yet another Mate scores in TT thread] by [[Andrew Grant]], [[CCC]], April 12, 2018 » [[Score]], [[Transposition Table]]
<span id="Leonid"></span>
==Leonid's Positions==
{{Leonid's Positions}}
=External Links=
* [https://en.wikipedia.org/wiki/Checkmate Checkmate from Wikipedia]
* [https://en.wikipedia.org/wiki/Checkmate_pattern Checkmate pattern from Wikipedia]
* [http://web.archive.org/web/20070707035457/www.brucemo.com/compchess/programming/matescore.htm Checkmate/Stalemate Scoring] from [[Bruce Moreland|Bruce Moreland's]] [http://web.archive.org/web/20070811182741/www.seanet.com/%7Ebrucemo/topics/topics.htm Programming Topics]
* [http://web.archive.org/web/20070707041901/www.brucemo.com/compchess/programming/matehash.htm Handling Mate Scores] from [[Bruce Moreland|Bruce Moreland's]] [http://web.archive.org/web/20070811182741/www.seanet.com/%7Ebrucemo/topics/topics.htm Programming Topics]

=References=
<references />

'''[[Chess|Up one Level]]'''

Navigation menu