SamuraiDangyo / mayhem

Linux UCI Chess960 engine
GNU General Public License v3.0
6 stars 1 forks source link

Mayhem v3.9 does not see obvious threat #3

Open tissatussa opened 3 years ago

tissatussa commented 3 years ago

Mayhem v3.9 makes a wrong decision in this position :

Screenshot_2021-04-15_02-40-00

Black to move. The threat Rf1-f3-h3 and mate on the h-file is a serious danger, but Mayhem v3.9 plays Nxc2 and is lost immediately ! All other engines, which i used to test this position, perform better .. they seem to see that threat.

[Event "engine vs engine"]
[Site "?"]
[Date "2021.04.15"]
[White "DON 210414 without NNUE"]
[Black "Mayhem v3.9"]
[Result "1-0"]
[FEN "r1bq1rk1/pp1nbpp1/4p3/1N1pP1PQ/1n3P2/1N2B3/PPP4P/R3K2R w KQ - 0 16"]
[GameDuration "00:22:42"]
[PlyCount "71"]
[SetUp "1"]
[TimeControl "900+5"]

 1. O-O   {+0.85/30 118s}  g6   {+0.66/15 40s}
 2. Qh4   {+0.49/79 20s}   Nxc2 {+1.51/13 38s}
 3. Rf3   {+3.86/30 13s}   Bxg5 {-0.44/15 37s}
 4. fxg5  {+4.20/29 16s}   Nxe5 {-1.03/15 36s}
 5. Rh3   {+4.17/30 15s}   Nf3+ {-1.19/16 35s}
 6. Rxf3  {+4.17/30 26s}   e5   {-1.37/17 34s}
 7. Rc1   {+4.24/30 17s}   Nxe3 {-1.29/17 32s}
 8. Rxe3  {+4.09/29 16s}   Qb6  {-1.45/17 31s}
 9. Rc5   {+4.29/31 16s}   Bf5  {-1.13/16 30s}
10. Nc3   {+4.13/31 16s}   Rad8 {-1.76/17 29s}
11. Rxe5  {+4.15/32 19s}   Be4  {-1.61/16 28s}
12. Re7   {+4.43/31 22s}   Rfe8 {-1.47/17 28s}
13. Nxe4  {+4.42/29 14s}   dxe4 {-0.86/16 27s}
14. Qxe4  {+4.57/28 15s}   Kf8  {-1.32/17 26s}
15. Qe5   {+6.32/28 16s}   Rd1+ {-2.46/16 25s}
16. Kf2   {+6.99/29 20s}   Red8 {-2.55/16 24s}
17. Rxb7  {+7.17/28 14s}   Qxb7 {-4.96/16 24s}
18. Qh8+  {+7.33/26 14s}   Ke7  {-4.96/1 0s}
19. Re5+  {+7.72/27 39s}   Kd7  {-5.41/18 23s}
20. Nc5+  {+8.13/22 13s}   Kc8  {-5.92/17 22s}
21. Qh3+  {+9.08/21 20s}   R8d7 {-5.92/15 22s}
22. Nxb7  {+11.71/25 17s}  Rd2+ {-7.27/15 21s}
23. Kf1   {+13.53/24 13s}  Rd3  {-6.39/15 20s}
24. Rc5+  {+M31/41 14s}    Kxb7 {-7.42/17 20s}
25. Qg2+  {+M25/244 9.9s}  Kb8  {-12.08/20 19s}
26. Rb5+  {+M23/244 10s}   Kc7  {-13.11/21 19s}
27. Qc2+  {+M21/244 12s}   Kd8  {-17.32/22 18s}
28. Rb8+  {+M19/244 9.9s}  Ke7  {-17.32/1 0s}
29. Qe2+  {+M17/244 11s}   Kd6  {-17.32/20 18s}
30. Qxd3+ {+M15/244 10s}   Kc7  {-104.85/18 16s}
31. Qb5   {+M13/244 11s}   Kd6  {-104.85/16 5.4s}
32. b4    {+M9/244 8.2s}   Ke6  {-104.85/13 0.68s}
33. Re8+  {+M7/244 5.6s}   Re7  {-104.85/11 0.11s}
34. Rd8   {+M5/244 0.042s} Rd7  {-104.85/6 0.016s}
35. Rxd7  {+M3/244 0.016s} f6   {-104.85/4 0s}
36. Qd5#  {+M1/244 0.011s, White mates} 1-0
SamuraiDangyo commented 3 years ago

