Difference between revisions of "Pseudo-Legal Move"

From Chessprogramming wiki
Jump to: navigation, search
(Created page with "'''Home * Chess * Moves * Pseudo-Legal Move''' A '''Pseudo-Legal Move''' is legal in the sense that it is consistent with the current Board Representa...")
 
m
Line 1: Line 1:
 
'''[[Main Page|Home]] * [[Chess]] * [[Moves]] * Pseudo-Legal Move'''
 
'''[[Main Page|Home]] * [[Chess]] * [[Moves]] * Pseudo-Legal Move'''
  
A '''Pseudo-Legal Move''' is legal in the sense that it is consistent with the current [[Board Representation|board representation]] it is assigned to, and it must be member of all pseudo legal [[Move Generation|generated]] moves for that [[Chess Position|position]] and [[Side to move|side to move]]. For a test of a given but not already generated move, the moving [[Pieces|piece]] on its valid origin [[Squares|square]] of the [[Chessboard|board]] must have a valid target square according to its possible move [[Direction|directions]] and [[Distance|distances]]. The [[Occupancy|occupancy]] of the target square in conjunction with its piece [[Color|color]] (if any piece), or in case of distant sliding moves and double pawn pushes, the occupancy of squares between origin and target must be further considered, to determine the move is pseudo legal [[Quiet Moves|quiet]] or [[Captures|capture]] (including [[Promotions|promotion]]). [[En passant]] needs the target square trigger set from previous double push and special square tests. [[Castling]] requires appropriate [[Castling rights|castling rights]], [[Occupancy|occupancy]]- and attacking square checks.
+
A '''Pseudo-Legal Move''' is legal in the sense that it is consistent with the current [[Board Representation|board representation]] it is assigned to, and it must be member of all pseudo legal [[Move Generation|generated]] moves for that [[Chess Position|position]] and [[Side to move|side to move]]. For a test of a given but not already generated move, the moving [[Pieces|piece]] on its valid origin [[Squares|square]] of the [[Chessboard|board]] must have a valid target square according to its possible move [[Direction|directions]] and [[Distance|distances]]. The [[Occupancy|occupancy]] of the target square in conjunction with its piece [[Color|color]] (if any piece), or in case of distant sliding moves and double pawn pushes, the occupancy of squares between origin and target must be further considered, to determine the move is pseudo legal [[Quiet Moves|quiet]] or [[Captures|capture]] (including [[Promotions|promotion]]). [[En passant]] needs the target square trigger set from previous double push and special square tests. [[Castling]] requires appropriate [[Castling Rights|castling rights]], [[Occupancy|occupancy]]- and attacking square checks.
  
 
Pseudo-legal moves may still be '''illegal''' if they leave the own [[King|king]] in [[Check|check]], most often if the king was already in check before, or the moving piece was [[Pin#AbsolutePin|absolutely pinned]]. Pseudo-legal moves versus strictly [[Legal Move|legal moves]] is a matter of [[Move Generation|move generation]], and also playing [[Hash Move|hash]]- or even [[Killer Move|killer moves]] immediately without explicit move generation, but a [[Square Attacked By#LegalityTest|pseudo legality test]].
 
Pseudo-legal moves may still be '''illegal''' if they leave the own [[King|king]] in [[Check|check]], most often if the king was already in check before, or the moving piece was [[Pin#AbsolutePin|absolutely pinned]]. Pseudo-legal moves versus strictly [[Legal Move|legal moves]] is a matter of [[Move Generation|move generation]], and also playing [[Hash Move|hash]]- or even [[Killer Move|killer moves]] immediately without explicit move generation, but a [[Square Attacked By#LegalityTest|pseudo legality test]].

Revision as of 21:30, 15 May 2018

Home * Chess * Moves * Pseudo-Legal Move

A Pseudo-Legal Move is legal in the sense that it is consistent with the current board representation it is assigned to, and it must be member of all pseudo legal generated moves for that position and side to move. For a test of a given but not already generated move, the moving piece on its valid origin square of the board must have a valid target square according to its possible move directions and distances. The occupancy of the target square in conjunction with its piece color (if any piece), or in case of distant sliding moves and double pawn pushes, the occupancy of squares between origin and target must be further considered, to determine the move is pseudo legal quiet or capture (including promotion). En passant needs the target square trigger set from previous double push and special square tests. Castling requires appropriate castling rights, occupancy- and attacking square checks.

Pseudo-legal moves may still be illegal if they leave the own king in check, most often if the king was already in check before, or the moving piece was absolutely pinned. Pseudo-legal moves versus strictly legal moves is a matter of move generation, and also playing hash- or even killer moves immediately without explicit move generation, but a pseudo legality test.

See also

Forum Posts

External Links

Up one Level