The Budapest Gambit is an exciting and fun way to play against 1.d4 and 2.c4 - replying with 1...Nf6 and 2...e5. In this video you will learn how to pose problems for White with this fascinating opening.

12/29/2015 – Here's an interesting problem: say you have found some moves somewhere, in coordinate notation without piece names – e.g. 1.h7g5 d8g5 2.b5d5 d1c2 etc. Can one reconstruct the original supposedly meaningful position to which they apply? Azlan Iqbal, who has a Ph.D. in artificial intelligence, retraces his thought processes when he tried, in this unique exercise in forensic chess. Help him and you can win a special prize.

Introducing Recompositions: An exercise in forensic chess

By Azlan Iqbal, Ph.D.

In the process of programming Chesthetica to compose chess problems for my YouTube channel, I came across an interesting problem. Sometimes, debugging involves working backwards. In this case, I am referring to figuring out or "recomposing" what the original starting position of a chess problem was when all you have to work with are bits and pieces of information, such as a line or variation played from that position. The starting position (e.g. FEN) was not recorded since the error occurred in the middle of the composing process. I will show you one example. These are the moves from a particular mysterious starting position (yes, in coordinate notation, as it were) and I wanted to know what the initial position looked like.

1. h7g5 d8g5

2. b5d5 d1c2

3. b3a3 f5h4

4. f3e4 g5e7

5. e4f4 e7a3

6. d5b5 a3d6

7. f4g5 a4c3

8. g5h4 c3b5

9. h4g5 d6e5

10. g5g6 c2d3

My thought process went as follows. White’s first move is from h7 to g5, so there must have been a white knight on h7. It simply cannot be any other way due to the uniqueness of the knight movement. This is followed by Black playing d8 to g5, so the d8 square could have been occupied by a black bishop or a queen, the only possible long-range pieces. I decided to try with a bishop for the moment. White then plays b5 to d5, which means it could be a rook or a queen. I decided to try with a rook. Black then plays d1 to c2, which means the piece on d1 could be a bishop, queen or even the king. I settled on a bishop, for the moment. Besides, there is already an opposite-colored one on d8, so it seems plausible. The position thus far looks like this.

Then White plays b3 to a3, which means the piece on b3 could be a rook, queen or even the king; but not the king, actually, because that would make the first move illegal given that there is a black bishop on d1 which puts the white king in check. So I tried with a rook. It makes sense White might have doubled rooks on the b-file. Black responds with f5 to h4, and that means there must be a black knight on f5. White plays f3 to e4, which means it could be a pawn capture, a bishop, a queen (possibly more than one on the board) or even the king. Yet again, it can't be the white king because of the black bishop on d1. So I tried with a pawn. Never mind for the moment what it captures on e4. Black responds with g5 to e7 and from move 1 we know a black bishop captured the knight on g5. White then plays e4 to f4, so that means f3 cannot be a pawn. It must be a queen, en prise to the bishop on d1, as it were. The position now looks like this.

Black then plays e7 to a3, with that same black bishop from move 4; but we also know this is a capturing move because of White’s rook move from b3 to a3 earlier (move 3). White continues with d5 to b5, using the same rook from move 2. Black replies a3 to d6 with the bishop that just captured the rook. White plays f4 to g5 with his queen which was on f4 from move 5. Black plays a4 to c3, which means a black knight must be on a4. White plays g5 to h4 with his queen that was on g5 from move 7. This move, as we now know, captures the black knight that moved to h4 on move 3. Black responds with c3 to b5, capturing the white rook. White continues with h4 to g5, the queen shuffling back. Black replies with d6 to e5. White plays g5 to g6, with the queen moving just one square yet again (she was on g5 last, remember?) Black ends the sequence with c2 to d3, where his bishop was. The position now looks like this.

Obviously, we are not done because the kings are missing! It's sensible to put them in places where they are not in check. Let us start with the white king. Where would he be? There are many possibilities, but I went with something safe and placed him at g1. The black king, I decided on c8. This is the tentative starting position.

Now it is time to try the moves to see if they make sense!

1. h7g5 d8g5

White’s first move does not seem to make much sense but it may have been a positional sacrifice given he is heavily up in material. Black captures the knight, which makes perfect sense. More importantly, White’s queen is en prise to the bishop on d1, so there is likely a white pawn on e2, which we should add. But wait. White’s rook on b3 is also en prise to the same bishop. Should we add a white pawn on c2 as well? We can’t do that because then it would be illogical how the black bishop arrived on d1. So why not replace the pawn on e2 with a white bishop and put a white pawn on c2?

