Difference between revisions of "Castling Rights"

From Chessprogramming wiki
Jump to: navigation, search
m (GerdIsenberg moved page Castling rights to Castling Rights without leaving a redirect)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
'''[[Main Page|Home]] * [[Chess]] * [[Chess Position|Position]] * Castling Rights'''
 
'''[[Main Page|Home]] * [[Chess]] * [[Chess Position|Position]] * Castling Rights'''
  
The '''Castling Rights''' specify whether both sides are principally able to [[Castling|castle]] king- or queen side, now or later during the game - whether the involved pieces have already moved or in case of the rooks, were captured. Castling rights do not specify, whether castling is actually possible, but a pre-condition for both wing castlings.  
+
The '''Castling Rights''' specify whether both sides are principally able to [[Castling|castle]] king- or queen side, now or later during the game - whether the involved pieces have already moved or in case of the rooks, were captured. Castling rights do not specify, whether castling is actually possible, but are a pre-condition for both wing castlings. Two [[Bit|bits]] per side are appropriate to store the castling rights, often one uses one [[Nibble|nibble]] to store the rights for both sides inside a [[Chess Position|position]] object, a kind a [[Array|array]] of four booleans.  
  
Two [[Bit|bits]] per side are appropriate to store the castling rights, often one uses one [[Nibble|nibble]] to store the rights for both sides inside a [[Chess Position|position]] object, a kind a [[Array|array]] of four booleans. In [[Make Move|make move]] one has to consider that king-moves reset both castling bits per side.  
+
=Irreversibility=
 
+
In [[Make Move|make move]] one has to consider that king-moves including castling itself reset both castling bits per side. Rook-moves from their original [[Squares|square]], or [[Captures|captures]] of rooks on their original squares reset the appropriate castling bits per wing and side. Changed castling rights should be considered in the [[Zobrist Hashing|zobrist key]] of the position, to reflect the irreversibility of the otherwise [[Reversible Moves|reversible move]], concerning [[Repetitions|repetitions]]. On the other hand, changed castling rights don't necessarily reset the [[Halfmove Clock|halfmove clock]] regarding the [[Fifty-move Rule|fifty-move rule]] <ref>[http://www.horst-wandersleben.de/Wette.htm Computerschach - Eine Wette, die ich gerne verloren habe] by [[Horst Wandersleben]] (German)</ref>.
Rook-moves from their original [[Squares|square]], or [[Captures|captures]] of rooks on their original squares reset the appropriate castling bits per wing and side. Changed castling rights should be considered in the [[Zobrist Hashing|zobrist key]] of the position, to reflect the irreversibility of the otherwise [[Reversible Moves|reversible move]], concerning [[Repetitions|repetitions]]. On the other hand, changed castling rights don't necessarily reset the [[Halfmove Clock|halfmove clock]] regarding the [[Fifty-move Rule|fifty-move rule]].
 
  
 
=See also=
 
=See also=
 
* [[Castling]]
 
* [[Castling]]
 
* [[Chess960]]
 
* [[Chess960]]
 +
* [[Irreversible Moves]]
 
* [[King Safety]]
 
* [[King Safety]]
 
* [[Unmake Move]]
 
* [[Unmake Move]]
Line 15: Line 15:
  
 
=Forum Posts=
 
=Forum Posts=
 +
==1999==
 +
* [https://www.stmintz.com/ccc/index.php?id=41612 Hash Tables - Should one store EP, Castling rights etc?] by [[Steve Maughan]], [[CCC]], January 30, 1999 » [[En passant]], [[Transposition Table]]
 +
==2000 ...==
 +
* [https://www.stmintz.com/ccc/index.php?id=99216 Does your program understand castling/en passant rights on 3x repetition] by Richard A. Fowell, [[CCC]], February 27, 2000 » [[En passant]], [[Repetitions]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=25096 Saving castling states and en passant history] by Eric Lang, [[CCC]], November 27, 2008 » [[En passant]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=25096 Saving castling states and en passant history] by Eric Lang, [[CCC]], November 27, 2008 » [[En passant]]
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=50635 0x88 FRC castle questions] by Daniel Uranga, [[Computer Chess Forums|Winboard Forum]], December 12, 2009 » [[Chess960]]
+
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=50635 0x88 FRC castle questions] by [[Daniel Uranga]], [[Computer Chess Forums|Winboard Forum]], December 12, 2009 » [[Chess960]]
 +
