Missed win by asmFish or just my new year hangover?

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

Moderators: hgm, Rebel, chrisw

MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Missed win by asmFish or just my new year hangover?

Post by MikeGL »

There is something wrong with this CCRL game between SF8 and asmFish.
A win was missed by black (asmFish) on this position:
[d]8/8/5p1p/6p1/1p1kP1P1/5P1P/2P2RK1/3q1B2 b - -
Position after 125.Rf2 of white
Here, 125...Ke3! would lead to a win for black after exchanging the Q against R+B, via [Ke3! Re2+ Qxe2 Bxe2 Kxe2] and winning on a pawn endgame (according to 6-men-TB it is a mate in 50).
Did asmFish missed a winning strategy by invading white camp with his own King?

There could only be 2 reasons:

-This is a 50-move-rule bug in SF8, because it deliberately played weak moves since it noticed 50-move is about to be reached and hence it played differently (with weak moves) which it knows would still end in draw because of this rule.
...or maybe
-My analysis was flawed, because there's no win.
(but i think analysis was correct because with 6-men-tb, it is surely a win after 125...Ke3! by asmFish.)


complete game from CCRL site:

[pgn]
[Event "CCRL 40/40"]
[Site "CCRL"]
[Date "2017.11.14"]
[Round "585.3.190"]
[White "Stockfish 8 64-bit 4CPU"]
[Black "asmFish 051117 64-bit 4CPU"]
[Result "1/2-1/2"]
[BlackElo "3419"]
[WhiteElo "3388"]
[TimeControl "300"]
[Termination "normal"]
[PlyCount "300"]
[WhiteType "human"]
[BlackType "human"]

