Xboard quirk

Discussion of chess software programming and technical issues.

Moderator: Ras

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Xboard quirk

Post by bob »

I don't think this is xboard, but I thought I would ask to see if there is a way to handle this.

I was playing games vs ProDeo on my laptop, 60 moves in 60 minutes, to test all the changes in version 25.0, and I saw this:

After 6 games, the match was 3-3-0, which surprised me. But then I looked at the PGN and I found this:

[Event "Computer Chess Game"]
[Site "scrappy"]
[Date "2015.05.03"]
[Round "1"]
[White "Crafty-25.0"]
[Black "wine"]
[Result "0-1"]
[TimeControl "60/3600"]
[Annotator "10. +0.88 13... -0.39"]

1. e4 d6 2. d4 Nf6 3. Nc3 g6 4. Nf3 Bg7 5. Be2 O-O 6. O-O c6 7. a4 Nbd7 8.
Be3 Qc7 9. a5 Rb8 10. Nd2 {+0.88/21 2:38} b5 11. axb6 {+0.76/22 1:00} axb6
12. f4 {+0.61/25 45} b5 13. g4 {+0.64/21 44} b4 {-0.39/17 2:39} 14. Na4
{+0.59/22 1:30} Ra8 {-0.30/17 1:56} 15. g5 {+0.57/23 52} Nh5
{-0.32/16 1:23} 16. c3 {+0.52/23 28} bxc3 {-0.26/15 1:36} 17. Nxc3 Rxa1
{-0.28/15 1:48} 18. Qxa1 e5 {-0.18/16 1:53} 19. dxe5 {+0.82/24 58} dxe5
{-0.18/16 1:15} 20. f5 Nf4 {-0.12/15 1:10} 21. f6 {+0.73/24 2:40} Bh8
{-0.01/17 2:39} 22. Rd1 {+0.76/24 1:43} Nxe2+ {-0.04/16 1:47} 23. Nxe2
{+0.75/26 14} h6 {-0.10/17 1:06} 24. h4 Nb8 {+0.20/16 1:17} 25. Nf3 Bg4
{+0.23/16 53} 26. Kf2 {+0.82/26 48} Nd7 {+0.30/15 15} 27. Qa3 {+0.81/27 33}
c5 {+0.31/15 1:09} 28. Kg3 {+0.91/24 57} h5 {+0.55/15 1:33} 29. Nc3 Qc6
{+0.29/16 1:57} 30. Qa4 Qb7 {+0.08/16 1:05} 31. Rd2 {+1.05/27 1.1} Ra8
{+0.00/15 1:06} 32. Qc2 {+1.32/26 5:45} Kh7 {+0.24/15 1:24} 33. Qd3
{+1.30/26 58} Be6 {+0.00/15 1:00} 34. Qd6 {+1.82/27 2:45} Ra6
{-0.07/17 0.1} 35. Qe7 {+2.81/26 3:17} Qc6 {-0.42/17 0.1} 36. Kg2
{+2.75/25 1:01} Rb6 {-0.35/15 1:01} 37. Nxe5 {+4.18/25 59} Nxe5
{-2.05/11 9} 38. Rd8 {+4.46/25 1:31} Bh3+ {-2.27/17 1:50} 39. Kxh3 Qe6+
{-2.91/19} 40. Qxe6 {+4.44/24 4:00} fxe6 {-3.13/21 1:03} 41. Bxc5
{+5.91/29 1:36} Rxb2 {-3.99/18 54} 42. Rd6 {+2.37/29 0.2} Nf7
{-4.36/19 1:57} 43. Rxe6 {+6.80/27 39} Rc2 {-4.89/18 2:19} 44. Bd4
{+9.40/26 41} Rd2 {-5.55/17 13} 45. Nb5 {+10.26/27 2:08} Bxf6
{-7.42/17 1:20} 46. Rxf6 {+11.76/26 2:52} Nd8 {-7.53/19} 47. Kg3
{+6.49/26 29} Rd1 {-8.25/16 1:07} 48. Kf2 {+11.76/23 30} Kg8
{-9.22/17 1:12} 49. Rd6 {+12.76/23 1:01} Nb7 {-9.82/16 1:44} 50. Rxg6+
{+15.41/22 36} Kf8 {-10.89/14 10} 51. Rh6 Rd3 {-10.97/15 1:54} 52. Rh8+
{+327.38/23 3:02} Ke7 {-16.30/16 0.1} 53. Rh7+ {+327.40/20 56} Kf8
{-13.89/14 5} 54. Rxb7 {+327.46/21 1:45} Rd2+ {-327.49/15 57} 55. Ke3 Rg2
{-327.43/15 51} 56. Nd6 {+327.54/17 1.3} Rg3+ {-327.37/14 36} 57. Kf4 Rb3
{-32.62/12 22} 58. Rxb3 {+327.58/13 0.3} Ke7 {-25.23/11} 59. Ke5
{+327.60/11} Kd7 {-327.59/6 0.1} 60. Kd5 {+327.62/9} Ke7 {-327.61/2 20} 61.
Bf6+ {+327.64/7} Kd7 {-327.67/1 20} 62. Rb7#
{White mates} 0-1