==2010 ...==
 
* [http://www.talkchess.com/forum/viewtopic.php?t=33359 Updating castling rights] by [[Jan Brouwer]], [[CCC]], March 19, 2010
 
* [http://www.talkchess.com/forum/viewtopic.php?t=33359 Updating castling rights] by [[Jan Brouwer]], [[CCC]], March 19, 2010
 
* [http://www.talkchess.com/forum/viewtopic.php?t=49362 ep and castle rights hashing] by [[Natale Galioto]], [[CCC]], September 15, 2013 » [[En passant]], [[Repetitions]], [[Transposition Table]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=49362 ep and castle rights hashing] by [[Natale Galioto]], [[CCC]], September 15, 2013 » [[En passant]], [[Repetitions]], [[Transposition Table]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=59854 3rd repetition, a case where not cause castle rights... but] by [[Luis Babboni]], [[CCC]], April 14, 2016 » [[Repetitions]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=59854 3rd repetition, a case where not cause castle rights... but] by [[Luis Babboni]], [[CCC]], April 14, 2016 » [[Repetitions]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=62733 Enpass + Castling for Zorbist hashes] by [[Andrew Grant]], [[CCC]], January 06, 2017 » [[En passant]], [[Zobrist Hashing]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=62733 Enpass + Castling for Zorbist hashes] by [[Andrew Grant]], [[CCC]], January 06, 2017 » [[En passant]], [[Zobrist Hashing]]
 +
==2020 ...==
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76466 Tracking castling rights] by Brian Adkins, [[CCC]], February 01, 2021
  
 
=External Links=
 
=External Links=
 
* [http://timkr.home.xs4all.nl/chess2/diary_3.htm Open chess diary 41-60 52. 20 February: Castling rights in photographs and on servers] by [https://en.wikipedia.org/wiki/Tim_Krabb%C3%A9 Tim Krabbé]
 
* [http://timkr.home.xs4all.nl/chess2/diary_3.htm Open chess diary 41-60 52. 20 February: Castling rights in photographs and on servers] by [https://en.wikipedia.org/wiki/Tim_Krabb%C3%A9 Tim Krabbé]
 +
* [http://www.horst-wandersleben.de/Wette.htm Computerschach - Eine Wette, die ich gerne verloren habe] by [[Horst Wandersleben]] (German) <ref>[[Dieter Bürßner]] found a game finished in a [[Fifty-move Rule|fifty-move rule]] draw, where [[Castling|castling]] occurred during the last fifty moves</ref>
 
* [http://mediocrechess.blogspot.de/2006/12/bug-another-little-bug-in-castling.html Mediocre Chess: [Bug] Another little bug in castling rights] by [[Jonatan Pettersson]], December 30, 2006
 
* [http://mediocrechess.blogspot.de/2006/12/bug-another-little-bug-in-castling.html Mediocre Chess: [Bug] Another little bug in castling rights] by [[Jonatan Pettersson]], December 30, 2006
  
 +
=References=
 +
<references />
 
'''[[Chess Position|Up one Level]]'''
 
'''[[Chess Position|Up one Level]]'''

Latest revision as of 23:33, 1 February 2021

Home * Chess * Position * Castling Rights

The Castling Rights specify whether both sides are principally able to castle king- or queen side, now or later during the game - whether the involved pieces have already moved or in case of the rooks, were captured. Castling rights do not specify, whether castling is actually possible, but are a pre-condition for both wing castlings. Two bits per side are appropriate to store the castling rights, often one uses one nibble to store the rights for both sides inside a position object, a kind a array of four booleans.

Irreversibility

In make move one has to consider that king-moves including castling itself reset both castling bits per side. Rook-moves from their original square, or captures of rooks on their original squares reset the appropriate castling bits per wing and side. Changed castling rights should be considered in the zobrist key of the position, to reflect the irreversibility of the otherwise reversible move, concerning repetitions. On the other hand, changed castling rights don't necessarily reset the halfmove clock regarding the fifty-move rule [1].

See also

Forum Posts

1999

2000 ...

2010 ...

2020 ...

External Links

References

  1. Computerschach - Eine Wette, die ich gerne verloren habe by Horst Wandersleben (German)
  2. Dieter Bürßner found a game finished in a fifty-move rule draw, where castling occurred during the last fifty moves

Up one Level