Romichess bug (Michael?)

Discussion of chess software programming and technical issues.

Moderator: Ras

Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: Romichess bug (Michael?)

Post by Michael Sherwin »

Thanks Miguel!

That should be easy to fix.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Michiel Koorn

Re: Romichess bug (Michael?)

Post by Michiel Koorn »

Ilari wrote: You're probably right. When cutechess-cli receives a draw claim in a position that is not a draw, it expects that the next move from the engine draws the game (eg. Crafty does this). If the engine doesn't send any move, you get the "connection stalls" error. I'll try to fix this so that it only results in a forfeit.
Why? An error is an error.. Keep debugging simple
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: Romichess bug (Michael?)

Post by ilari »

Michiel Koorn wrote:
Ilari wrote: You're probably right. When cutechess-cli receives a draw claim in a position that is not a draw, it expects that the next move from the engine draws the game (eg. Crafty does this). If the engine doesn't send any move, you get the "connection stalls" error. I'll try to fix this so that it only results in a forfeit.
Why? An error is an error.. Keep debugging simple
Why what?
Why wait for a move after an invalid draw claim? Because the Winboard specs don't specify how draw claims should be handled, and some engines send the claim first and the move later.
Why change the error to a forfeit due to an invalid draw claim? Because currently cutechess-cli will terminate the engine in this situation, but there's really no need to do that.
Michiel Koorn

Re: Romichess bug (Michael?)

Post by Michiel Koorn »

Why ''fix'' it so it is a forfeit
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: Romichess bug (Michael?)

Post by ilari »

Michiel Koorn wrote:Why ''fix'' it so it is a forfeit
The error message ("Invalid draw claim") is more informative than "Connection stalls", which should only occur when the engine stops responding to input. It's also consistent with other "invalid claim" errors.
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Romichess bug (Michael?)

Post by michiguel »

ilari wrote:
Michiel Koorn wrote:Why ''fix'' it so it is a forfeit
The error message ("Invalid draw claim") is more informative than "Connection stalls", which should only occur when the engine stops responding to input. It's also consistent with other "invalid claim" errors.
After 1200 games I got another one. I think we got the right diagnostic (see the final position)

Miguel

[Event "?"]
[Site "?"]
[Date "2010.08.31"]
[Round "221"]
[White "Gaviota-hs"]
[Black "Romichess-P3K"]
[Result "1-0"]
[PlyCount "159"]
[TimeControl "40/8"]

