## Research idea: the longest middlegame attacks

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

LevyRook
Posts: 9
Joined: Sun Apr 14, 2024 7:50 am
Full name: Jim Wood

### Research idea: the longest middlegame attacks

I'm interested in "the longest non-trivial forced middlegame variations" (for simplicity, most of the time I'll refer to it as "the longest non-trivial middlegame checkmates"). I figured this topic is relevant to computer chess because
• Such variations can be found in computer games.
• Such variations can be used for testing engines.
• Maybe we can even use computers to generate such variations.
Many positions discussed here are completely illegal. But they can be split into smaller puzzles.

Motivation

People love long middlegame attacks. Kasparov's Immortal (~14-move attack), Serper's Immortal (~23-move attack), Polish Immortal (~13-move attack).

However, strangely no one seems to ask how long can such middlegame attacks get. Even though it seems like an important topic about exploring the limits of chess' complexity.

The current length records are all about the endgame (tablebase records) or are in some sense "trivial", using very specific tricks to achieve length (e.g. repeated zugzwang). Such length records have zero traits in common with immortal games.

Defining middlegame and triviality

How do we define a "middlegame"? How do we define "triviality"?

Instead of defining it directly, I think a better approach is to consider parameters which make the length of a checkmate objectively harder to achieve:
• (P) The amount of pieces on the board.
• (P) The amount of pieces which make a move in the checkmating variation.
• (P) The amount of heavy pieces. Rooks and queens.
• (P) The amount of non-check moves.
• (P) The size of material disadvantage of the checkmating side.
• (P) The degree of naturalness of the position.
• (N) The amount of obvious repetitions.
• (N) The degree of isolation of pieces. For example, if a piece is 100% isolated from the game forever, it's bad.
As the positive (P) parameters go up and the negative (N) parameters go down, the length of a checkmate becomes objectively harder to achieve. Meaning there becomes objectively less checkmates satisfying such parameters. Also, note that many of those parameters have to be evaluated throughout the entire checkmating variation, not only in the initial position. If a complicated middlegame simplifies into a technically won endgame, the technically won endgame doesn't count as adding length.

So, instead of a single definition of a "non-trivial middlegame checkmate", think about a PARAMETER SPACE we can explore. I know, it's inconvenient that there isn't a single simple definition for the task at hand. But that doesn't make the topic less important. If we care about chess, we should care about the maximal length of middlegame attacks. We should care about DIFFERENT types of length records, not just about 1 or 2 types.

How to research that?

I think there's two main avenues of research.

The first avenue is analyzing computer games. They contain the longest and most sound middlegame attacks. The second avenue is creating arbitrary chess positions.

I'll share some of my puzzles. Then some of the other people's puzzles and some computer games.

My puzzles

Disclaimer: all positions here were verified with 40MB browser Stockfish, sometimes it misses a lot of stuff. I think the positions are valuable even if they have refutations.
[pgn][FEN "n1krqbrq/pRnb2Pq/Bpn3bq/5PPq/7P/5N1N/PP6/K1R1Q1BR w - - 0 1"]
[Variant "From Position"]

