Older Version Newer Version

GerdIsenberg GerdIsenberg Jan 16, 2018

[[toc]]
**[[Home]] * [[Chess]] * [[Moves]] * En passant**

**En passant** (from French: "in passing") <ref>[[http://www.chesshistory.com/winter/extra/earliest.html|Earliest Occurrences of Chess Terms]] by [[https://en.wikipedia.org/wiki/Edward_Winter_%28chess_historian%29|Edward Winter]]</ref> is a special [[Pawn|pawn]] [[Captures|capture move]], which is only possible immediately after an opposing pawn tried passing an advanced pawn on the fifth [[Ranks|rank]] (or fourth for black pawns) by a [[Pawn Push#DoublePush|double pawn push]]. This double pushed pawn can then be captured the same way, as it would only performed a single push - but only as an immediate reply.

This chess rule makes chess programming a bit harder. First, the target square of the en passant capture is not identical with origin of the captured pawn, opposed to all other captures. Second, the double pawn push, which triggered the immediate possibility of an en passant capture, must be part of the [[Chess Position|chess position]]. The information required is whether there was a previous pawn push, and if so, at least the [[Files|file number]] of that pawn, considered as [[Forsyth-Edwards Notation#Enpassanttargetsquare|en passant target square]] inside the [[Forsyth-Edwards Notation]] (FEN), albeit with the redundant rank (3 or 6) as well.

=Legality Test= 
To prove an en passant capture is actually possible, at least the [[Forsyth-Edwards Notation#Enpassanttargetsquare|en passant target square]] should be under attack of an opponent pawn for [[Pseudo-Legal Move|pseudo legality]]. Further, for [[Legal Move|strict legality]], the ep capturing pawn should not be [[Pin#AbsolutePin|absolutely pinned]], which additionally requires a horizontal pin test of both involved pawns, which disappear from the same rank.

> [[image:http://webchess.freehostia.com/diag/chessdiag.php?fen=8/6bb/8/8/R1pP2k1/4P3/P7/K7%20b%20-%20-&size=medium&coord=yes&cap=no&stm=yes&fb=no&theme=classic&color1=E3CEAA&color2=635147&color3=000000 caption="8/6bb/8/8/R1pP2k1/4P3/P7/K7 b - d3 after d2-d4"]]

The legality test should be best applied in [[Make Move|making]] of the [[Pawn Push#DoublePush|double pawn push]], also considering [[Incremental Updates|updating]] [[Zobrist Hashing|Zobist keys]] to avoid dissimilarity of otherwise [[Repetitions|repeated]] [[Chess Position|positions]] if the first occurrence happened after a double pawn push with no en passant capture actually possible <ref>[[http://www.talkchess.com/forum/viewtopic.php?t=33397|en passant and hash key calculation]] by [[Fred Hamilton]], [[CCC]], March 21, 2010</ref> .
[[#bugs]]
=En passant bugs= 
The implementation of the en passant rule often caused subtle [[Engine Testing#bugs|bugs]]. Almost every chess programmer had various issues with it <ref>[[Chrilly Donninger]] (**1999**). //Computer machen keine Fehler//. [[Computerschach und Spiele|CSS]] 2/99, [[http://www.mustrum.de/chrilly/keine_fehler.pdf|pdf]] (German)</ref> , most notable [[Louis Kessler]] with his [[Brute Force (Program)|Program Brute Force]]. [[Gerd Isenberg]] had a special en passant experience with [[IsiChess]] at [[Aegon 1994]] in the game versus Henk Arnoldus. IsiChess pushed its white pawn from b2 to b4 "between" the two advanced pawns a4 and c4 from Henk, allowing two possible en passant options. Unfortunately IsiChess only generated one - the "wrong" one (an assembly bug due to jc instead if jnz or that like, otherwise it would not have played it), and was immediately lost after Henk played the "right" one <ref>[[http://www.csvn.nl/index.php?option=com_docman&task=cat_view&gid=40&Itemid=26&lang=en|CSVN Downloads Games Aegon Tournaments]]</ref> <ref>[[http://groups.google.com/group/rec.games.chess/browse_frm/thread/8dbd04e027108e0c|Aegon 1994 Round 4 (REPOST)]] by [[Dap Hartmann]], [[Computer Chess Forums|rgc]], May 09, 1994</ref> :
[[code]]
[Event "9th AEGON man-comp"]
[Site "The Hague NED"]
[Date "1994.05.02"]
[Round "4"]
[White "IsiChess"]
[Black "Henk Arnoldus"]
[Result "0-1"]

1.e4 e6 2.d4 d5 3.Nd2 Nf6 4.e5 Nfd7 5.Bd3 b6 6.Ngf3 Ba6 7.O-O Bxd3
8.cxd3 Be7 9.Nb3 O-O 10.Bd2 Na6 11.Qe2 Qc8 12.Rac1 Qb7 13.Rc2 c5
14.Rfc1 Rfc8 15.dxc5 bxc5 16.Qe3 Nb4 17.Bxb4 Qxb4 18.Nbd2 a5 19.a3 Qb7
20.Kh1 Ra6 21.d4 c4 22.Qc3 a4 23.b4 axb3 24.Nxb3 Rxa3 25.Nfd2 Rb8
26.Rb1 cxb3 27.Rcb2 Bb4 28.Qc1 Bxd2 29.Rxd2 Ra2 30.Rdb2 Rxb2
31.Qxb2 Qb4 32.f4 g6 33.h3 Qc4 34.Rc1 Qd3 35.f5 Qxf5 0-1
[[code]]
> [[image:http://webchess.freehostia.com/diag/chessdiag.php?fen=2r3k1/1q1nbppp/r3p3/3pP3/pPpP4/P1Q2N2/2RN1PPP/2R4K%20b%20-%20b3&size=medium&coord=yes&cap=no&stm=yes&fb=no&theme=classic&color1=E3CEAA&color2=635147&color3=000000 caption="2r3k1/1q1nbppp/r3p3/3pP3/pPpP4/P1Q2N2/2RN1PPP/2R4K b - b3 0 23"]]

=See also=
* [[Algebraic Chess Notation#Enpassant|Algebraic Chess Notation - En passant]]
* [[Captures]]
* [[Castling]]
* [[Forsyth-Edwards Notation#Enpassanttargetsquare|FEN - En passant target square]]

=Forum Posts= 
==1999==
* [[http://www.stmintz.com/ccc/index.php?id=42421|en-passant move generation]] by Larry Griffiths, [[CCC]], February 06, 1999
* [[http://www.stmintz.com/ccc/index.php?id=79362|Unique nodes, en passant and perfect hashing]] by Andreas Stabel, [[CCC]], November 25, 1999
==2000 ...==
* [[http://www.stmintz.com/ccc/index.php?id=332375|annoying en passant x-ray]] by [[Georg von Zimmermann]], [[CCC]], November 30, 2003
==2005 ...==
* [[http://www.talkchess.com/forum/viewtopic.php?t=13557|Programmer bug hunt challenge]] by [[Ed Schroder|Ed Schröder]], [[CCC]], May 04, 2007 » [[Portable Game Notation]]
==2010 ...==
* [[http://www.talkchess.com/forum/viewtopic.php?t=33397|en passant and hash key calculation]] by [[Fred Hamilton]], [[CCC]], March 21, 2010
* [[http://www.talkchess.com/forum/viewtopic.php?t=40248|Komodo 3 and a minor bug]] by [[Jouni Uski]], [[CCC]], September 02, 2011
* [[http://www.talkchess.com/forum/viewtopic.php?t=47622&start=6|Re: Causes for inconsistent benchmark signatures]] by [[Evert Glebbeek]], [[CCC]], March 27, 2013 » [[Forsyth-Edwards Notation]]
* [[http://www.talkchess.com/forum/viewtopic.php?t=49316|polyglot en passant square]] by [[Marco Belli]], [[CCC]], September 12, 2013 » [[Polyglot]]
* [[http://www.talkchess.com/forum/viewtopic.php?t=49362|ep and castle rights hashing]] by [[Natale Galioto]], [[CCC]], September 15, 2013 » [[Castling rights]], [[Repetitions]], [[Transposition Table]]
* [[http://www.talkchess.com/forum/viewtopic.php?t=51988|Abundance of castling vs en passant rights]] by [[Kirill Kryukov]], [[CCC]], April 14, 2014 » [[Castling]]
* [[http://www.open-chess.org/viewtopic.php?f=5&t=2697|En-passant legality test]] by tetra, [[Computer Chess Forums|OpenChess Forum]], August 07, 2014 » [[Legal Move]]
==2015 ...==
* [[http://www.talkchess.com/forum/viewtopic.php?t=55290|En passant bonus]] by [[Lyudmil Tsvetkov]], [[CCC]], February 10, 2015 » [[Pawn Structure]]
* [[http://www.open-chess.org/viewtopic.php?f=5&t=2885|Dynamic EP flag]] by thevinenator, [[Computer Chess Forums|OpenChess Forum]], October 02, 2015 
* [[http://www.talkchess.com/forum/viewtopic.php?t=60075|Triple Repitition: Is this considered a repitition or not?]] by Jayakiran Akurathi, [[CCC]], May 07, 2016 » [[Repetitions]]
* [[http://www.talkchess.com/forum/viewtopic.php?t=62733|Enpass + Castling for Zorbist hashes]] by [[Andrew Grant]], [[CCC]], January 06, 2017 » [[Castling rights]], [[Zobrist Hashing]]
* [[http://www.talkchess.com/forum/viewtopic.php?t=66323|3-fold repetition and cutechess-cli]] by Lars Mathiesen, [[CCC]], January 14, 2018 » [[Repetitions]]

=External Links= 
* [[https://en.wikipedia.org/wiki/En_passant|En passant from Wikipedia]]
* [[http://boylston-chess-club.blogspot.com/2008/08/en-passant.html|Boylston Chess Club Weblog: En passant]]
* [[http://www.cs.cmu.edu/%7Ebwl/EnPassant.htm|En Passant - The Bimonthly Journal of the Pittsburgh Chess Club]] by [[Bruce W. Leverett]]

=References= 
<references />
=What links here?= 
[[include page="En passant" component="backlinks" limit="120"]]
**[[Moves|Up one Level]]**