1. e4 {book} c5 {book} 2. Nf3 {book} e6 {book} 3. d4 {book} cxd4 {book}
4. Nxd4 {book} Nc6 {book} 5. Nc3 {book} d6 {book} 6. Be3 {book} Nf6 {book}
7. f4 {book} e5 {book} 8. Nf3 {book} Ng4 {book} 9. Bc1 {book} exf4 {book}
10. Bxf4 {book} Be7 {book} 11. Nd5 {+0.14/6 1.1s} O-O {-0.21/8 0.26s}
12. Be2 {+0.11/5 0.46s} Nf6 {-0.23/8 0.23s} 13. Nxe7+ {+0.73/6 0.20s}
Nxe7 {-0.52/10 0.25s} 14. Qxd6 {+1.16/5 0.16s} Nxe4 {-0.24/10 0.60s}
15. Qb4 {+1.09/5 0.16s} Nf6 {-0.09/9 0.24s} 16. Rd1 {+0.68/4 0.16s}
Ned5 {+0.31/9 0.34s} 17. Qc5 {+0.73/5 0.17s} Be6 {+0.40/9 0.32s}
18. Qb5 {+0.14/5 0.44s} Qc8 {+0.71/9 0.21s} 19. Bd6 {-0.06/4 0.16s}
Ne3 {+0.72/9 0.30s} 20. Bxf8 {-0.13/4 0.16s} Kxf8 {+0.64/9 0.37s}
21. a3 {-0.19/4 0.16s} Nxg2+ {+0.71/9 0.30s} 22. Kf2 {+0.57/5 0.17s}
Ne4+ {+0.63/10 0.34s} 23. Kg1 {+0.56/5 0.17s} Ne3 {+0.63/10 0.21s}
24. Qb4+ {+0.78/5 0.17s} Qc5 {+0.52/11 0.27s} 25. Qxc5+ {+0.73/5 0.18s}
Nxc5 {+0.70/11 0.25s} 26. Rd2 {+0.83/6 0.18s} Rc8 {+0.72/10 0.28s}
27. c3 {+0.71/6 0.28s} Nb3 {+1.19/11 0.29s} 28. Rd3 {+0.13/7 0.18s}
Nc4 {+1.24/11 0.24s} 29. Ng5 {+0.45/6 0.18s} Nxb2 {+1.19/10 0.27s}
30. Nxe6+ {+0.25/6 0.23s} fxe6 {+0.87/11 0.46s} 31. Re3 {+0.30/7 0.62s}
Na4 {+1.04/10 0.37s} 32. Bd1 {+0.65/6 0.16s} Nbc5 {+0.94/10 0.20s}
33. Bc2 {+0.61/6 0.16s} g6 {+0.95/10 0.16s} 34. h4 {+0.56/6 0.39s}
Nb2 {+1.16/9 0.12s} 35. h5 {+0.34/6 0.14s} Nc4 {+0.84/10 0.19s}
36. Rg3 {+0.67/5 0.15s} Rc7 {+0.99/8 0.088s} 37. hxg6 {+0.73/5 0.16s}
hxg6 {+0.69/8 0.084s} 38. Bxg6 {+0.67/5 0.17s} Nxa3 {+0.88/8 0.075s}
39. Rf3+ {+0.63/5 0.20s} Ke7 {+0.86/9 0.076s} 40. Rh4 {+0.44/6 0.32s}
Kd6 {+0.67/8 0.091s} 41. Rd4+ {+0.48/5 0.20s} Ke5 {+1.08/10 0.30s}
42. Re3+ {+0.46/4 0.20s} Kf6 {+1.18/11 0.24s} 43. Rg4 {+0.32/5 0.20s}
Rg7 {+1.18/11 0.25s} 44. Rf3+ {+0.33/4 0.19s} Ke7 {+1.48/11 0.56s}
45. Rfg3 {+0.50/6 0.19s} b5 {+1.65/11 0.25s} 46. Bh5 {+0.35/6 0.18s}
Rxg4 {+2.10/11 0.16s} 47. Bxg4 {+0.09/6 0.17s} a5 {+1.95/11 0.23s}
48. Rg2 {-0.06/6 0.17s} Nc4 {+2.08/10 0.17s} 49. Be2 {-0.15/6 0.16s}
Nd6 {+1.81/11 0.18s} 50. Rg7+ {+0.07/6 0.28s} Kf6 {+1.84/13 0.27s}
51. Rg4 {-0.17/6 0.16s} a4 {+2.55/10 0.21s} 52. Rd4 {-0.30/6 0.34s}
Ke5 {+2.68/11 0.19s} 53. Rd2 {-0.46/6 0.30s} Nce4 {+2.64/12 0.20s}
54. Rc2 {-0.57/6 0.15s} Kf4 {+2.31/11 0.17s} 55. Kf1 {-0.53/6 0.22s}
e5 {+2.47/12 0.19s} 56. Ke1 {-0.61/6 0.15s} Ke3 {+2.45/13 0.27s}
57. Bf1 {-0.44/6 0.15s} Kf3 {+2.24/11 0.24s} 58. Rh2 {-0.37/6 0.15s}
Kf4 {+2.40/11 0.17s} 59. Rc2 {-0.61/6 0.16s} Kg4 {+2.01/11 0.28s}
60. c4 {-0.36/5 0.16s} bxc4 {+1.81/12 0.26s} 61. Bxc4 {-0.33/6 0.16s}
Kf4 {+1.34/11 0.26s} 62. Bf1 {-0.25/6 0.24s} Ke3 {+1.70/11 0.22s}
63. Rc6 {-0.34/6 0.16s} Nf5 {+1.77/11 0.19s} 64. Bg2 {-0.49/6 0.16s}
Nd4 {+0.30/11 0.17s} 65. Rh6 {-0.52/6 0.36s} Nf2 {+1.86/10 0.16s}
66. Rh5 {-0.50/5 0.16s} Nc2+ {+1.95/11 0.21s} 67. Kf1 Nd3 {+1.89/11 0.19s}
68. Rh7 {-0.75/6 0.32s} a3 {+2.19/11 0.21s} 69. Ra7 {-0.89/6 0.41s}
Ndb4 {+4.43/12 0.23s} 70. Re7 {-0.81/5 0.15s} Kd4 {+4.83/11 0.20s}
71. Rd7+ {-3.01/4 0.30s} Kc5 {+5.15/13 0.24s} 72. Rc7+ {-3.20/4 0.15s}
Kd6 {+5.67/14 0.20s} 73. Ra7 {-3.56/4 0.15s} a2 {+5.67/13 0.12s}
74. Ke2 {-3.89/6 0.15s} a1=Q {+5.97/13 0.17s} 75. Rxa1 {-4.11/6 0.16s}
Nxa1 {+6.21/11 0.12s} 76. Kd2 {-4.42/6 0.16s} Kc5 {+6.19/11 0.12s}
77. Ke3 {-4.13/5 0.17s} Nd5+ {+6.42/10 0.080s} 78. Kd3 {-4.41/7 0.25s}
Nf4+ {+8.16/10 0.062s} 79. Ke4 {-4.56/8 0.19s} Nxg2 {+8.79/10 0.054s}
80. Kxe5 {0.00/64 0.021s, Black's connection stalls} 1-0

Final position, Romi must have claimed a draw (it is a draw but it can't be claimed).

EDIT: I take it back, Gaviota (white) cannot claim draw, but Romi (black) can!! Even if the position cannot be automatically be adjudicated, black can claim a draw because white has no mating material. Cutechess-cli should honor the claim, even if it is for the wrong reason.

[d]8/8/8/2k1K3/8/8/6n1/n7 b - - 0 80