1. Rxc7+ Kxc7 2. Bh2+ Bd6 3. Bxd6+ Kxd6 4. Rxc6+ Bxc6 5. Qg3+ Kd5 6. Rd1+ Kc5 7. Rc1+ Kb4 8. Ne5!! Ka5 9. Bf1!! Rd3 (9... b5 10. Qc3+ Kb6 11. Nxc6 Rd1 12. Qa5+ Kb7 13. Qxa7+ Kc8 14. Qxa8+ Kc7 15. Qa7+ Kd6 16. Qc5+ Kd7 17. Ne5+ Qxe5 18. Bxb5+ Kd8 19. Qc8+ Ke7 20. f6+ Qxf6 21. Qc7+ Ke6 22. Bc4+ Rd5 23. Qc6+ Ke7 24. Qxf6+ Kd7 25. Bb5+ Rxb5 26. Qd4+ Ke8 27. Rc8+ Ke7 28. Qf6+ Kd7 29. Qc6+ Ke7 30. Rc7+ Kd8 31. Qd7#) 10. Qxd3 b5 11. Rxc6!! Qxc6 (11... Qd1+ 12. Qxd1 Qxc6 13. Nxc6+ Kb6 14. Qd4+ Kc7 15. Qxa7+ Kxc6 16. Bg2+ Kd6 17. Qa6+ Kc7 18. Qb7+ Kd8 19. Qxa8+ Kc7 20. Qc6+ Kd8 21. Qb6+ Kd7 22. Bc6+ Kd6 23. Bb7+ Kd7 24. Qc6+ Kd8 25. Qd6+ Ke8 26. Bc6+ Kf7 27. Qd7#) 12. Nxc6+ Kb6 13. Qd4+ Kc7 14. Qxa7+ Kxc6 15. Bg2+ Kd6 16. Qa6+ Ke7 17. f6+ Kd7 18. Qc6+ Kd8 19. Qxa8+ Kd7 20. Qb7+ Kd8 21. Qb6+ Kd7 22. Bc6+ Ke6 23. Bf3+ Kd7 24. Qc6+ Kd8 25. Nf4!! Re8 (25... Qxf3 26. Ne6#) 26. Qb6+ Kd7 27. Bc6+ Kd6 28. Bxe8+ Ke5 29. Qe3+ Be4 30. Nd3+ Ke6 31. Qb6+ Bc6 32. Qxc6+ Kf5 33. Bd7+ Kg6 34. Ne5# { 1-0 } [/pgn]
Above is a checkmate in 34 moves. At every half-move White is at least 16 points of material down. White never gains material advantage. Queens never get traded off. No piece is forever isolated from the game. Checkmating the Black King requires finding A LOT of completely original moves, no repetitions. Not every White's move is a check or even a capture. The entirety of the checkmate takes place in the "middlegame".

[d]qrqqqqqq/qqqqqBqN/qrrPnpqq/Nnr1nppr/qrBNPq1b/rP1B1p1k/pPQPQQRP/nNBNKR1b w - - 1 1

Above is a checkmate in 32 moves. At every half-move White is at least 126 points of material down. If you want to try guessing it move by move: https://lichess.org/study/hBcBtt33. Click "reveal the solution" to reveal the next move, it doesn't reveal the whole thing.
[pgn][FEN "Nr6/q4p2/n4Q1p/r1kPR3/p2p1P1p/3B1Nbr/b4Prq/K2R2nB w - - 1 16"]
[Variant "From Position"]
[SetUp "1"]

16. Qc6+ Kb4 17. Rb1+ Bb3 18. Qc4+ Ka3 19. Qc1+ Kb4 20. Qd2+ Ka3 21. Qb2+ Kb4 22. Nxd4 Bxf4 23. Re4 Rxd3 24. Nxb3+ Kb5 25. Nd4+ Kc4 26. Qc2+ Rc3 27. Nb3+ Qd4 28. Nb6+ Rxb6 29. Rxd4+ Kb5 30. Nxa5+ Kc5 31. Qxc3+ Kd6 32. Rxb6+ Ke7 (32... Kd7 33. d6 Ke6 34. d7+ Kf5 35. d8=Q Nc5 36. Qf6+ Kg4 37. Qg7+ Kh5 38. Qxf7+ Kg4 39. Qg6#) 33. Re4+ Kf8 34. Qh8+ Rg8 35. Re8+ Kxe8 36. Qxg8+ Ke7 37. Nc6+ Kf6 38. Ne5+ Kxe5 39. Qg7+ Kf5 40. Rf6+ Ke5 41. Re6+ Kf5 42. Be4# { 1-0 White wins by checkmate. }[/pgn]Above is a fragment of my "checkmate in 42 moves" puzzle. White is never up material. Most of the half-moves White is at least 3 points down.

[d]rn2Q1rb/qq1n1b2/Nqp3Bk/1q2Pppq/RprpR1rb/brpP1rQ1/qPPN2PQ/rbBRK2Q w - - 6 1

Above is a checkmate in 43 moves. At every half-move White is at least 26 points of material down. There's one fixable flaw though: White can find a shorter checkmating variation on the 3rd move.

[d]qRnrnrkn/rb1q1bqp/Rqnp1Qbq/nR2QnQP/rR1P1BN1/BNPQpb1R/qPB2P2/qNNNK2n w - - 3 1

Position above shows what a non-trivial checkmate in 52 moves could look like. Unfortunately the position has multiple flaws without any obvious fix. White has shorter checkmates (10. Rf5+, 12. Bf6) and Black has a draw (25. ... Rxg7).

Others' compositions
[pgn][Event "4.p Prusikin-45"]
[Date "2023"]
[White "Nielsen=S"]
[Black "(+4447.33g1h7)"]
[Result "1-0"]
[FEN "2q1br1n/Q4p1k/np6/8/1P4p1/P1NR2P1/1B6/6K1 w - - 0 1"]
[Variant "From Position"]
[SetUp "1"]

{ Steffen Slumstrup Nielsen, Prusikin-45, 2023

Nielsen=S - (+4447.33g1h7) }
1. Rd2 (1. Nd5?? Qc2 \$19) (1. Rd6? Qc7 2. Qxb6 Qxb6+ 3. Rxb6 Nc7) (1. Ne4? Qc2 2. Qe7 Qxb2) (1. Qe7? Qe6 2. Qh4+ (2. Qxf8 Qe1+) 2... Kg8 3. Ne4 f6 4. Nxf6+ Rxf6 5. Qxf6 Qe1+) 1... Qc7 (1... Nc7 2. Ne4 f6 3. Qxb6 Ne6 4. Rf2 Qd7 5. Nxf6+ Rxf6 6. Rxf6 \$18) 2. Rh2+ (2. Qxa6 \$19 Qxg3+) (2. Nd5?? Qxg3+ \$19) 2... Kg6 3. Ne2!! (3. Nd5? Qxg3+) 3... Qxa7 (3... Bb5 4. Nf4+ Kf5 5. Rh5+ Ke4 6. Re5+ Kf3 7. Ng2) 4. Nf4+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nd3+ (16... Bd7 17. Rg2+ Kh1 18. Rg5 \$18 (18. Rg7 \$18)) 17. Rxd3 (17. Nxd3?? Ng6 \$19) 17... Bd7 18. Rg3 (18. Rxd7? Ng6) 18... Ra8 (18... Rg8 19. Rxg8 \$18) (18... Rc8 19. Rg2+ Kh1 20. Ne2 Rc2 21. Kg3 \$18) 19. Rg2+ Kh1 20. Ne2 (20. Nh5 Rxa3 21. Ng3+) 20... Rxa3 21. Ng3+ Rxg3 22. Kxg3 f5 (22... Bh3 23. Kxh3 Ng6 24. Kg3 f5 25. Ra2 f4+ 26. Kh3 Kg1 27. Rg2+ Kf1 28. Rxg6) 23. Kf2! (23. Rd2!? f4+ 24. Kxf4 Bh3) 23... f4 (23... Be8 24. Rg7! (24. Rg8 Ng6) 24... Bg6 25. Rg8 Nf7 26. Rxg6 Kh2 27. Rg7 \$18) 24. Rg8 (24. Rg7? Bh3 (24... Bf5 25. Rg5 Bh3) 25. Rh7 Kh2 26. Rxh8 b4 27. Rh4 b3 28. Rxf4 b2) 24... Nf7 (24... Ng6 25. Rxg6 Kh2 26. Rh6+ Bh3 27. Rh4) 25. Rg7 Nh6 26. Rh7 Bh3 (26... Kh2 27. Rxh6+ Bh3 \$18) 27. Rxh6 Kh2 28. Rh4 (28. Rb6 Bd7 29. Rh6+ \$18) 28... f3 (28... b4 29. Rxf4 b3 30. Rb4) 29. Kxf3 (29. Rb4 Be6 30. Rh4+ \$18) 29... b4 30. Kf2! (30. Rxb4!? Bd7!) 30... b3 31. Rb4 Be6 32. Rb6! b2 (32... Bf5 33. Rxb3 Bc2 34. Rb2 Bf5 35. Rb5 Bg6 36. Rb6 Bf5 37. Rh6+ Bh3 38. Rh7 Kh1 39. Rxh3#) 33. Rxe6 b1=Q 34. Rh6# { 1-0 White wins. } 1-0[/pgn]
This composition by Steffen Slumstrup Nielsen has the following properties. White is at least down a piece for the first 26 moves. At least two heavy pieces are on the board for the first 21 moves. It IS a long non-trivial attack, despite being closer to an endgame.

[d]8/7Q/2r1p3/2rkr3/2rrr2Q/7K/8/8 w - - 0 1

This composition by Philip Bondarenko is unique, because it shows the longest checkmate given the biggest material disadvantage (13 points of material) with the maximal freedom of movement (all Black's rooks are centralized in a completely open position). It's "trivial" in terms of all moves being checks and there being an obvious repeating pattern, but it maximizes other non-trivial parameters.

[d]b2b1Rqb/Nnp2brR/1pN1N1Pq/n2K4/pP6/2k1Pp1n/Rpp3br/rbBbrrqq w - - 0 1

Above is a bastardized version of a composition by Otto Blathy and Heinrich Meyer. White gives checkmate in 45 moves. Being at least 67 points down at every half-move. However, it's "trivial" in terms of all moves being checks and there being an obvious repeating pattern.
[pgn][Event "Paul Lamford, Chess America, March 1981"]
[FEN "8/8/8/1k3p2/p1p1pPp1/PpPpP1Pp/1P1P3P/QNK2NRR w - - 0 1"]
[SetUp "1"]

1. Kd1 Kb6 2. Ke1 Kb5 3. Rg2 Kb6 4. Re2 Kb5 5. Kf2 Kb6 6. Re1 Kb5 7. Rg1 Kb6 8. Rg2 Kb5 9. Rc1 Kb6 10. Ke1 Kb5 11. Re2 Kb6 12. Kd1 Kb5 13. Re1 Kb6 14. Rc2 Kb5 15. Kc1 Kb6 16. Qa2!! bxa2 (16... Kb5 17. Qxb3+ axb3 18. a4+) 17. b4 a1=Q 18. Rb2 Kb5 19. Rd1 Qxb2+ (19... Ka6 20. b5+ Kb6 21. Re1 Ka7 22. b6+ Kb7 23. Rd1 Ka8 24. b7+ Kb8 25. Re1 Kc7 26. b8=Q+) 20. Kxb2 Kb6 21. Rc1 Kb5 22. Rc2 dxc2 (22... Kb6 23. Kc1 Kb5 24. Rb2 Kb6 25. b5) 23. Kxc2 Kc6 24. d3 exd3+ 25. Kd1 Kd5 26. Nbd2 Kc6 27. Nxc4[/pgn]
The composition above is unique, because despite having a giant material advantage White needs ~24 moves to get a dominating position.
[pgn][Event "David Zimbeck's puzzle"]
[Annotator "David Zimbeck"]
[FEN "2r5/1N1NpPk1/2P1p1P1/pp2Pp1P/2rp2pK/2b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kh6) 17. h8=Q Qh5+ 18. Kxh5 h1=Q+ 19. Kg5 Qg2+ 20. Ng4 Rc8 (20... e2 21. Kf5) 21. Nxe7) 15. fxe3 gxh2 (15... Rxg6+ 16. Nxg6 gxh2 17. Nh6+ Ke6 18. h8=Q h1=Q 19. Qc8+ Kd5 20. Ng4! Qxg4+ (20... dxe3 21. Nf4+ Kd4 22. c3+) 21. Qxg4 dxe3 22. Qd7+) 16. e6+ Rxe6 17. Nh6+ Ke8 18. Nxe6 Qg1+ 19. Kf5 Qf2+ 20. Nef4 Qxc2+ (20... Kd7 21. h8=Q h1=Q 22. Qxd4+ Kc7 (22... Ke8 23. Kg5 Qfg1+ 24. Ng4 Qd1 25. Qg7 Kd7 26. Qxe7+ Kc8 27. Qa7 \$18) 23. Kg5 Kb7 (23... Qb7 24. Nxe7) 24. Qd7+ Ka6 (24... Kb8 25. Ng4) (24... Ka8 25. Qc8+) 25. Qe6+ Ka7 (25... Kb7 26. Qxe7+ Kb6 (26... Ka6 27. Qd6+ Kb7 28. Ng4) 27. Qd8+! \$18) 26. Ng4 Qxc2 (26... Qg3 27. e4 \$18 (27. c3 { Also strong as black has no good moves } 27... b4 (27... a4 28. c4 bxc4 (28... b4 29. c5 \$18) 29. Qxc4 \$18) 28. Qa2 Kb8 29. Qxa5 bxc3 30. Qe5+ Ka8 31. Qxc3 { 3N+P vs Q is a win and white is dominating })) (26... Qd2 27. Nxe7 Qd8 28. Nf6 Qf8 29. Qd7+ Qb7 30. Qd4+ Ka8 31. N6d5) 27. Nd5 Qc5 28. Nxe7 \$18) 21. e4! h1=Q (21... Qxe4+ 22. Kg5 Kd7 23. h8=Q Kc7 24. Ne5 h1=Q (24... Kb7 25. Nd7) 25. Ne6+ Kb7 26. Nc5+) 22. h8=Q+ Kd7 23. Ne5+ Kc7 24. Qa8 Qcxe4+ 25. Qxe4 Qxe4+ 26. Kxe4[/pgn]
In this puzzle by David Zimbeck White launches an insane sacrificial attack. In some variations White takes slightly more than 31 moves to gain material advantage. The puzzle is not based on a repeating pattern.

Computer games
[pgn][Event "Stoofvlees vs. Igel"]
[FEN "2kr2nr/1pqbn3/p4p2/3p2pp/Pb6/2NB1N2/1BP2QPP/R4R1K w - - 0 1"]
[Variant "From Position"]
[SetUp "1"]

1. Nb5!! axb5 2. axb5 b6 3. Ra6 Kb7 4. Bd4 Nc8 5. c3 Ba5 6. c4 g4 7. Rxa5!! bxa5 8. b6 Qd6 9. c5 Qc6 10. Nd2 a4 11. Nb3!! axb3 (11... Qe6 12. Na5+ Ka8 13. b7+ Kb8 14. Qf4+ Nd6 15. cxd6 Nh6 16. Ba7+ Kxa7 17. Qd4+ Kb8 18. Qb6 Bb5 19. Qc7+ Ka7 20. Bxb5 Rxd6 21. b8=Q#) 12. Ra1 Nd6 13. Ra7+ Kb8 14. cxd6 Qc1+ 15. Bf1 Nh6 16. Qe2 Qc6 17. Qa6 b2 (17... Rhf8?? 18. b7 Qxa6 19. Bxa6 Bc8 20. Ra8#) (17... Rhe8 18. Qa5! Re6?? 19. b7) 18. Qa2 b1=Q 19. Qxb1 Nf5 20. b7 Nxd6 21. Ra6 Nxb7 22. Rxc6 { White gains material advantage. } 22... Bxc6 23. Bxf6 [/pgn]
In the game Stoofvlees vs. Igel, there happened a non-trivial 21 move sequence. Throughout which White were down at least 5 points of material (not every half-move, but every move), at least 2 queens and 5 heavy pieces overall remained on the board.
[pgn][Event "Torch vs. Leela Chess 0"]
[FEN "1r3rk1/1bqp1np1/p2Rp3/2p1PP2/6Pp/2N5/PPP5/2K1Q1RB w - - 0 1"]
[Variant "From Position"]
[SetUp "1"]

1. fxe6!! Nxd6 2. Nd5!! Bxd5 3. Bxd5 Rf4 4. exd7+ Kf8 5. Qxh4 Nf7 6. Bxf7 Kxf7 7. Qh5+ Kg8 8. Qe8+ Rf8 9. Qe6+ Rf7 10. Rd1 Kf8 11. g5 g6 12. Qxg6 Ke7 13. Qe4 Kd8 14. Rh1 Rxd7 15. Rh8+ Ke7 16. Qh7+ Ke6 17. Qh6+ Kd5 18. c4+ Kxc4 19. Qe6+ Rd5 20. Rh4+ Kb5 21. Qxd5 { White gains material advantage. }[/pgn]
In the game Torch vs. Leela Chess 0, there happened a non-trivial 20 move sequence.

So, even with computer games finding a 25+ move attack down material is not easy. But my knowledge of computer chess is extremely limited.

Conclusions and Resources

Here are Lichess studies with the positions I talked about:

https://lichess.org/study/sTon08Mb

https://lichess.org/study/XZjpjz0c

Even illegal positions don't make creating a long non-trivial middlegame checkmate easy.

The longest non-trivial checkmate may be only 50-60 moves long. We never gonna know where a hard ceiling will hit, but it's definitely got to be less than 100 moves.

Finding "the longest non-trivial middlegame draw" has to be more complicated than finding the longest non-trivial middlegame checkmate.

Many positions with long (30+ moves) non-trivial checkmates were built from positions from real games. It gives many positions a kind of unique and recognizable look. Underneath all the insanity those positions look "vaguelly typical".

What you can do without much effort

You can post here a legal middlegame position with a 10+ checkmate (the longer, the better). The entirety of the checkmate doesn't have to be non-trivial (because we can make it non-trivial later, by modifying the position). I could try expanding it (by making the position illegal). That's how I created most of my puzzles, the original positions came from my bullet games. And one of the positions I was lucky to find on Reddit.
Look
Posts: 378
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

### Re: Research idea: the longest middlegame attacks

Hi,

Welcome to talkchess.

[...]
Disclaimer: all positions here were verified with 40MB browser Stockfish, sometimes it misses a lot of stuff.
[...]

Use Stockfish in a proper GUI with a much higher hash and processing power. Single core if you want deterministic results.
Farewell.
LevyRook
Posts: 9
Joined: Sun Apr 14, 2024 7:50 am
Full name: Jim Wood

### Re: Research idea: the longest middlegame attacks

Hi, Look! Often I don't have much computing power.

I know that I could go at much greater lengths to verify the positions, but I need to know if anybody cares about the topic in the first place (and if somebody does care, they may have much greater ability to verify the positions).

Unless I'm wrong, finding even flawed positions of such kind isn't easy. So I hope the post contains enough effort and value to start a discussion.
Jouni
Posts: 3363
Joined: Wed Mar 08, 2006 8:15 pm

### Re: Research idea: the longest middlegame attacks

SF is not good for mates. Try Huntsman. First position

Analysis by The Huntsman 1:

1.Rxc7+ Kxc7 2.Bh2+ Bd6 3.Bxd6+ Kxd6 4.Rxc6+ Bxc6 5.Qg3+ Kd5 6.Rd1+ Kc5 7.Rc1+ Kb4 8.Ne5 Ka5 9.Bf1 Rd3 10.Qxd3 b5 11.Rxc6 Qxc6 12.Nxc6+ Kb6 13.Qd4+ Kc7 14.Qxa7+ Kxc6 15.Bg2+ Kd6 16.Qa6+ Kd7 17.Qc6+ Ke7 18.f6+ Kd8 19.Qxa8+ Kd7 20.Qa7+ Kc8 21.Bb7+ Kc7 22.Bf3+ Kd8 23.Qb6+ Kd7 24.Qc6+ Kd8 25.Nf4 Re8 26.Qb6+ Kd7 27.Bc6+ Kd6 28.Bxe8+ Ke5 29.Qe3+ Be4 30.Nd3+ Ke6 31.Qb6+ Bc6 32.Qxc6+ Kf5 33.Bd7+ Kg6 34.Ne5#
+- (#34) Depth: 43/67
Jouni
LevyRook
Posts: 9
Joined: Sun Apr 14, 2024 7:50 am
Full name: Jim Wood

### Re: Research idea: the longest middlegame attacks

Jouni, I see that Huntsman is a specialized version of Stockfish, optimized for finding checkmates. I appreciate the advice.

That said, why bother if nobody cares about or understands the topic? If people don't care, there's no use in finding such positions in the first place.
LevyRook
Posts: 9
Joined: Sun Apr 14, 2024 7:50 am
Full name: Jim Wood

### Re: Research idea: the longest middlegame attacks

[d]q2q1rN1/nn3p1k/rqpb1n1p/qrp5/qp6/qp1b1P1P/1p1Q1P2/nR2KB1R w - - 5 1

Here's (supposedly) a checkmate in 32. At every half-move White is at least 31 points of material down. The intended solution: 1. Bxd3+ Kxg8 2. Rg1+ Ng4 3. Rxg4+ Qg5 4. Rxg5+ Kh8 5. Rh5 Re8+ 6. Kf1 Re3 7. Qxe3 Qf8 8. Rxh6+ Kg8 9. Bh7+ Kh8 10. Bf5+ Kg8 11. Ke2 Bg3 12. Rg1 Qc7 13. Rh7 Qcd6 14. Qg5+ Qg6 15. Bxg6 Qad8 16. Bxf7+ Kxh7 17. Qf5+ Kh8 18. Qh5+ Kg7 19. Rxg3+ Qg5 20. Rxg5+ Kf6 21. Re5 b1=Q 22. Re6+ Kg7 23. Qh6+ Kxf7 24. Rf6+ Ke7 25. Qxf8+ Kd7 26. Rf7+ Ke6 27. Qe7+ Kd5 28. Qg5+ Kd6 29. Qd2+ Ke6 30. Qd7+ Ke5 31. f4+ Ke4 32. f3#

[pgn][FEN "3q1qk1/nn3B1R/r1p5/1rp3Q1/qp6/qp3PbP/1p2KP2/n5R1 b - - 0 16"]
[Variant "From Position"]
[SetUp "1"]

16... Kxh7 17. Qf5+ Kh8 18. Qh5+ Kg7 19. Rxg3+ Qg5 (19... Kf6?? 20. Qg6+ Ke5 21. Qe6+ Kf4 22. Qe4#) 20. Rxg5+ Kf6 21. Re5!! (21. Rg6+?? Ke7) (21. Qg6+?? Ke7) 21... b1=Q 22. Re6+ Kg7 23. Qh6+ Kxf7 24. Rf6+ Ke7 25. Qxf8+ Kd7 26. Rf7+ Ke6 27. Qe7+ Kd5 28. Qg5+ Kd6 (28... Kc4?? 29. Rf4+ Kc3 30. Qe5+ Kc2 31. Rc4#) 29. Qd2+ Ke6 30. Qd7+ Ke5 31. f4+ Ke4 32. f3# { 1-0 White wins by checkmate. }
[/pgn]
LevyRook
Posts: 9
Joined: Sun Apr 14, 2024 7:50 am
Full name: Jim Wood

### Re: Research idea: the longest middlegame attacks

Can you help me to confirm or deny that in the following position White has a checkmate in 32 moves?

[d]7k/q1PRr1pb/3pN1np/1Pbp1P2/qrp3P1/nPp1BPK1/qbP2NBN/nnBb4 w - - 1 1
[pgn][Variant "From Position"]
[FEN "4r1k1/q7/3p1PpQ/1Pbp2P1/qrp1P3/nPp1B1KB/qb5N/nnB5 w - - 1 11"]

11. Qxg6+ Kf8 12. Qh5 Qf7 13. Qh8+ Qg8 14. g6 Bxe3 15. Qh6+ Bxh6 16. Bxh6+ Qg7 17. Bxg7+ Kg8 18. bxa4 Bc1 19. f7+ Kxg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Ne4 Bxe4 8. fxe4 g6 (8... hxg5 9. fxe6 c2 10. Bf5+ g6 11. e7 Qxe7 12. Qxe7+ Bg7 13. Ng4 Bd4 14. Bxd4 Rxb3+ 15. Ne3 Rxe3+ 16. Bcxe3 Qa7 17. Qxa7 Kh6 18. Qxg7+ Kh5 19. Qxg6#) 9. f6 (9. Qxh6+ Kg8 10. f6 Rxe4) 9... Re8 10. Qxh6+ (10. Qxe8 Qxb5 11. Qf8 Qe8 12. Qxe8 Rb8) 10... Kg8 11. Qxg6+ Kf8 12. Qh5 Qf7 13. Qh8+ Qg8 14. g6 (14. Qh6+ Kf7 15. Bf5 Re7) 14... Bxe3 (14... Qxh8 15. Bh6+ Qg7 16. Bxg7+ Kg8 17. f7+ Kxg7 18. fxe8=Q Bf2+ 19. Kg2 Qa7 20. Bh6+ Kxh6 21. Qf8+ Kxg6 22. Bf5+ Kh5 23. Nf3 c2 24. Qe8+ Qf7 25. Qxf7+ Kh6 26. Qg6#) 15. Qh6+ Bxh6 16. Bxh6+ Qg7 17. Bxg7+ Kg8 18. bxa4 (18. f7+ Kxg7 19. fxe8=Q Qa7 20. b6 Rxb6 21. Bd7 Qxd7 22. Qxd7+ Kxg6) 18... Bc1 19. f7+ Kxg7 20. fxe8=Q Qxh2+ 21. Kxh2 Bf4+ 22. Kg2 dxe4 23. Qf7+ Kh6 24. g7 Rb2+ 25. Kg1 Be3+ 26. Kh1 Rf2 27. g8=N+ Kg5 28. Qg7+ Kf4 29. Qg4+ Ke5 30. Qe6+ Kf4 31. Qf5+ Kg3 32. Qg4#``````
Ajedrecista
Posts: 1993
Joined: Wed Jul 13, 2011 9:04 pm

### Re: Research idea: the longest middlegame attacks.

Hello Jim:
LevyRook wrote: Wed Jun 12, 2024 10:22 am Can you help me to confirm or deny that in the following position White has a checkmate in 32 moves?

[...]
Chest 5.2 in normal mode search found a checkmate in 11 moves after 21.- ..., Bf4+, so there could be a chance:

Code: Select all

``````FEN: 4Q3/6k1/3p2P1/1P1p4/Prp1Pb2/n1p4B/7K/nn6 w - - 1 22

ChestUCI:
FEN: 4Q3/6k1/3p2P1/1P1p4/Prp1Pb2/n1p4B/7K/nn6 w - -   (7+10)
Stellungs-Analyse:  C0/R0/K3/P8/X22   W:1/3
Suche nach Matt in 11 ...  (Hash=64MB)
11	01:46	  35.884.379	696.040	+M11	Kh2g2
Suche abgeschlossen ...  (Zeit=129.08s)
Matt in 11 gefunden !  (1 Lösung in 02:09)
11/11	02:13	  89.241.521	691.376	+M11	Kh2g2 d5xe4 Qe8f7+ Kg7h6 g6g7 Rb4b2+ Kg2g1 Bf4e3+ Kg1h1 Rb2f2 g7g8N+ Kh6g5 Qf7g7+ Kg5f4 Qg7g4+ Kf4e5 Qg4e6+ Ke5f4 Qe6f5+ Kf4g3 Qf5g4+``````
------------

The same with a checkmate in 12 moves after 20.- ..., Qxh2+:

Code: Select all

``````FEN: 4Q3/6k1/3p2P1/1P1p4/Prp1P3/n1p3KB/7q/nnb5 w - - 0 21

ChestUCI:
FEN: 4Q3/6k1/3p2P1/1P1p4/Prp1P3/n1p3KB/7q/nnb5 w - -   (7+11)
Stellungs-Analyse:  C0/R0/K3/P9/X31   W:1/4
Suche nach Matt in 12 ...  (Hash=512MB)
12	01:51	  37.184.052	696.108	+M12	Kg3xh2
Suche abgeschlossen ...  (Zeit=110.99s)
Matt in 12 gefunden !  (1 Lösung in 01:50)
12/12	01:51	  75.727.511	682.291	+M12	Kg3xh2 Bc1f4+ Kh2g2 d5xe4 Qe8f7+ Kg7h6 g6g7 Rb4b2+ Kg2g1 Bf4e3+ Kg1h1 Rb2f2 g7g8N+ Kh6g5 Qf7g7+ Kg5f4 Qg7g4+ Kf4e5 Qg4e6+ Ke5f4 Qe6f5+ Kf4g3 Qf5g4+``````
------------

The same with a checkmate in 13 moves after 19.- ..., Kxg7:

Code: Select all

``````FEN: 4r3/5Pk1/3p2P1/1P1p4/Prp1P3/n1p3KB/q6N/nnb5 w - - 0 20

ChestUCI:
FEN: 4r3/5Pk1/3p2P1/1P1p4/Prp1P3/n1p3KB/q6N/nnb5 w - -   (8+12)
Stellungs-Analyse:  C0/R0/K6/P10/X42   W:7/25
Suche nach Matt in 13 ...  (Hash=512MB)
13	07:11	 186.561.707	511.649	+M13	f7xe8Q
Suche abgeschlossen ...  (Zeit=605.14s)
Matt in 13 gefunden !  (1 Lösung in 10:05)
13/13	10:08	 321.341.769	531.022	+M13	f7xe8Q Qa2xh2+ Kg3xh2 Bc1f4+ Kh2g2 d5xe4 Qe8f7+ Kg7h6 g6g7 Rb4b2+ Kg2g1 Bf4e3+ Kg1h1 Rb2f2 g7g8N+ Kh6g5 Qf7g7+ Kg5f4 Qg7g4+ Kf4e5 Qg4e6+ Ke5f4 Qe6f5+ Kf4g3 Qf5g4+``````
Going move by move until the start is unfeasible for me, though. Chest 5.2 even refuses to analyze the start position with 35 pieces.

------------------------

Huntsman found the checkmate in 13 moves in 17 seconds. It also found a checkmate in 16 moves after 16.- ..., Qg7:

Code: Select all

``````FEN: 4rk2/6q1/3p1PPB/1P1p4/qrp1P3/nPp3KB/qb5N/nn6 w - - 1 17

Huntsman:
Found 145 tablebases
classical evaluation enabled
[...]
40/32	00:16	  50.992.360	3.053.983	+M16	Bh6xg7+ Kf8g8 b3xa4 Bb2c1 f6f7+ Kg8xg7 f7xe8Q Qa2xh2+ Kg3xh2 Bc1f4+ Kh2g2 Bf4e5 Qe8f7+ Kg7h6 g6g7 Rb4b2+ Kg2f3 Be5xg7 Bh3f5 d5xe4+ Bf5xe4 Rb2f2+ Kf3xf2 Kh6g5 Qf7f5+ Kg5h4 Be4f3 Bg7d4+ Kf2g2 Nb1d2 Qf5g4+``````
------------

The same with a checkmate in 18 moves after 14.- ..., Bxe3:

Code: Select all

``````FEN: 4rkqQ/8/3p1PP1/1P1p4/qrp1P3/nPp1b1KB/qb5N/nnB5 w - - 0 15

Huntsman:
Found 145 tablebases
classical evaluation enabled
[...]
41/38	00:18	  56.929.159	3.022.680	+M18	Qh8h6+ Be3xh6 Bc1xh6+ Qg8g7 Bh6xg7+ Kf8g8 b3xa4 Bb2c1 f6f7+ Kg8xg7 f7xe8Q Qa2xh2+ Kg3xh2 Bc1f4+ Kh2g2 Kg7h6 Qe8f8+ Kh6h5 g6g7 Rb4b2+ Kg2g1 Bf4e3+ Kg1h1 Nb1d2 Qf8f5+ Be3g5 g7g8Q Rb2b1+ Kh1g2 Rb1g1+ Kg2xg1 Nd2f3+ Kg1f2 Kh5h4 Qf5g4+``````
------------

The same with a checkmate in 20 moves after 12.- ..., Qf7, taking much more time:

Code: Select all

``````FEN: 4rk2/5q2/3p1P2/1Pbp2PQ/qrp1P3/nPp1B1KB/qb5N/nnB5 w - - 3 13

Huntsman:
Found 145 tablebases
classical evaluation enabled
[...]
24/42+	08:22	1.209.411.138	2.409.689	+8,03	g5g6
24/42+	08:22	1.211.184.000	2.410.292	+M21	Qh5h8+
24/42	08:22	1.211.184.817	2.410.294	+M21	Qh5h8+ Qf7g8 g5g6 Bc5xe3 Qh8h6+ Be3xh6 Bc1xh6+ Qg8g7 Bh6xg7+ Kf8g8 b3xa4 Bb2c1 f6f7+ Kg8xg7 f7xe8Q Qa2xh2+ Kg3xh2 Bc1f4+ Kh2g2 Rb4b2+ Kg2f3
[...]
51/42	14:09	2.167.086.836	2.550.101	+M21	Qh5h8+ Qf7g8 g5g6 Bc5xe3 Qh8h6+ Be3xh6 Bc1xh6+ Qg8g7 Bh6xg7+ Kf8g8 b3xa4 Bb2c1 f6f7+ Kg8xg7 f7xe8Q Qa2xh2+ Kg3xh2 Bc1f4+ Kh2g2 Rb4b2+ Kg2f3 Kg7h6 Qe8f8+ Kh6g5 Qf8xf4+ Kg5h5 Bh3g4+ Kh5xg6 Qf4xd6+ Kg6f7 Qd6d7+ Kf7f8 Bg4e6 d5xe4+ Kf3g3 Rb2f2 Kg3xf2 e4e3+ Kf2g3 c3c2 Qd7f7+
52/78	17:02	2.623.608.108	2.566.296	+M20	Qh5h8+ Qf7g8 g5g6 Bc5xe3 Qh8h6+ Be3xh6 Bc1xh6+ Qg8g7 Bh6xg7+ Kf8g8 b3xa4 Bb2c1 f6f7+ Kg8xg7 f7xe8Q Qa2xh2+ Kg3xh2 Bc1f4+ Kh2g2 Rb4b2+ Kg2f3 Kg7h6 Qe8f8+ Kh6g5 Qf8e7+ Kg5h5 Bh3g4+ Kh5h6 g6g7 d5xe4+ Kf3xe4 Nb1d2+ Ke4xf4 Nd2e4 g7g8N+ Kh6g6 Bg4f5+ Kg6h5 Qe7h7+``````
Regards from Spain.

Ajedrecista.
LevyRook
Posts: 9
Joined: Sun Apr 14, 2024 7:50 am
Full name: Jim Wood

### Re: Research idea: the longest middlegame attacks.

Hello, Ajedrecista. Thank you very much!

So, I see that the last 20 moves are verified. In addition to that, Lichess' Stockfish doesn't notice a shorter win earlier (with 70MB it doesn't refuse to analyze the starting position).
LevyRook
Posts: 9
Joined: Sun Apr 14, 2024 7:50 am
Full name: Jim Wood

### Re: Research idea: the longest middlegame attacks

[d]Nr3n2/n5Nk/r1p2Q2/r1pp4/BP1P4/rrN1P3/Bbr2PP1/qb3bK1 w - - 1 9

Could someone help me to evaluate this position and find the most resilient defense for Black?

My own conclusions are that Black A) loses material advantage before the 30th move or B) loses material advantage at the 37th move and gets checkmated at the 40th move.

[pgn][FEN "Nr3n2/n5Nk/r1p2Q2/r1pp4/BP1P4/rrN1P3/Bbr2PP1/qb3bK1 w - - 1 9"]
9. Qf7 Rb7 10. Qxb7 Rb6 11. Nxb6 Ba6 12. Qe7 Kg6 (12... Rc1+ 13. Kh2 Ng6 14. Qc7 Rh1+ 15. Kxh1 Nc8 16. Nxc8 Bf5+ 17. Bb1 Bd7 18. Qxd7 Bxc8 19. Qf7 Qxb1+ 20. Nxb1 Kh6 21. Ne8 Bxd4 22. Nxa3 Rxa4 23. exd4 Rbxa3 24. Qg7+ Kh5 25. Nf6+ Kg5 26. Nh7+ Kf5 27. Qf6+ Ke4 28. Ng5+ Kd3 29. Qxg6+) 13. Ne8 Bxa2+ 14. Kh2 Rxf2 15. Qg7+ Kh5 16. Nbxd5 Qf1 17. Nef6+ Rxf6 18. Nxf6+ Qxf6 19. g4+ Kh4 20. Qxf6+ Kxg4 21. Qg7+ Kf5 22. e4+ Ke6 23. d5+ cxd5 24. exd5+ Kd6 25. Qxf8+ Ke5 26. Qg7+ Kd6 27. Qf6+ Kc7 28. d6+ Kb7 29. Qf3+ Kb8 30. d7 Rxb4 31. Qg3+ Ka8 32. d8=Q+ Nc8 33. Bc6+ Ka7 34. Qgc7+ Bb7 35. Qdxc8 Rh4+ 36. Kg1 Rg4+ 37. Qxg4 Rb5 38. Qgc8 Rxc3 39. Qa5+ Rxa5 40. Qxb7#[/pgn]