Thanks for the feedback!

I tried this position. And yes, Mayhem can't see a way out. I tried enabling full check extension, it didn't help. Interesting position.

Altho Mayhem 4.1 score is dropping from +1.5 -> -0.2.

But I think the position is lost for black. But Re8 might hang on longer.

tissatussa commented 3 years ago

Mayhem can't see a way out. I tried enabling full check extension, it didn't help. Interesting position.

yes, this position is derived from a recent TCEC engine-vs-engine game, which i found in a GitHub issue of the engine RubiChess at https://github.com/Matthies/RubiChess/issues/278 :

[Event "TCEC Season 20 - Swiss 1"]
[Site "https://tcec-chess.com"]
[Date "2021.03.21"]
[Round "1.35"]
[White "Pedone 3.0"]
[Black "RubiChess 2.0.1"]
[Result "1-0"]
[Annotator "archive"]

1. e4 c5 2. Nf3 Nc6 3. d4 cxd4 4. Nxd4 Qb6 5. Nb3 Nf6 6. Nc3 e6 7. Bd3 Be7 8. Be3 Qc7 9. f4 O-O 10. g4 d5 11. e5 Nd7 12. Nb5 Qd8 13. g5 Nb4 14. Bxh7+ Kxh7 15. Qh5+ Kg8 16. O-O Re8 17. Rf3 g6 18. Qh4 Bf8 19. Rh3 Bg7 20. Qh7+ Kf8 21. N3d4 Nc6 22. Nd6 Qe7 23. Qh8+ Bxh8 24. Rxh8+ Kg7 25. Rxe8 Nb6 26. Rxe7 Nxe7 27. b3 Bd7 28. Nxb7 Rb8 29. Nd6 Kg8 30. Nf3 Kg7 31. h4 Nbc8 32. Kf2 a5 33. Bc5 Nc6 34. a3 N8e7 35. Rh1 Ra8 36. Nh2 Nf5 37. Ng4 Nce7 38. Nf6 Bc6 39. h5 gxh5 40. Rxh5 Kg6 41. Rh7 Nxd6 42. exd6 Nf5 43. Rh3 Rd8 44. d7 a4 45. Bb6 Rxd7 46. Nxd7 Bxd7 47. Bc7 d4 48. b4 Bb5 49. Be5 Bd7 50. Rh8 Bc6 51. Rg8+ Kh5 52. Rd8 Kg4 53. Rf8 Kh5 54. Rxf7 Be8 55. Rf8 Bc6 56. Rc8 Be4 57. b5 Kg6 58. b6 Nh4 59. Rc7 Nf5 60. b7 Bxb7 61. Rxb7 Kh5 62. Rf7 Kg6 63. Rf6+ Kh7 64. g6+ Kg7 65. Rxf5+ Kxg6 66. Rf8 d3 67. cxd3 Kh7 68. Kf3 Kh6 69. f5 exf5 70. Kf4 Kg6 71. Bb2 Kh5 72. Rf6 Kh4 73. Rh6# 1-0

