Changes

Jump to: navigation, search

Check

9,048 bytes added, 10:06, 8 May 2018
Created page with "'''Home * Chess * Check''' FILE:BakLighthouse.JPG|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d..."
'''[[Main Page|Home]] * [[Chess]] * Check'''

[[FILE:BakLighthouse.JPG|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bb9|[[Arts#Bak|Samuel Bak]] - Lighthouse <ref>[http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bb9 Chess in the Art of Samuel Bak], [http://www.chgs.umn.edu/ Center for Holocaust & Genocide Studies], [https://en.wikipedia.org/wiki/University_of_Minnesota University of Minnesota]</ref> ]]

Inside a [[Chess Game|game of chess]], a '''check''' occurs if a [[King|king]] is under immediate attack by one (or two) opponent [[Pieces|pieces]]. If the king has no way to remove it from attack on the next move, the check is even [[Checkmate|checkmate]]. Since check is crucial concerning the outcome of game and the [[Horizon Effect|horizon effect]], [[Check Extensions|check extensions]] might be applied to evade the check.

=Kind of Checks=
==Single Check==
The king is attacked by one opponent piece, either by the piece which just moved directly attacking the king, or alternatively a [[Discovered Check|discovered check]] where a distant sliding piece attacks the king by opening the [[Rays|ray]] in opponent king [[Direction|direction]] with another piece.

==Double Check==
A [[Double Check|double check]] occurs if the moving piece directly attacks the king but also discovers a distant sliding attacker.
<span id="Detection"></span>
=In Check Detection=
Whether the side to move is in check is essential to know inside the [[Search|search]] for various reasons. It might be [[Checkmate|checkmate]], and most [[Pseudo-Legal Move|pseudo-legal moves]] [[Move Generation|generated]] may be illegal, leaving the king attacked. [[Null Move|Null move]] would yield in an illegal position as well, at or below the [[Horizon Node|horizon]] we don't want to [[Quiescence Search#StandPat|stand pat]] if [[Material|material balance]] or static [[Evaluation|evaluation]] is far greater than [[Beta|beta]].

==By last Move==
The cheapest and most straightforward way to detect checks is to consider the previous move just made by the opponent. It might be a direct check or discovered check, so one has to test whether piece on [[Target Square|target square]] attacks the king, or whether piece on [[Origin Square|origin square]] is attacked by an own sliding piece on an otherwise open [[Rays|ray]] in opponent king direction <ref>[https://www.stmintz.com/ccc/index.php?id=265069 Idea for check function] by [[Zach Wegner]], [[CCC]], November 14, 2002</ref>. If the last move was an [[En passant|en passant]] capture, one has to consider a few more complicated cases of possible discovered checks, since the captured pawn is not on the target square, and two pawns disappear from the 4th (5th) rank.

==Attack Tables==
Based on the design and data structure of a chess program, an [[Incremental Updates|incremental updated]] [[Attack and Defend Maps|attack and defend map]] may immedeatly answer whether the king is under attack of one or even two opponent pieces.

==On the Fly==
With [[Bitboards|bitboards]] one may determine a [[Square Attacked By#AnyAttackBySide|square attacked]] as mentioned in [[Checks and Pinned Pieces (Bitboards)|checks and pinned pieces]].
<span id="CheckEvasion"></span>
=Getting out of check=
While in check, it is recommended to perform a specialized [[Move Generation]] for check evasion of either a reasonable subset of all [[Pseudo-Legal Move|pseudo-legal moves]] or even a strict [[Legal Move|legal move]] generation:
<span id="DoubleCheck"></span>
==Double Check==
* Only king moves to non attacked squares, sliding check x-rays the king

==Single Check==
* Capture of checking piece. The capturing piece is not [[Pin#AbsolutePin|absolutely pinned]]
* King moves to non attacked squares, sliding check x-rays the king
* Interposing moves in case of distant sliding check. The moving piece is not absolutely pinned.
<span id="Perpetual"></span>
=Perpetual Check=
A perpetual check occurs if one player forces an "endless" series of checks with repeated [[Reversible Moves|reversible moves]], finally resulting in a draw by [[Repetitions|threefold repetitions]].

=See also=
* [[Check Extensions]]
* [[Checkmate]]
* [[Checks and Pinned Pieces (Bitboards)]]
* [[Quiescence Search#Checks|Checks]] in [[Quiescence Search]]
* [[Stalemate#Desperado|Desperado]]
* [[DirGolem]]
* [[Horizon Effect]]
* [[Stalemate]]

=Publications=
* [[Richard L. Smith]], [[Fernand Gobet]], [[Peter Lane]] ('''2009'''). ''[http://bura.brunel.ac.uk/handle/2438/3503 Checking chess checks with chunks: A model of simple check detection]''. [http://sideshow.psyc.bbk.ac.uk/rcooper/iccm2009/proceedings/ ICCM 2009] » [[CHREST]], [[Chunking]]

=Forum Posts=
==1997 ...==
* [https://groups.google.com/group/rec.games.chess.computer/browse_frm/thread/ca0300b50438a388 quiescence search] by [[Andrew Tridgell]], [[Computer Chess Forums|rgcc]], April 16, 1997 » [[Quiescence Search]], [[Crafty]]
==2000 ...==
* [https://www.stmintz.com/ccc/index.php?id=237893 Checks in the Qsearch] by [[Scott Gasch]], [[CCC]], June 28, 2002 » [[Quiescence Search]]
* [https://www.stmintz.com/ccc/index.php?id=265069 Idea for check function] by [[Zach Wegner]], [[CCC]], November 14, 2002
* [https://www.stmintz.com/ccc/index.php?id=334869 Fast check detection in bitboard engine] by [[Jean-Francois Romang]], [[CCC]], December 10, 2003
* [https://www.stmintz.com/ccc/index.php?id=344282 Rebel's long checks concept in QS] by [[Anastasios Milikas|milix]], [[CCC]], January 23, 2004 » [[Rebel]], [[Quiescence Search]]
* [https://www.stmintz.com/ccc/index.php?id=385027 Qsearch Checks] by [[Tor Lattimore]], [[CCC]], August 29, 2004 » [[Quiescence Search]]
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=702&p=2642 Checks in QSearch] by [[Dan Honeycutt]], [[Computer Chess Forums|Winboard Programming Forum]], November 23, 2004 » [[Quiescence Search#Checks|Checks in Quiescence Search]]
==2005 ...==
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=3034 in check test] by Anonymous , [[Computer Chess Forums|Winboard Forum]], July 07, 2005
* [http://www.talkchess.com/forum/viewtopic.php?p=139285 How to Best Limit Checks in the Quiescence ?] by [[Stuart Cracraft]], [[CCC]], August 20, 2007 » [[Quiescence Search#Checks|Checks in Quiescence Search]]
* [http://www.talkchess.com/forum/viewtopic.php?t=16414 discovered check definition] by [[Uri Blass]], [[CCC]], September 12, 2007 » [[Discovered Check]]
* [http://www.talkchess.com/forum/viewtopic.php?t=23447 checks in q-search] by [[Robert Hyatt]], [[CCC]], September 02, 2008
==2010 ...==
* [http://www.talkchess.com/forum/viewtopic.php?t=32424 Standpat and check] by [[Vlad Stamate]], [[CCC]], February 06, 2010 » [[Quiescence Search#StandPat|Standing Pat]]
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=51343&sid=2384b91c58dc091e82cef3abd2a4f3f4 Detecting Checks] by beneficii, [[Computer Chess Forums|Winboard Programming Forum]], November 27, 2010
* [http://www.talkchess.com/forum/viewtopic.php?t=38387 out of check move ordering] by [[Don Dailey]], [[CCC]], March 12, 2011 » [[Move Ordering]]
* [http://www.talkchess.com/forum/viewtopic.php?t=42971 checks in quies] by [[Larry Kaufman]], [[CCC]], March 22, 2012 » [[Quiescence Search]]
* [http://www.open-chess.org/viewtopic.php?f=5&t=2599 What is (in your opinion) the best check validation method?] by goodgame0111, [[Computer Chess Forums|OpenChess Forum]], February 24, 2014
* [http://www.talkchess.com/forum/viewtopic.php?t=52309 Spite checks] by [[Harm Geert Muller]], [[CCC]], May 13, 2014
==2015 ...==
* [http://www.talkchess.com/forum/viewtopic.php?t=55874 Check-extension in QS] by [[Harm Geert Muller]], [[CCC]], April 03, 2015 » [[Quiescence Search#Checks|Checks in Quiescence Search]]
* [http://www.talkchess.com/forum/viewtopic.php?t=56517 Ostrich tactics and pointless checks] by [[Colin Jenkins]], [[CCC]], May 29, 2015 » [[Horizon Effect]]
* [http://www.talkchess.com/forum/viewtopic.php?t=59529 Checks in qsearch - must-have or optional?] by [[Martin Fierz]], [[CCC]], March 15, 2016 » [[Quiescence Search#Checks|Checks in Quiescence Search]]
* [http://www.talkchess.com/forum/viewtopic.php?t=61140 perpetual check position] by [[Erin Dame]], [[CCC]], August 16, 2016
* [http://www.talkchess.com/forum/viewtopic.php?t=61803 Spite checks, again] by [[Harm Geert Muller]], [[CCC]], October 23, 2016

=External Links=
* [https://en.wikipedia.org/wiki/Check_%28chess%29 Check (chess) from Wikipedia]
* [https://en.wikipedia.org/wiki/Double_check Double check from Wikipedia]
* [https://en.wikipedia.org/wiki/Perpetual_check Perpetual check from Wikipedia] » [[Repetitions]]
* [https://en.wikipedia.org/wiki/Cross-check Cross-check from Wikipedia]
* [https://en.wikipedia.org/wiki/Check Check (disambiguation) from Wikipedia]
* [https://en.wikipedia.org/wiki/Checkbox Checkbox from Wikipedia] » [[GUI]]

=References=
<references />

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

Navigation menu