Mate in 21

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

Moderator: Ras

acase
Posts: 994
Joined: Wed Mar 15, 2006 1:14 am
Location: Columbus, Ohio USA
Full name: Andrew R Case

Mate in 21

Post by acase »

This one seems to give engines trouble, this time I did try The Huntsman 1 :P

[pgn][Event "?"] [Site "?"] [Date "????.??.??"] [Round "?"] [White "?"] [Black "?"] [Result "1-0"] [TimeControl "0"] [SetUp "1"] [FEN "5bb1/1p2prrn/3pNp2/5Np1/1p5p/6Pk/4B2P/4K3 w - - 0 1"] [Termination "normal"] [PlyCount "41"] [WhiteType "human"] [BlackType "human"] 1. Kf2 (1. Kf2 b3 2. Bf1+ Kg4 3. Ne3+ Kh5 4. g4+ Kg6 5. Nf5 b2 6. Bd3 b1=Q 7. Bxb1 b5 8. Ke3 b4 9. Kd4 b3 10. Kd5 b2 11. Kc6 d5 12. Kd7 d4 13. Ke8 d3 14. Bxd3 b1=Q 15. Bxb1 h3 16. Nxe7+ Kh6 17. Nf5+ Kg6 18. Ned4 Re7+ 19. Nxe7+ Kh6 20. Ndf5#) 1. .. b3 2. Bf1+ Kg4 3. Ne3+ Kh5 4. g4+ Kh6 5. Nf5+ Kg6 6. Bb5 d5 7. Ke3 b2 8. Bd3 b5 9. Kd4 b4 10. Kc5 d4 11. Kc6 b1=Q 12. Bxb1 d3 13. Bxd3 b3 14. Kd7 b2 15. Ke8 b1=R 16. Bxb1 h3 17. Nxe7+ Kh6 18. Nf5+ Kg6 19. Ned4 Re7+ 20. Nxe7+ Kh6 21. Ndf5# 1-0 [/pgn]
peter
Posts: 3410
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Mate in 21

Post by peter »

acase wrote: Wed Jan 31, 2024 4:55 am This one seems to give engines trouble, this time I did try The Huntsman 1 :P

[pgn][Event "?"] [Site "?"] [Date "????.??.??"] [Round "?"] [White "?"] [Black "?"] [Result "1-0"] [TimeControl "0"] [SetUp "1"] [FEN "5bb1/1p2prrn/3pNp2/5Np1/1p5p/6Pk/4B2P/4K3 w - - 0 1"] [Termination "normal"] [PlyCount "41"] [WhiteType "human"] [BlackType "human"] 1. Kf2 (1. Kf2 b3 2. Bf1+ Kg4 3. Ne3+ Kh5 4. g4+ Kg6 5. Nf5 b2 6. Bd3 b1=Q 7. Bxb1 b5 8. Ke3 b4 9. Kd4 b3 10. Kd5 b2 11. Kc6 d5 12. Kd7 d4 13. Ke8 d3 14. Bxd3 b1=Q 15. Bxb1 h3 16. Nxe7+ Kh6 17. Nf5+ Kg6 18. Ned4 Re7+ 19. Nxe7+ Kh6 20. Ndf5#) 1. .. b3 2. Bf1+ Kg4 3. Ne3+ Kh5 4. g4+ Kh6 5. Nf5+ Kg6 6. Bb5 d5 7. Ke3 b2 8. Bd3 b5 9. Kd4 b4 10. Kc5 d4 11. Kc6 b1=Q 12. Bxb1 d3 13. Bxd3 b3 14. Kd7 b2 15. Ke8 b1=R 16. Bxb1 h3 17. Nxe7+ Kh6 18. Nf5+ Kg6 19. Ned4 Re7+ 20. Nxe7+ Kh6 21. Ndf5# 1-0 [/pgn]
Yet rather 20 (or less) but 21, instead of 6.Bb5 (in mainline, in given alternative one with deviation of Black's 5th, there is 6.Bd3 too), replaced by 6.Bd3:
[d]5bb1/1p2prrn/3pNpk1/5Np1/6Pp/1p1B4/5K1P/8 b - - 0 1 Analysis by The Huntsman 1:

6...b2 7.Ke3 h3 8.Kd4 b6 9.Le4 b5 10.Kd5 b4 11.Lb1 b3 12.Kc6 d5 13.Kc7 d4 14.Kd7 d3 15.Ke8 d2 16.Sxe7+ Kh6 17.Sf5+ Kg6 18.Sed4 Te7+ 19.Sxe7+ Kh6 20.Sdf5#
Tiefe: 97/29 00:02:38 5856MN

After full Backward:

5bb1/1p2prrn/3pNp2/5Np1/1p5p/6Pk/4B2P/4K3 w - - 0 1

Analysis by The Huntsman 1:

1.Kf2 b3 2.Lf1+ Kg4 3.Se3+ Kh5 4.g4+ Kg6 5.Sf5 d5 6.Ke3 b2 7.Ld3 b5 8.Kd4 b1D 9.Lxb1 b4 10.Kc5 d4 11.Kc6 d3 12.Lxd3 b3 13.Kd7 b2 14.Ke8 b1D 15.Lxb1 h3 16.Sxe7+ Kh6 17.Sf5+ Kg6 18.Sed4 Ta7 19.Se7+ Kh6 20.Sdf5#
Tiefe: 97/40 00:01:52 4081MN
Peter.
User avatar
Ajedrecista
Posts: 2126
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Mate in 21?

Post by Ajedrecista »

Hello Andrew and Peter:

I did not find the source of the problem.

In the proposed #20 line, the position after 13.- ..., d3 is #6 (#19 in total) with 14.- h3 instead of 14.- Bxd3, which is #7 (#20 in total):

Code: Select all

FEN: 4Kbb1/4prrn/4Npk1/5Np1/6Pp/3p4/1p5P/1B6 w - - 0 14

ChestUCI:
FEN: 4Kbb1/4prrn/4Npk1/5Np1/6Pp/3p4/1p5P/1B6 w - -   (6+12)
Stellungs-Analyse:  C0/R0/K1/P2/X2   W:5/22
Suche nach Matt in 10 ...  (Hash=64MB)
   6	00:00	           0	0	+M6	h2h3
Suche abgeschlossen ...  (Zeit=0.18s)
Matt in 6 gefunden !  (1 Lösung in 00:00)
  6/6	00:00	     107.076	604.949	+M6	h2h3 d3d2 Nf5xe7+ Kg6h6 Ne7f5+ Kh6g6 Ne6d4 Rf7e7+ Nf5xe7+ Kg6h6 Nd4f5+
[pgn][Event "?"] [Site "?"] [Date "????.??.??"] [Round "?"] [White "?"] [Black "?"] [Result "1-0"] [TimeControl "0"] [SetUp "1"] [FEN "5bb1/1p2prrn/3pNp2/5Np1/1p5p/6Pk/4B2P/4K3 w - - 0 1"] [Termination "normal"] [PlyCount "41"] [WhiteType "human"] [BlackType "human"] 1. Kf2 (1. Kf2 b3 2. Bf1+ Kg4 3. Ne3+ Kh5 4. g4+ Kg6 5. Nf5 b2 6. Bd3 b1=Q 7. Bxb1 b5 8. Ke3 b4 9. Kd4 b3 10. Kd5 b2 11. Kc6 d5 12. Kd7 d4 13. Ke8 d3 14. Bxd3 (14. h3 d2 15. Nxe7+ Kh6 16. Nf5+ Kg6 17. Ned4 Re7+ 18. Nxe7+ Kh6 19. Ndf5#) b1=Q 15. Bxb1 h3 16. Nxe7+ Kh6 17. Nf5+ Kg6 18. Ned4 Re7+ 19. Nxe7+ Kh6 20. Ndf5#) 1. .. b3 2. Bf1+ Kg4 3. Ne3+ Kh5 4. g4+ Kh6 5. Nf5+ Kg6 6. Bb5 d5 7. Ke3 b2 8. Bd3 b5 9. Kd4 b4 10. Kc5 d4 11. Kc6 b1=Q 12. Bxb1 d3 13. Bxd3 b3 14. Kd7 b2 15. Ke8 b1=R 16. Bxb1 h3 17. Nxe7+ Kh6 18. Nf5+ Kg6 19. Ned4 Re7+ 20. Nxe7+ Kh6 21. Ndf5# 1-0[/pgn]

Keeping the bishop on b1 does not allow a promotion and capture on b1, saving one move.

Regards from Spain.

Ajedrecista.
peter
Posts: 3410
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Mate in 21?

Post by peter »

Ajedrecista wrote: Wed Jan 31, 2024 6:22 pm Hello Andrew and Peter:

I did not find the source of the problem.

In the proposed #20 line, the position after 13.- ..., d3 is #6 (#19 in total) with 14.- h3 instead of 14.- Bxd3, which is #7 (#20 in total):
peter wrote: Wed Jan 31, 2024 9:09 am Yet rather 20 (or less)
Probably less.
Gustav 4.2 after [d]5bb1/1p2prrn/3pNp2/5Np1/1p5p/6Pk/4B2P/4K3 w - - 0 1 1. Kf2 b3 2. Bf1+ Kg4 3. Ne3+ Kh5 4. g4+ Kh6 5. Nf5+ Kg6: [d]5bb1/1p2prrn/3pNpk1/5Np1/6Pp/1p6/5K1P/5B2 w - - 0 1 1.Lf1-d3 Bb3-b2 2.Kf2-e3 b2-b1D 3.Ld3-b1 Bh4-h3 4.Ke3-d4 Bb7-b5 5.Kd4-d5 Bb5-b4 6.Kd5-c6 Bd6-d5 7.Kc6-d7 Bd5-d4 8.Lb1-d3 Bb4-b3 9.Kd7-e8 Bb3-b2 10.Sf5-e7 Kg6-h6
after about 5 hours with given parameter of 2 flights.
With 4 more moves to mate, that's what the whole line from very starting position would look like:

[pgn][Event "Talkchess"] [Site "?"] [Date "?"] [Round "?"] [White "Acase"] [Black "Huntsman"] [Result "1-0"] [SetUp "1"] [FEN "5bb1/1p2prrn/3pNp2/5Np1/1p5p/6Pk/4B2P/4K3 w - - 0 1"] [PlyCount "x"] [EventDate "??.??.??"] 1. Kf2 b3 2. Bf1+ Kg4 3. Ne3+ Kh5 4. g4+ Kh6 5. Nf5+ Kg6 6. Bd3 b2 7. Ke3 b1=Q 8. Bxb1 h3 9. Kd4 b5 10. Kd5 b4 11. Kc6 d5 12. Kd7 d4 13. Bd3 b3 14. Ke8 b2 15. Nxe7+ Kh6 16. Nf5+ Kg6 17. Nexd4 b1=Q 18. Nh4+ Kh6 19. Ndf5# 1-0 [/pgn]
6. (Gustav's 1.) Ke3 gives same DTM, regards
Peter.
peter
Posts: 3410
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Mate in 21?

Post by peter »

peter wrote: Wed Jan 31, 2024 6:36 pm Yet rather 20 (or less)
Probably less.
On the other hand, in the #19- line 4...Kh6 could be suboptimal for Black, giving White the chance to win a tempo with 5.Nf5+, after 4...Kg6 instead, the Night- move doesn't give check anymore. At least neither Gustav nor Huntsman found #14 anymore after 4...Kg6 5.Nf5 b5 so far. Maybe that way #20 all in all is best yet, regards
Peter.
fishpov
Posts: 113
Joined: Sat Mar 07, 2015 6:05 pm

Re: Mate in 21

Post by fishpov »

Hi Peter,

5bb1/1p2prrn/3pNp2/5Np1/1p5p/6Pk/4B2P/4K3 w - - 0 1

Analysis by The Huntsman 1:

1.Kf2 b3 2.Lf1+ Kg4 3.Se3+ Kh5 4.g4+ Kg6 5.Sf5 d5 6.Ke3 b2 7.Ld3 b5 8.Kd4 b1D 9.Lxb1 b4 10.Kc5 d4 11.Kc6 d3 12.Lxd3 b3 13.Kd7 b2 14.Ke8 b1D 15.Lxb1 h3 16.Sxe7+ Kh6 17.Sf5+ Kg6 18.Sed4 Ta7 19.Se7+ Kh6 20.Sdf5#
Tiefe: 97/40 00:01:52 4081MN

I have a core i5 9700K (4,8Ghz) with 6 threads I'm amazed by your response time about the huntsman in your computer.
Tiefe: 97/40 00:01:52 4081MN

I let the huntsman about 6 hours with 10Go Hash and nothing after 6 hours.
Do you obtain this time, because backward ?

I am not sure without backward an engine is able to find in reasonable time.
Or do you change some default parameters for this engine ?

Thanks.
Nicolas
peter
Posts: 3410
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Mate in 21

Post by peter »

fishpov wrote: Mon Feb 05, 2024 1:12 am Do you obtain this time, because backward ?
Yes, Nicolas, of course.
Sorry for not writing it each time explicitly if (like in this case) it's to be seen quite obviously anyhow, regards
Peter.
User avatar
Eelco de Groot
Posts: 4671
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Mate in 21

Post by Eelco de Groot »

With Crystal 6 PMT 512 Mb hash 1 thread, there was nothing to see at depth 82 after more than 500 minutes (I stopped it), so you'd have to give it the pgn from Andrew and work backwards, then it sees it quite quickly because then it is not so deep a variation.
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
fishpov
Posts: 113
Joined: Sat Mar 07, 2015 6:05 pm

Re: Mate in 21

Post by fishpov »

So it will be interesting to see which engine will be able to find this problem in less than 12 hours
Perhaps Gustav or ChestUCI with good parameters ?
One of the rare problems which still resists to the top engine.
I would like to have now a list of positions which are not found by any engine in less than 12h ?
Thanks Peter
acase
Posts: 994
Joined: Wed Mar 15, 2006 1:14 am
Location: Columbus, Ohio USA
Full name: Andrew R Case

Re: Mate in 21

Post by acase »

fishpov wrote: Tue Feb 06, 2024 12:27 am So it will be interesting to see which engine will be able to find this problem in less than 12 hours
Perhaps Gustav or ChestUCI with good parameters ?
One of the rare problems which still resists to the top engine.
I would like to have now a list of positions which are not found by any engine in less than 12h ?
Thanks Peter
Here is one that is very difficult, it's by Otto Blathy and it's supposed to be a mate in 30 (one of his shortest mate problems :wink: ), however there is a shorter mate in 25 here that wasn't intended by the composer. I'll post the original pgn (the mate in 30) with the solution, and then I'll post a pgn with the shorter mate in 25 that is an improvement on the intended solution:

Here is the intended mate in 30:
[pgn][Date "1890"] [White "Otto "] [Black ""] [Result "1-0"] [SetUp "1"] [FEN "4bnrq/3pP1pk/3Pp1n1/4p3/6N1/p1pB1P2/PbPpPP2/3N3K w - - 0 1"] [PlyCount "59"] [EventDate "1890"] 1. Be4 Ba1 2. e3 Bb2 3. Kg2 Ba1 4. Kf1 Bb2 5. Ke2 Ba1 6. Kd3 Bb2 7. Kc4 Ba1 8. Kb5 Bb2 9. Kb6 Ba1 10. Kc7 Bb2 11. Kd8 Bf7 12. e8=Q Bxe8 13. Kxe8 Ba1 14. Kd8 Bb2 15. Kc7 Ba1 16. Kb6 Bb2 17. Kb5 Ba1 18. Kc4 Bb2 19. Kd3 Ba1 20. Ke2 Bb2 21. Kf1 Ba1 22. Kg2 Bb2 23. Kh3 Ba1 24. f4 exf4 25. Ne5 fxe3 26. fxe3 Kh6 27. Nf7+ Kh7 28. Kg4 e5 29. Kh5 Bb2 30. Ng5# 1-0 [/pgn]


And here is the improvement that I found:

[pgn][Event "Blathy mate in 25"] [Site "Columbus, Ohio"] [Date "2024.02.05"] [Round "?"] [White "?"] [Black "?"] [Result "1-0"] [Time "20:48:12"] [TimeControl "0"] [SetUp "1"] [FEN "4bnrq/3pP1pk/3Pp1n1/4p3/6N1/p1pB1P2/PbPpPP2/3N3K w - - 0 1"] [Termination "normal"] [PlyCount "49"] [WhiteType "human"] [BlackType "human"] 1. Be4 Ba1 2. Kg1 Bf7 3. Kf1 Bb2 4. e3 Be8 5. Ke2 Ba1 6. Kd3 Bb2 7. Kc4 Bf7 8. Kc5 Be8 9. Kb6 Bf7 10. Kc7 Be8 11. Kd8 Bf7 12. e8=Q Bxe8 13. Kxe8 Bc1 14. Kf7 Bb2 15. f4 exf4 16. exf4 Bc1 17. f3 Bb2 18. Ndf2 d1=Q 19. Nxd1 Bc1 20. Ndf2 Bxf4 21. Nh3 Bd2 22. f4 Bxf4 23. Nxf4 e5 24. Nxg6 Ne6 25. Nf8# 1-0 [/pgn]

Both are very difficult for engines, and I have never found any engine that can get the mate in 25, but of course I don't have every engine so I can't say for sure if no engine can solve this. I should note that it is an illegal position like most of Blathy's works, but I still like it, and it has the "Royal March" theme like the mate in 20 (as Peter has proven that it isn't a mate in 21) I originally posted.