[ replay this game at https://lichess.org/ImBFntVY ]

it's all about the position after 13...Nb4 :

GreekGift_canoccur

r1bq1rk1/pp1nbppp/4p3/1N1pP1P1/1n3P2/1N1BB3/PPP4P/R2QK2R w KQ - 0 14

White to move. Most engines, including the strongest ones like SF, Komodo and Ethereal, do NOT consider / find the best (!?) move 14.Bxh7+ ! which is called a "Greek Gift", a Trojan Horse .. Black should take the Bishop because Kh8 (the only alternative) leads to mate #8 or so .. Pedone v3.0 almost immediately finds Bxh7+ being "best move" and it's the ONLY engine i have (and i have many) which does that .. i let Pedone play against many engines from this position and it seems the sacrifice is winning, but only with precise play, because it's not easy .. NOTE: only SF Crystal v3.1 NNUE manages to find Bxh7+ best move at depth 22 or so (and higher), but only with many MPV, otherwise this move would NEVER be considered - all other engines "fail" ..

Besides Pedone v3.0 (see https://sites.google.com/site/pedonechess/ ) many other (strong) engines can find a good continuation to win the game after the sacrifice : i did several tests in the position i first showed you, which is a variation of the fixed continuation i gave them : Bxh7+ Kxh7 Qh5+ Kg8 and now many engines try to defend with Black by g6, were White will often respond with Qh4 to keep the attack on the h-line .. White has to find O-O and the idea Rf1-f3-h3 to threaten mate, which is only defendable by doing Re8 and Be7-f8-g7 ..

But I think the position is lost for black. But Re8 might hang on longer.

yes, but White has to play precisely, otherwise Black can manage to make a draw .. this is a position which needs long term planning : the advantage of the sacrifice only becomes clear after many moves, which seems "beyond the horizon" of most engines .. but if they keep playing good moves, the advantage will reveal itself later ..

here's a game between DON () with Black and Pedone v3.0 with White .. DON does not play the move g6, but tries to defend another way .. ) a new, very strong engine, which is not yet listed at CCRL, but i guess its rating is about 3300 (!), see https://github.com/ehsanrashid/DON

[Event "engine vs engine"]
[Site " https://lichess.org/jIIQVt90 "]
[Date "2021.04.14"]
[White "Pedone v3.0 NN"]
[Black "DON nnue 210409c"]
[Result "1-0"]
[GameDuration "00:36:11"]
[PlyCount "103"]
[SetUp "1"]
[TimeControl "900+5"]
[FEN "r1bq1rk1/pp1nbppp/4p3/1N1pP1P1/1n3P2/1N1BB3/PPP4P/R2QK2R w KQ - 0 14"]

14. Bxh7+ Kxh7 15. Qh5+ Kg8 16. O-O Bxg5 17. fxg5 Nxe5 18. Bc5 Na6 19. Bd4 Ng6 20. Bxg7 Kxg7 21. Qh6+ Kg8 22. Rf6 Nc7 23. Raf1 Nxb5 24. h4 Qd6 25. Kh1 Qb4 26. c4 Bd7 27. h5 Ne5 28. g6 fxg6 29. hxg6 Rxf6 30. Qh7+ Kf8 31. Rxf6+ Ke8 32. g7 Qe1+ 33. Kg2 Kd8 34. g8=Q+ Kc7 35. Qxa8 dxc4 36. Nc5 Qd2+ 37. Rf2 Qd5+ 38. Qe4 Qxe4+ 39. Nxe4 Bc6 40. Rf4 Nd6 41. Qh8 Nd7 42. Qd4 Nxe4 43. Rxe4 a6 44. Kg3 Bxe4 45. Qxe4 b5 46. Qxe6 Nc5 47. Qd5 Nd7 48. a4 b4 49. Qxc4+ Kb7 50. Qxb4+ Kc7 51. Qc4+ Kd6 52. Qxa6+ Ke5 53. Qc6 Nf6 54. Qxf6+ Kxf6 55. a5 Ke5 56. a6 Kd4 57. a7 Kd3 58. a8=Q Kd4 59. Qc6 Ke5 60. Qd7 Ke4 61. Qd6 Ke3 62. Qd5 Ke2 63. Qd4 Ke1 64. Kf3 Kf1 65. Qd1# 1-0

I posted this "puzzle" to you, because Mayhem is one of the few engines which fails to see the severe mate threat on the h-line .. i wonder why, because the mate is rather obvious and has not many plies ..