Notice that last line. Crafty's log file showed this:

5-> 0.00/38.22 Mate 62. Rb7#
time=0.00(100%) nodes=394(394) fh1=100% pred=37 nps=39.4K
checks=19 qchecks=34 fp=92 mcp=0 reversible=6
LMReductions: 1/49 2/43 3/10
null-move (R): 3/1
splits=0 aborts=0 joins=0 data=0% tbhits=0
Black(61): time 375893
time remaining: 62:38 (Crafty).
Black(61): otim 411106
time remaining: 68:31 (opponent).
Black(61): Kd7
time used: 20.03
White(62): Rb7#
1-0 {White mates} <-------- Crafty realizes it has won

Black(62): result 0-1 {White mates} <--------- but notice this
LearnBook() updating book database
puzzling over a move to ponder.
depth time score variation
(no moves)
Black(62): quit


My only interpretation is that perhaps ProDeo has a bug and is sending the wrong "result" string, and presumably xboard is believing Prodeo. :) I base this on the bogus "result" string that Crafty received as seen above.

Is there any way to suppress that? I saw this kind of problem years ago when programs would send the wrong result string. In fact, for my cluster testing, I eventually decided to ignore the result string and let the referee figure out who won unless one side resigns, since this is not that uncommon.

But it would be nice to not have to ignore the xboard match score info as well as having to go edit the match.pgn file and correct the bogus results.

Any clever fixes???

BTW rather than 3-3 it was 6-0. Apparently when Prodeo plays black it gets confused, the 3 games where it was white ended up 0-1 as the actual games did, but when it played black "0-1 white mates" is a bit off-the-wall...
User avatar
hgm
Posts: 28480
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Xboard quirk

Post by hgm »

XBoard has a persistent option to verify engine claims, and forfeit engines that issue false claims with a clear result message. For this to work legality testing should also be on. These options can be controlled from the Adjudication Options dialog.

To control them from the command line, there are:

-testLegality true|false
-testClaims true|false
-checkMates true|false
-materialDraws true|false
-trivialDraws true|false
-ruleMoves N
-repeatsToDraw N

Normally we distribute XBoard pre-configured with legality testing and claim verification on, but you might not have installed the config file, so that it falls back on compile-time defaults.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Xboard quirk

Post by bob »

OK, just enabled those. Am testing right now. I don't see why it is so damned hard to get this stuff right myself...
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Xboard quirk

Post by MikeB »

good info - one of them was false for me.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Xboard quirk

Post by bob »

Seems to have solved the problem...

I basically had to make my cluster referee check EVERYTHING. If a program complains that a move is illegal, it might or might not be so. For the longest I just made the referee accept Crafty's adjudications since it was correct. But then I reached a point where I wanted to play a match between non-crafty programs and the problems were right back again. I just stole all the move generation code, repetition detection and such and the problem was solved.