1. e4 {book} e5 {book} 2. Nf3 {book} Nc6 {book} 3. Nc3 {book} Nf6 {book} 4.
g3 {book} Nd4 {book} 5. Bg2 {book} Nxf3+ {book} 6. Qxf3 {book} Bc5 {book}
7. O-O {book} c6 {book} 8. Na4 {+0.17/32 57s} Be7 {-0.25/29 36s} 9. d4
{+0.22/28 6.7s} d6 {-0.20/32 44s} 10. dxe5 {+0.18/32 47s} dxe5 {-0.15/34
95s} 11. Qc3 {+0.11/28 9.7s} Nd7 {-0.16/32 65s} 12. b3 {+0.22/28 27s} O-O
{-0.17/32 47s} 13. Be3 {+0.23/30 49s} Qc7 {-0.21/29 25s} 14. Rfd1 {+0.30/28
54s} b5 {-0.09/30 101s} 15. Nb2 {+0.28/28 68s} a5 {0.00/24 13s} 16. a3
{+0.29/29 77s} Bxa3 {-0.02/29 16s} 17. Rxa3 {0.00/33 46s} b4 {+0.08/29 10s}
18. Qxb4 {0.00/33 8.7s} axb4 {0.00/32 34s} 19. Rxa8 {+0.07/33 33s} c5
{0.00/36 31s} 20. Rda1 {+0.14/33 22s} Bb7 {0.00/36 37s} 21. R8a7 {+0.06/30
7.8s} Rd8 {0.00/34 11s} 22. Nc4 {+0.41/28 19s} h6 {0.00/39 51s} 23. Na5
{+0.24/34 146s} Rb8 {0.00/39 58s} 24. Bh3 {+0.35/31 22s} Nf6 {0.00/34 30s}
25. f3 {0.00/33 52s} g5 {+0.07/36 82s} 26. Nxb7 {0.00/33 36s} Rxb7
{+0.38/22 6.7s} 27. Ra8+ {0.00/38 33s} Rb8 {0.00/36 32s} 28. R8a7 {0.00/39
12s} Rb7 {0.00/37 17s} 29. Ra8+ {0.00/45 28s} Rb8 {0.00/40 24s} 30. R8a7
{0.00/46 29s} Qb6 {0.00/39 22s} 31. Bf1 {+0.20/31 18s} Rb7 {0.00/41 40s}
32. R7a6 {+0.05/33 53s} Qd8 {0.00/43 48s} 33. h3 {0.00/33 44s} Kg7 {0.00/38
31s} 34. Kg2 {+0.20/32 25s} Rd7 {0.00/39 36s} 35. Ra8 {+0.20/36 33s} Qe7
{0.00/39 24s} 36. Bb5 {+0.20/37 38s} Rb7 {0.00/41 33s} 37. Be2 {+0.20/34
7.0s} Rc7 {0.00/39 21s} 38. R8a6 {+0.20/37 41s} Rd7 {0.00/41 36s} 39. R1a5
{+0.10/35 106s} Rc7 {0.00/40 92s} 40. Bd3 {+0.13/31 8.5s} Qf8 {0.00/39 22s}
41. Ra1 {+0.06/38 65s} Qe7 {0.00/44 63s} 42. Bf1 {0.00/36 51s} Qd7 {0.00/43
49s} 43. Be2 {0.00/38 42s} Rc6 {0.00/45 25s} 44. Ra8 {0.00/37 62s} Qd6
{0.00/43 78s} 45. Rd1 {0.00/37 61s} Qc7 {0.00/46 77s} 46. g4 {0.00/38 13s}
Nd7 {+0.06/32 14s} 47. Bb5 {0.00/39 33s} Rd6 {0.00/36 25s} 48. Rda1
{0.00/41 28s} Nb6 {0.00/40 66s} 49. R8a7 {0.00/42 49s} Qb8 {0.00/40 96s}
50. Kg3 {0.00/41 42s} c4 {0.00/35 17s} 51. bxc4 {-0.26/34 66s} Rd4
{+0.11/37 39s} 52. Bxd4 {-0.08/29 6.8s} exd4+ {+1.60/26 12s} 53. Kg2
{-1.18/34 87s} Qe5 {+1.72/31 28s} 54. Rd1 {-1.43/35 63s} Nc8 {+1.96/28 14s}
55. Ra8 {-1.46/36 45s} Ne7 {+1.77/38 48s} 56. Re8 {-1.46/35 5.4s} Qd6
{+1.62/40 32s} 57. Rxe7 {-1.46/38 24s} Qxe7 {+1.88/38 14s} 58. Rxd4
{-1.46/39 14s} Qa7 {+1.96/42 56s} 59. Rd2 {-1.46/42 26s} Qe3 {+1.96/46 19s}
60. Rf2 {-1.46/43 15s} Kf6 {+1.96/47 26s} 61. Be8 {-1.46/44 39s} Ke6
{+1.96/50 20s} 62. Kg3 {-1.51/41 26s} Qe1 {+1.96/46 19s} 63. Kg2 {-1.51/38
23s} Qc3 {+1.96/47 19s} 64. Bc6 {-1.51/45 38s} Ke5 {+1.95/50 113s} 65. Bd5
{-1.58/44 35s} f6 {+1.96/50 15s} 66. Re2 {-1.58/48 24s} Qd4 {+1.96/49 17s}
67. Rf2 {-1.58/47 5.4s} Qe3 {+1.96/50 18s} 68. Bb7 {-1.58/43 23s} Kd4
{+1.96/46 16s} 69. Bd5 {-1.58/43 23s} Kc5 {+1.96/46 23s} 70. Bf7 {-1.58/49
24s} Kd4 {+1.96/46 28s} 71. Bd5 {0.00/78 13s} Kc5 {+1.96/51 20s} 72. Bf7
{0.00/71 22s} Qe1 {+1.96/51 17s} 73. Rf1 {-1.58/51 78s} Qd2+ {+1.96/52 31s}
74. Rf2 {-1.58/51 5.7s} Qd1 {+1.96/55 22s} 75. Bd5 {-1.58/46 24s} Kd4
{+1.96/54 39s} 76. c5 {-1.58/45 12s} Kxc5 {+1.96/51 46s} 77. Bb3 {-1.58/49
25s} Qe1 {+1.96/55 23s} 78. Rf1 {-1.66/48 43s} Qe3 {+1.96/55 30s} 79. Ba4
{-1.66/49 65s} Qd4 {+1.96/54 23s} 80. Rf2 {-1.58/49 21s} Kd6 {+1.96/54 27s}
81. Bb5 {-1.58/49 34s} Qc3 {+1.96/52 20s} 82. Bf1 {-1.58/48 38s} Ke5
{+1.96/53 31s} 83. Re2 {-1.58/48 13s} Qd4 {+1.96/53 23s} 84. Rf2 {-1.58/52
53s} Ke6 {+1.96/47 29s} 85. Re2 {-1.58/47 35s} Ke5 {+1.96/52 37s} 86. Rf2
{0.00/87 26s} Qd6 {+1.96/56 25s} 87. Re2 {-1.58/54 101s} Ke6 {+1.96/49 21s}
88. Rf2 {-1.58/48 53s} Qd4 {+1.96/50 28s} 89. Re2 {0.00/84 23s} Qc3
{+1.96/55 47s} 90. Kf2 {-1.58/49 103s} Qc5+ {+1.96/55 28s} 91. Kg2
{-1.58/51 17s} Qd6 {+1.96/51 22s} 92. Rf2 {0.00/75 21s} Ke5 {+1.96/57 23s}
93. Re2 {0.00/84 88s} Qd1 {+1.96/58 26s} 94. Kg1 {-1.58/51 57s} Qc1
{+1.96/55 23s} 95. Kg2 {-1.58/47 25s} Ke6 {+1.96/58 24s} 96. Rf2 {-1.58/47
24s} Kd6 {+1.96/50 29s} 97. Re2 {-1.58/50 26s} Qd1 {+1.96/54 35s} 98. Kf2
{-1.58/48 36s} Ke5 {+1.96/48 29s} 99. Kg1 {0.00/92 13s} Qc1 {+1.96/58 23s}
100. Kg2 {0.00/95 33s} Qf4 {+1.96/58 36s} 101. Kf2 {-1.58/46 44s} Qh2+
{+1.96/46 42s} 102. Bg2 {-1.66/38 26s} Qf4 {+1.96/52 27s} 103. Bf1
{0.00/109 13s} Ke6 {+1.96/53 49s} 104. Kg2 {-1.58/51 51s} Qc7 {+1.96/58
31s} 105. Rd2 {-1.58/48 22s} Qc3 {+1.96/57 263s} 106. Rf2 {-1.58/45 19s}
Qc7 {+1.96/44 32s} 107. Rd2 {0.00/88 11s} Qc3 {+1.96/46 13s} 108. Rf2
{0.00/93 19s} Qc5 {+1.96/51 15s} 109. Re2 {0.00/90 19s} Qc8 {+1.91/44 50s}
110. Rd2 {-1.58/43 37s} Qc7 {+1.88/44 23s 3-fold repetition} 111. Re2
{-1.58/45 18s} Qd8 {+1.89/41 57s} 112. Re1 {-1.58/44 17s} Qd2+ {+1.90/40
28s} 113. Re2 {-1.58/45 8.7s} Qd4 {+1.92/45 20s 3-fold repetition} 114. Rf2
{-1.58/45 45s 3-fold repetition} Qc3 {+1.90/40 7.7s 3-fold repetition} 115.
Re2 {-1.55/35 19s} Kd6 {+1.73/41 41s} 116. Rf2 {0.00/87 24s} Kc5 {+1.63/42
26s} 117. Kh2 {-1.51/41 35s} Qa3 {+1.63/36 17s} 118. Kg2 {-1.51/41 4.1s}
Qc3 {+1.63/40 5.5s} 119. Kh2 {0.00/86 15s} Qd4 {+1.56/42 15s} 120. Kg2
{-1.45/48 66s} Kc6 {+1.76/37 5.2s} 121. Ba6 {-1.05/44 266s} Kd6 {+1.54/43
75s} 122. Bb5 {0.00/78 23s} Kc5 {+0.87/41 64s} 123. Bf1 {0.00/73 216s} Qd1
{+0.87/42 13s} 124. Re2 {-0.59/43 176s} Kd4 {+0.79/42 32s} 125. Rf2
{-0.59/41 31s} Kc3 {+0.72/45 112s} 126. Re2 {-0.59/39 5.9s} h5 {+0.72/46
40s} 127. gxh5 {-0.59/41 40s} Qd6 {+0.72/46 80s} 128. h6 {-0.52/39 34s} Qf8
{+0.72/47 25s} 129. Re3+ {-0.52/39 10s} Kxc2 {+0.72/44 25s} 130. Re2+
{-0.44/38 14s} Kb3 {+0.72/42 17s} 131. Re3+ {0.00/34 13s} Kc2 {+0.72/42
28s} 132. Re2+ {0.00/45 18s} Kd1 {+0.72/45 68s} 133. h7 {-0.30/42 52s} Qh8
{+0.72/48 16s} 134. Rb2 {-0.16/37 18s} Qxh7 {+0.72/48 18s} 135. Rxb4
{-0.16/39 3.3s} Kd2 {+0.72/51 20s} 136. e5 {-0.08/34 13s} fxe5 {+0.72/53
18s} 137. Re4 {-0.08/32 3.2s} Qf5 {+0.72/52 21s} 138. h4 {0.00/47 10s} gxh4
{0.00/82 154s} 139. Rxh4 {0.00/54 3.3s} e4 {0.00/76 9.7s} 140. Rxe4
{0.00/74 15s} Qg5+ {0.00/81 14s} 141. Kf2 {0.00/58 14s} Kc1 {0.00/81 62s}
142. Bc4 {0.00/59 15s} Kb2 {0.00/72 9.2s} 143. f4 {0.00/56 15s} Qg6
{0.00/73 61s} 144. Kf3 {0.00/61 18s} Qg1 {0.00/67 37s} 145. f5 {0.00/55
16s} Kc3 {0.00/58 27s} 146. f6 {0.00/55 14s} Qh1+ {0.00/67 16s} 147. Kf4
{0.00/59 13s} Qh6+ {0.00/68 15s} 148. Ke5 {0.00/63 16s} Qh7 {0.00/58 16s}
149. Bd5 {0.00/53 13s} Qc7+ {0.00/65 16s} 150. Ke6 {0.00/55 4.2s} Qc8+
{0.00/69 13s, Draw by adjudication} 1/2-1/2
[/pgn]


