Pin

Home * Chess * Tactics * Pin

A Pin is a X-ray related situation where a sliding piece, a bishop, a rook or a queen indirectly attacks an opponent king or piece potentially en prise, shielded by another directly attacked opponent piece or pawn on the attacking ray. The direct attacked piece or pawn is then called pinned, and cannot move out of the line of attack, without leaving the indirectly attacked piece en prise or illegally its own king in check. All pieces except the king may be pinned. One tactic which takes advantage of a pin is called working the pin, where other pieces from the pinning piece's side attack the opposing pinned piece. =Types=

Absolute Pin
The absolute pin is where the piece shielded by the pinned piece is the king. In chess programming, to detect absolute pins is necessary for legal move generation and may be considered in evaluation.

Partial Pin
A partial pin refers to (absolute) pins, where the pinned piece or pawn can move along the attacking direction, and may even capture the pinning sliding piece.

Relative Pin
A relative pin is where the piece shielded by the pinned piece is not the king, but either a more valuable than the pinned piece, or conditionally en prise.

Cross Pin
A cross pin describes the rare case, where one piece is pinned in multiple directions simultaneously, most often one partial pin shielding the king and a relative pin shielding the queen. For instance in the otherwise harmless case of a partial pin of a bishop by a bishop, the bishop is also shielding a otherwise hanging queen by a queen, same may apply for rooks instead of bishops. Here the black rook on e4 is cross pinned and black will lose material and likely the game: 4k3/1p4pp/2p5/8/q3r2Q/3p3P/1P4PK/4R3 4k3/1p4pp/2p5/8/q3r2Q/3p3P/1P4PK/4R3 b - -

Of course with the white king on g1 or h1, things would be different. Such multiple issue tactics seems all the domain of the search and is hard to evaluate statically.

Situational Pin
This kind of relative pin is not about shielding own pieces, but important squares, for instance where an opponent rook may have a back rank mate. This kind of pins are usually only considered implicit by the search.

=Considering Pins= Pinned pieces may be considered inside a chess program's move generation and evaluation.

Move Generation
Legal Move generation requires information about absolute pinned pieces, and their pinning direction to cover partial pins. Even non strictly legal move generation may reduce the number of generated illegal moves if considering absolute and partial pinnes, while ignoring the legality of En passant captures and castling.

Evaluation
Evaluation can take the restricted mobility of pinned pieces into account, and should consider the distance of the pinned pieces to its shielded king (or queen for relative pins) and whether it is on the own or opponent half of the board during the opening or middlegame. Some programs even calculate on working the pin, to look whether pinned pieces may further attacked by other pieces, especially pawns, for instance with bitboards whether they intersect opponent none-guarded pawn front attack spans and assign appropriate evaluation penalties.

=See also=
 * Checks and Pinned Pieces (Bitboards)
 * En passant
 * Legal Move
 * Move Generation
 * Skewer
 * Sliding Piece Attacks
 * X-ray
 * X-ray Attacks (Bitboards)

=Forum Posts=

2000 ...

 * Question about the KnightCap find_pins function by Matthew White, CCC, July 14, 2003 » KnightCap
 * Evaluating Pinned Pieces by Tom Likens, CCC, May 19, 2004
 * SEE and pin detection by Dan Honeycutt, CCC, August 30, 2004 » Static Exchange Evaluation
 * Pin aware SEE by Dan Honeycutt, CCC, October 03, 2004
 * Bitboard of Pinned Pieces by Grant Osborne, CCC, July 24, 2008

2010 ...

 * LVA MVV with relative Pin by Clemens Pruell, CCC, February 16, 2011 » MVV-LVA
 * pinned pieces in eval by Pierre Bokma, CCC, October 01, 2011

=External Links=
 * Pin (chess) from Wikipedia
 * Top 10 chess: Tactical Motif VII: The pin
 * The Pin and the Skewer from Ward Farnsworth's Predator at the Chessboard

Up one Level