I am by no means a chess person (like 1200 haha). I am designing a computer science challenge where the player has to find a bug in my chess program to beat stockfish in a game of chess. The bug is that en passant is incorrectly programmed.

| | |

In the above diagram, Q is a black queen, and P is a white pawn.

Imagine a position where our pawn is next to an enemy piece, like a queen. The program forgets to check that the piece it is trying to en-passant is a pawn.

This allows it to capture the enemy queen, like so:

|P| |
|X| |

(X being the position of the queen, that was "captured")

So I am looking for an opening that can draw the enemy queen out in this fashion. It doesn't have to be a particularly strong opening, since we will gain 9 pts advantage from taking the queen.

Does an opening like this exist, where the white player is able to get one of their pawns adjacent to the black queen?

  • Fun! You'd probably want to sac some material to reliably guide the queen to the right spot. May 24, 2021 at 23:21

2 Answers 2


If you can en passant any enemy piece and the engine doesn't know about it, you don't need to trick Stockfish into bringing its queen out early. You can play almost any way you want and let the game come to you eventually.

I guess a quick example can come from the Alekhine Defence. After 1.e4 Nf6 2.e5 Nd5, if I understood correctly you can put yourself a piece up with 3.exd6 e.p


Yep, there are a number of examples, I've included three here. In each of these lines Black is playing objectively good moves for the entire time, but Stockfish still may deviate early on and play some equally good move instead. However, when if it makes it to the point when it's deciding whether to do the final queen move, it should go for it in all three lines.

 [FEN ""]

  1. e4 (1. d4 d5 2. c4 e6 3. Nc3 c6 4. e4 dxe4 5. Nxe4 Bb4+ 6. Bd2 Qxd4) 1... 
  c5 (1... e5 2. Nf3 Nc6 3. Bb5 a6 4. Bxc6 dxc6 5. Nxe5 Qd4) 2. Nf3 d6 3. d4 
   cxd4 4. Nxd4 Nf6 5. Nc3 a6 6. Bg5 e6 7. f4 Qb6 8. Qd2 Qxb2 *

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.