Credit goes to CCRL for this game.
petero2
Posts: 687
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Missed win by asmFish or just my new year hangover?

Post by petero2 »

MikeGL wrote:There is something wrong with this CCRL game between SF8 and asmFish.
A win was missed by black (asmFish) on this position:
[d]8/8/5p1p/6p1/1p1kP1P1/5P1P/2P2RK1/3q1B2 b - -
Position after 125.Rf2 of white
Here, 125...Ke3! would lead to a win for black after exchanging the Q against R+B, via [Ke3! Re2+ Qxe2 Bxe2 Kxe2] and winning on a pawn endgame (according to 6-men-TB it is a mate in 50).
Did asmFish missed a winning strategy by invading white camp with his own King?

There could only be 2 reasons:

-This is a 50-move-rule bug in SF8, because it deliberately played weak moves since it noticed 50-move is about to be reached and hence it played differently (with weak moves) which it knows would still end in draw because of this rule.
...or maybe
-My analysis was flawed, because there's no win.
(but i think analysis was correct because with 6-men-tb, it is surely a win after 125...Ke3! by asmFish.)
I think your analysis is wrong, probably because the analysis software you use does not handle the half-move clock correctly. Note that the position you posted is not the same as the position after 125 Rf2 in the game since the half-move clock information is missing. The correct position is:

[D]8/8/5p1p/6p1/1p1kP1P1/5P1P/2P2RK1/3q1B2 b - - 97 125

According to my analysis (using DroidFish and texel) the position is a draw after Ke3 for half-move clock values >= 94, due to the following defense:

Ke3 Bc4 Qe1 Rf1 Qd2 Kg3

After Kg3 the half-move clock is 100 and white can claim a draw. This defense does not work if the half-move clock value is 93 in the start position, because then the half-move clock after Kg3 is only 99 and black wins after Qxc2.
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Missed win by asmFish or just my new year hangover?

Post by MikeGL »

petero2 wrote:
MikeGL wrote:There is something wrong with this CCRL game between SF8 and asmFish.
A win was missed by black (asmFish) on this position:
[d]8/8/5p1p/6p1/1p1kP1P1/5P1P/2P2RK1/3q1B2 b - -
Position after 125.Rf2 of white
Here, 125...Ke3! would lead to a win for black after exchanging the Q against R+B, via [Ke3! Re2+ Qxe2 Bxe2 Kxe2] and winning on a pawn endgame (according to 6-men-TB it is a mate in 50).
Did asmFish missed a winning strategy by invading white camp with his own King?

There could only be 2 reasons:

-This is a 50-move-rule bug in SF8, because it deliberately played weak moves since it noticed 50-move is about to be reached and hence it played differently (with weak moves) which it knows would still end in draw because of this rule.
...or maybe
-My analysis was flawed, because there's no win.
(but i think analysis was correct because with 6-men-tb, it is surely a win after 125...Ke3! by asmFish.)
I think your analysis is wrong, probably because the analysis software you use does not handle the half-move clock correctly. Note that the position you posted is not the same as the position after 125 Rf2 in the game since the half-move clock information is missing. The correct position is:

[D]8/8/5p1p/6p1/1p1kP1P1/5P1P/2P2RK1/3q1B2 b - - 97 125

According to my analysis (using DroidFish and texel) the position is a draw after Ke3 for half-move clock values >= 94, due to the following defense:

Ke3 Bc4 Qe1 Rf1 Qd2 Kg3

After Kg3 the half-move clock is 100 and white can claim a draw. This defense does not work if the half-move clock value is 93 in the start position, because then the half-move clock after Kg3 is only 99 and black wins after Qxc2.
Thanks a lot for the clarification.

Then I think point 1 is partly correct. Because the move Ke3! won't even
be possible if SF8 played properly with Bf1+Re2+Kf2 fortress which won't
allow the Ke3 invasion. But it seems SF8 played weak moves (allowing
Ke3! later in the game) because it "knew" that the 50-move-rule is
approaching and doesn't care if it makes a strong or weak move. Looks
like a bug, in my opinion, because SF8 must make strong (optimum)
moves even if 50-move is already in sight. Since Ke3 can be avoided by white with proper play.

But I haven't heavily studied SF code, so maybe I missed something.
petero2
Posts: 687
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: Missed win by asmFish or just my new year hangover?

Post by petero2 »

MikeGL wrote:Thanks a lot for the clarification.

Then I think point 1 is partly correct. Because the move Ke3! won't even
be possible if SF8 played properly with Bf1+Re2+Kf2 fortress which won't
allow the Ke3 invasion. But it seems SF8 played weak moves (allowing
Ke3! later in the game) because it "knew" that the 50-move-rule is
approaching and doesn't care if it makes a strong or weak move. Looks
like a bug, in my opinion, because SF8 must make strong (optimum)
moves even if 50-move is already in sight. Since Ke3 can be avoided by white with proper play.

But I haven't heavily studied SF code, so maybe I missed something.
I think your description of the behavior is correct, but I doubt any SF developers consider this to be a bug. There are many situations where a chess engine will play a move that is optimal in a game theoretic sense, even though it is not the safest move according to human standards.