2. b5d5 d1c2

3. b3a3 f5h4

Plausible enough.

4. f3e4 g5e7

White’s move here does not make much sense because the queen is put en prise to the bishop on c2. We need another blockade... perhaps in the shape of a white pawn on d3?

5. e4f4 e7a3

6. d5b5 a3d6

7. f4g5 a4c3

8. g5h4 c3b5

9. h4g5 d6e5

Still plausible given that d6 to e5 could be a positional sacrifice of some kind.

10. g5g6 c2d3

It is unlikely Black would just sacrifice a bishop with c2 to d3, so it must have been defended by a pawn on say, c4. But that would mean in the initial position, the white rook on b3 is en prise. So more likely the bishop is defended by another piece. How about a rook on d7? But even that does not make sense because the exchange is still unfavorable. Unless... there is a black pawn on d2, about to queen if the white bishop on e2 moves away! So the starting position now looks like this.

The problem is, this is now a mate in two with 1. Qc6+, but a black pawn on b7 can fix that. Below is the final ‘recomposed’ starting position given the move sequence above.

So it works but is probably not 100% correct. Does your detective work lead you to a different starting position? Here's the above position in ASCII and FEN, for you to experiment with:

wKg1,Qf3,Nh7,Be2,Rb3,b5,Pc2,d3/bKc8,Na4,f5,Bd1,d8,Rd7,Pb7,d2 2kb4/1p1r3N/8/1R3n2/n7/1R1P1Q2/2PpB3/3b2K1 w - - 0 1

Clearly, given more variations or other pieces of information, the starting position can more accurately be guessed and proven, to an extent. Unfortunately, in this particular case, I do not have the actual starting position that fits the moves above to compare against. Except that I do have one more thing... an engine evaluation of the provided line above showing +8 (pawns), which means the final position is probably more wrong than it is right.

Here is what we got playing through the moves with an engine running:

[Event "ChessBase.com article"] [Site "?"] [Date "2015.10.27"] [Round "?"] [White "Iqbal, Azlan"] [Black "Recomposition"] [Result "*"] [SetUp "1"] [FEN "2kb4/1p1r3N/8/1R3n2/n7/1R1P1Q2/2PpB3/3b2K1 w - - 0 1"] [PlyCount "20"] {Reconstruction from the move sequence: 1. h7g5 d8g5 2. b5d5 d1c2 3. b3a3 f5h4 4. f3e4 g5e7 5. e4f4 e7a3 6. d5b5 a3d6 7. f4g5 a4c3 8. g5h4 c3b5 9. h4g5 d6e5 10. g5g6 c2d3} 1. Ng5 Bxg5 2. Rd5 Bxc2 (2... Bxe2 { and Black wins.}) 3. Ra3 (3. Rxd7 {leads to a forced mate.}) 3... Nh4 (3... Be3+ {draws.}) 4. Qe4 (4. Qh3 {is a far more compelling move.}) 4... Be7 5. Qf4 (5. Qe6) 5... Bxa3 6. Rb5 {is a draw.} (6. Rxd7 Kxd7 7. Qxd2 {wins.}) 6... Bd6 {loses.} (6... d1=Q+ 7. Bxd1 Bxd1 8. Qxh4 Bc5+ {is a draw.}) 7. Qg5 $2 {loses for White.} Nc3 {is a draw.} (7... Bxd3 8. Bg4 d1=Q+ 9. Bxd1 Bxb5 10. Qxb5 Bc5+ 11. Kh2 Rxd1 12. Qxa4 Rd2+ {probably wins for Black.}) 8. Qxh4 Nxb5 (8... Nxe2+ {leads to a forced mate for Black.}) 9. Qg5 (9. Qc4+ {is a better attempt to save the game.}) 9... Be5 {draws.} (9... Bxd3 {wins.}) 10. Qg6 $2 {loses.} (10. Qxe5 {draws.}) 10... Bxd3 $2 {draws.} (10... Rg7 {forces mate.}) *

So: the actual starting position in this case might remain a mystery indefinitely, unless – unless one of our readers can work it out. There is a special prize for the best and most plausible position submitted: an historic copy of Fritz 13, signed by the 13th World Champion Garry Kasparov, who visited Malaysia last year. You can send your solutions to my official email address with a c.c. to my private address, just in case our spam filter here at the university gets too fussy.

I have two more copies of Fritz 13 signed by Garry Kasparov. If there are multiple

valid and interesting entries I am willing to nominate multiple prize winners.

Previous ChessBase articles by Prof. Azlan Iqbal