For example, in a drawn KRB vs KR endgame, the side with the bishop could decide to sacrifice its rook for no compensation if the resulting KB vs KR position is still a draw. This would be a game-theoretically optimal move even though a human would likely consider the move to be stupid because it gives up any winning chances against a non-perfect opponent.

The same kind of behavior can happen with respect to the 50-move draw rule. At half-move clock = 100, the engine can move a piece to a position where it can immediately get captured, because it knows the game is a draw anyway. A human would consider this a bad decision, because if you for some reason counted incorrectly and the half-move clock was really only 99, you would immediately lose the game. Engines "know" they are not calculating the half-move clock incorrectly, so they don't care about playing "safe" moves.
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Missed win by asmFish or just my new year hangover?

Post by MikeGL »

petero2 wrote:
MikeGL wrote:Thanks a lot for the clarification.

Then I think point 1 is partly correct. Because the move Ke3! won't even
be possible if SF8 played properly with Bf1+Re2+Kf2 fortress which won't
allow the Ke3 invasion. But it seems SF8 played weak moves (allowing
Ke3! later in the game) because it "knew" that the 50-move-rule is
approaching and doesn't care if it makes a strong or weak move. Looks
like a bug, in my opinion, because SF8 must make strong (optimum)
moves even if 50-move is already in sight. Since Ke3 can be avoided by white with proper play.

But I haven't heavily studied SF code, so maybe I missed something.
I think your description of the behavior is correct, but I doubt any SF developers consider this to be a bug. There are many situations where a chess engine will play a move that is optimal in a game theoretic sense, even though it is not the safest move according to human standards.

For example, in a drawn KRB vs KR endgame, the side with the bishop could decide to sacrifice its rook for no compensation if the resulting KB vs KR position is still a draw. This would be a game-theoretically optimal move even though a human would likely consider the move to be stupid because it gives up any winning chances against a non-perfect opponent.

The same kind of behavior can happen with respect to the 50-move draw rule. At half-move clock = 100, the engine can move a piece to a position where it can immediately get captured, because it knows the game is a draw anyway. A human would consider this a bad decision, because if you for some reason counted incorrectly and the half-move clock was really only 99, you would immediately lose the game. Engines "know" they are not calculating the half-move clock incorrectly, so they don't care about playing "safe" moves.
+1
Thanks for the game analysis above and this insightful post.

regards,
Mike
tpoppins
Posts: 919
Joined: Tue Nov 24, 2015 9:11 pm
Location: upstate

Re: Missed win by asmFish or just my new year hangover?

Post by tpoppins »

petero2 wrote: I think your analysis is wrong, probably because the analysis software you use does not handle the half-move clock correctly. Note that the position you posted is not the same as the position after 125 Rf2 in the game since the half-move clock information is missing. The correct position is:

[D]8/8/5p1p/6p1/1p1kP1P1/5P1P/2P2RK1/3q1B2 b - - 97 125

According to my analysis (using DroidFish and texel) the position is a draw after Ke3 for half-move clock values >= 94, due to the following defense:

Ke3 Bc4 Qe1 Rf1 Qd2 Kg3

After Kg3 the half-move clock is 100 and white can claim a draw. This defense does not work if the half-move clock value is 93 in the start position, because then the half-move clock after Kg3 is only 99 and black wins after Qxc2.
I found out that Fritz GUIs (versions 14 and 16 tested) do not handle correctly the half-move clock field in FENs either.

If you paste the above FEN into one of these GUIs and start analyzing with, say, SF with the debug log enabled everything seems OK as the moves of the PVs will have the correct numbers. Examining SF's log reveals, however, that the actual FEN passed to the engine is

8/8/5p1p/6p1/1p1kP1P1/5P1P/2P2RK1/3q1B2 b - - 0 0

So you get 200+ centipawn scores for this drawn position, whereas if you paste the whole game instead of the FEN the score for this position plummets below 60 cp.