Chess variant tournament: Shatranj

Discussion of computer chess matches and engine tournaments.

Moderator: Ras

enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

Seems HaChu can't cope with the Setup starting positions:

[Event "Computer Chess Game"]
[Site "ENHORNING"]
[Date "2013.03.02"]
[Round "1"]
[White "Pulsar2009-9b"]
[Black "HaChu 0.5beta"]
[Result "1-0"]
[TimeControl "60/60"]
[Variant "shatranj"]
[FEN "rnbkqbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBKQBNR w 0 1"]
[SetUp "1"]

{--------------
r n b k q b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B K Q B N R
white to play
--------------}
1. Nc3
{Error: second chess program (HaChu.exe) exited unexpectedly} 1-0

[Event "Computer Chess Game"]
[Site "ENHORNING"]
[Date "2013.03.02"]
[Round "2"]
[White "HaChu 0.5beta"]
[Black "Pulsar2009-9b"]
[Result "0-1"]
[TimeControl "60/60"]
[Variant "shatranj"]
[FEN "rnbkqbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBKQBNR w 0 1"]
[SetUp "1"]

{--------------
r n b k q b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B K Q B N R
white to play
--------------}
1. Nc3
{Error: second chess program (HaChu.exe) exited unexpectedly} 0-1

Oh, and I got two pop-ups (hidden behind other windows) that I assume had to do with this: "Unexpected piece R in setup" or something along those lines.
User avatar
hgm
Posts: 28503
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

Must be some bug in converting the WB one-letter codes to HaChu's 2-letter position encoding. Weird, because R is a letter that occurs in all Shogi variants. I willl check it out.
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

hgm wrote:Weird, because R is a letter that occurs in all Shogi variants. I willl check it out.
I guess R is in the error message because it's the first letter that is encountered in the FEN simply? *shrugs*

I'll hold the tournament for now - if you can come up with a solution for HaChu, that would be great, as Pulsar (and all the other programs) seems to be working fine with the SetUp pgn-file. If so, I'll rerun Pulsar's game as White from the first cycle, so it gets a fair chance in them too...
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

Here are the preliminary standings after Cycle 1:

Code: Select all

Cross table, sorted by score percentage, Buchholz, SB

                              Ti Ne Sh Sj Ha Pu Ch Da
 1. Tiyaga v1.0               ## 1= 1= 11 11 11 11 11   93%  13.0 ( 86.0,  75.0)
 2. NebiyuChess_1.43          0= ## 1= 11 11 11 11 11   86%  12.0 ( 88.0,  63.5)
 3. ShaMax 4.8S               0= 0= ## 1= 11 1= 11 11   71%  10.0 ( 92.0,  49.3)
 4. Sjaak 524                 00 00 0= ## 11 10 =1 11   50%   7.0 ( 98.0,  27.8)
 5. HaChu 0.5beta             00 00 00 00 ## 1= =1 11   36%   5.0 (102.0,  14.5)
 6. Pulsar2009-9b             00 00 0= 01 0= ## 0= 01   25%   3.5 (105.0,  18.3)
 7. ChessV_WinBoard           00 00 00 =0 =0 1= ## 01   25%   3.5 (105.0,  13.3)
 8. Dabbaba 6.52 JA           00 00 00 00 00 10 10 ##   14%   2.0 (108.0,   7.0)
Preliminary, because if a solution is found that works for both Pulsar and everybody else, I will replay those 7 Pulsar as white games that were affected by it somehow using the wrong setup.
User avatar
hgm
Posts: 28503
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

OK, try http://hgm.nubati.net/HaChu.exe .

I was mixing up variant numbers with variant codes in processing the setboard command, with as a result HaChu would think it was in Taikoyoku after that. And as I have not defined any pieces for Taikyoku yet, it complained against the Rook, which it encountered first in the FEN.

After that it turned out that I messed up the test for N in the FEN converter, with as a result it converted it to :LN (Lion).

After that it turned out that it converted Q to :FK (Free King). So I renamed Ferz to Free King in the list of Shatranj pieces. (I guess I could have renamed Knight to Lion in the list of Chess pieces, then I would not have had to made an exception for N in the 1-letter to 2-letter FEN conversion...)

After that it seemed to work!
User avatar
hgm
Posts: 28503
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

enhorning wrote:Preliminary, because if a solution is found that works for both Pulsar and everybody else, I will replay those 7 Pulsar as white games that were affected by it somehow using the wrong setup.
Ah, Pulsar only has a wrong setup when it has white? I was wondering how it could ever score wins with a wrong setup, but I suppose these were all black wins then.
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

hgm wrote:Ah, Pulsar only has a wrong setup when it has white?
Yes, only when white, and only after I started using an openings.pgn file.

The new HaChu seems to work fine - thanks!
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

So, I've replayed the games which were affected by Pulsar's setup bug... and (no surprise), it has done better, now that it actually knows where its King is!

Draws against Tiyaga, ShaMax, and ChessV and a win against Dabbaba... the game against HaChu is the last one to run, and looks like another draw.

But the game that caught my eye was this win by Sjaak, where near the end, it looks like Sjaak is fumbling around a bit, seeing mate scores, but not actually progressing towards the win - in particular, it made several moves immediately with a +160.00 score. Looks like hash hits - I remember having that problem in my Draughts program, where it would see the win from hash hits, but fail to actually progress towards it for quite a while.

[Event "Computer Chess Game"]
[Site "ENHORNING"]
[Date "2013.03.03"]
[Round "8"]
[White "Pulsar2009-9b"]
[Black "Sjaak 524"]
[Result "0-1"]
[TimeControl "40/1200"]
[Variant "shatranj"]
[FEN "rnbkqbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBKQBNR w 0 1"]
[SetUp "1"]

{--------------
r n b k q b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B K Q B N R
white to play
--------------}
1. Nc3 Be6 {-0.05/16 24} 2. Nf3 {-0.03/9 30} Nf6 {+0.00/16 19} 3. h3
{-0.03/9 30} Nc6 {+0.00/15 31} 4. e3 {-0.04/9 30} Bd6 {+0.03/15 20} 5. d3
{+0.05/9 30} Nb4 {+0.01/14 32} 6. a3 {+0.16/9 30} Nbd5 {+0.07/16 38} 7. e4
{+0.09/9 30} Nxc3+ {+0.15/15 17} 8. bxc3 {+0.11/10 30} Bf4 {+0.15/15 19} 9.
g3 {+0.25/9 30} Bh6 {+0.08/15 27} 10. g4 {+0.26/9 30} Ng8 {+0.17/15 25} 11.
Rg1 {+0.33/9 30} Bf4 {+0.20/14 23} 12. Rb1 {+0.31/9 30} Rb8 {+0.00/14 35}
13. Rb5 {+0.34/8 30} c6 {+0.11/14 24} 14. Ra5 {+0.39/9 30} Ra8
{+0.10/14 23} 15. Rf5 {+0.31/9 30} Bd6 {+0.18/15 17} 16. Rh5 {+0.26/9 30}
b6 {+0.06/14 40} 17. g5 {+0.22/9 30} c5 {-0.01/13 22} 18. d4 {+0.23/9 30}
Bc4 {-0.08/13 34} 19. Ne5 {+0.29/9 30} Rc8 {-0.06/12 19} 20. d5
{+0.26/9 30} Ba6 {-0.24/13 25} 21. f3 {+0.24/9 30} e6 {+0.00/13 21} 22.
dxe6 {+0.19/9 30} dxe6 {+0.06/15 27} 23. Rg2 {+0.16/9 30} Ne7 {+0.03/14 19}
24. a4 {+0.09/9 30} Kc7 {+0.15/13 31} 25. Be3 {+0.12/8 30} Rd8
{+0.19/13 37} 26. Kc1 {+0.10/9 30} Ng6 {+0.30/14 32} 27. Nxg6 {+0.04/9 30}
fxg6 {+0.21/16 29} 28. Rh4 {+0.04/7 30} e5 {+0.27/16 23} 29. Rd2
{+0.02/9 30} Bf4 {+0.25/15 27} 30. Rxd8 {+0.02/10 30} Kxd8 {+0.29/16 22}
31. Rg4 {+0.01/10 30} Bd6 {+0.41/15 36} 32. Rg2 {-0.02/10 30} Rf8
{+0.45/15 25} 33. Rg3 {-0.05/10 30} Bc4 {+0.46/17 36} 34. Kd2 {-0.03/10 30}
Qd7 {+0.49/16 45} 35. Kd3 {+0.02/10 30} Be6 {+0.60/18 46} 36. Bc1
{-0.01/10 30} c4+ {+0.67/15 33} 37. Ke3 {-0.02/10 30} b5 {+0.75/19 25} 38.
axb5 {+0.46/10 30} Kc7 {+0.67/19 41} 39. Bd3 {+0.45/10 30} Bf4
{+0.69/16 49} 40. Rg1 {+0.51/10 30} Rb8 {+0.79/18 59} 41. Qf2 {+0.57/10 30}
cxd3 {+0.88/16 28} 42. cxd3 {+0.58/10 30} Rxb5 {+0.83/15 16} 43. d4
{+0.53/10 30} Bd6 {+0.83/14 22} 44. dxe5 {+0.51/10 30} Rxe5 {+0.75/16 25}
45. Kd4 {+0.50/10 30} Ra5 {+0.75/17 32} 46. h4 {+0.49/10 30} Ra2
{+0.81/14 19} 47. Qg3 {+0.51/9 30} Qc6 {+0.76/15 32} 48. Ke3 {+0.51/9 30}
Bf8 {+0.80/15 32} 49. f4 {+0.51/10 30} Qb5 {+0.89/14 19} 50. Kd4
{+0.53/9 30} Rd2+ {+0.86/14 17} 51. Ke3 {+0.53/10 30} Rb2 {+0.86/16 22} 52.
e5 {+0.53/10 30} Qc4 {+0.91/15 35} 53. Rf1 {+0.53/10 30} Rc2 {+0.98/15 22}
54. Kd4 {+0.49/10 30} Rg2 {+0.94/15 33} 55. Rf3 {+0.49/10 30} Rg1
{+0.93/14 27} 56. Ba3 {+0.15/10 30} Kc6 {+1.26/15 28} 57. h5 {-0.47/10 30}
Rd1+ {+1.59/15 29} 58. Ke4 {-0.59/10 30} Qd5+ {+1.91/16 54} 59. Ke3
{-0.85/10 30} gxh5 {+1.93/17 31} 60. f5 {-1.00/10 30} Re1+ {+1.92/16 33}
61. Kf2 {-0.74/11 30} Rxe5 {+1.90/17 33} 62. fxe6 {-0.76/10 30} Bd6
{+1.84/17 33} 63. Re3 {-1.11/10 30} Rxe3 {+2.05/16 24} 64. Kxe3
{-1.27/12 30} Qxe6 {+1.97/19 21} 65. Ke4 {-1.35/11 30} Qd7 {+1.96/19 34}
66. Ke5 {-1.01/11 30} Kc7 {+1.96/20 24} 67. Kf5 {-0.97/11 30} Bb8
{+1.96/22 22} 68. g6 {-0.96/12 30} h6 {+1.92/21 25} 69. Ke5 {-0.96/13 30}
Bd6 {+1.92/24 58} 70. Kd5 {-0.96/12 30} a6 {+1.80/21 20} 71. c4
{-0.91/12 30} Bb4 {+1.43/21 23} 72. c5 {-0.88/12 30} Bd2 {+1.43/20 25} 73.
c6 {-0.56/13 30} Qe8 {+1.26/24 31} 74. Ke6 {-0.76/13 30} Kxc6 {+1.31/23 30}
75. Ke7 {-0.76/13 30} Kd5 {+1.37/22 25} 76. Kf8 {-0.45/13 30} Ke4
{+1.42/23 34} 77. Kxe8 {-0.44/13 30} Kf3 {+1.94/25 29} 78. Qh2
{-0.89/13 30} Bf4 {+1.81/26 1:03} 79. Qg1 {-1.02/13 30} Kg2 {+1.84/26 26}
80. Kf7 {-1.44/14 30} h4 {+1.93/28 51} 81. Kxg7 {-1.46/13 30} Kxg1
{+1.92/27 25} 82. Kf6 {-0.99/13 30} Kh2 {+1.91/26 33} 83. g7 {-0.99/13 30}
h3 {+1.83/25 39} 84. g8=Q {-1.44/13 30} Kg3 {+1.18/23 18} 85. Ke5
{-1.46/13 30} h2 {+1.24/22 19} 86. Bc5 {-1.48/12 30} h1=Q {+1.17/23 26} 87.
Kd5 {-1.48/12 30} Kh4 {+1.18/23 18} 88. Qf7 {-1.45/12 30} Kg5 {+1.14/21 17}
89. Kc6 {-1.46/12 30} Kf6 {+1.09/22 19} 90. Qe8 {-1.54/13 30} Ke5
{+1.08/23 25} 91. Qd7 {-0.97/12 30} Qg2 {+1.07/23 30} 92. Qc8 {-2.10/12 30}
Qf3 {+1.07/22 18} 93. Ba3 {-2.10/12 30} a5 {+1.08/22 18} 94. Kb5
{-1.86/12 30} a4 {+1.07/23 28} 95. Bc5 {-1.86/12 30} Qe4 {+1.07/22 22} 96.
Qb7 {-2.10/12 30} Kd6 {+1.07/23 35} 97. Kc4 {-1.61/12 30} Kc7 {+1.92/21 21}
98. Qa6 {-1.52/12 30} Kb6 {+2.00/22 22} 99. Qb5 {-1.54/13 30} Qd3+
{+1.68/23 37} 100. Kxd3 {-2.26/14 30} Kxb5 {+2.15/24 22} 101. Be3
{-1.58/14 30} Kb4 {+2.07/27 23} 102. Ke4 {-1.48/14 30} Bd6 {+2.56/28 22}
103. Kd5 {-1.49/14 30} Bf8 {+2.60/30 27} 104. Ke6 {-1.59/14 30} a3
{+2.66/31 39} 105. Ke7 {-2.50/14 30} Kc4 {+2.89/28 27} 106. Bc1
{-2.98/14 30} a2 {+159.78/28 22} 107. Kf6 {-2.96/14 30} a1=Q
{+159.80/21 0.1} 108. Ke5 {-2.93/14 30} Qb2 {+2.90/18 36} 109. Be3
{-2.97/14 30} Qc3 {+160.00/16 1.7} 110. Ke4 {-2.98/14 30} Qd4
{+160.00/3 0.1} 111. Bg1 {-4.24/14 30} Kc3 {+160.00/16 4} 112. Kf4
{-4.17/13 30} Bd6+ {+160.00/4 0.1} 113. Ke4 {-4.52/14 30} Bb8
{+159.88/13 0.4} 114. Kf4 {-4.44/13 30} Kd3 {+160.00/9 0.1} 115. Kf3
{-4.57/14 30} Bd6 {+159.98/13 0.8} 116. Kf2 {-149.94/13 30} Qe5
{+159.94/9 0.1} 117. Ke1 {-4.57/13 30} Bf8 {+159.92/13 0.1} 118. Kf2
{-4.57/13 30} Qd4 {+159.94/14 0.8} 119. Kf3 {-4.59/13 30} h5
{+160.00/10 0.1} 120. Kf2 {-4.61/13 30} Kd2 {+159.98/9 0.1} 121. Kf3
{-149.95/14 30} Ke1 {+159.98/7 0.1} 122. Kg2 {-149.96/14 30} Bd6
{+160.00/4 0.1} 123. Kg3 {-149.96/13 30} Kf1 {+160.00/2 0.1} 124. Kh2
{-149.97/13 30} h4 {+160.00/2 0.1} 125. Kh1 {-149.98/14 30} Bf4
{+159.98/4 0.1} 126. Be3 {-149.99/14 30} Qxe3# {+160.00/2 0.1}
{Xboard adjudication: Stalemate} 0-1
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

And here is the corrected cross-table after 1 cycle:

Code: Select all

Cross table, sorted by score percentage, Buchholz, SB

                              Ti Ne Sh Sj Pu Ha Ch Da
 1. Tiyaga v1.0               ## 1= 1= 11 =1 11 11 11   89%  12.5 ( 87.0,  73.0)
 2. NebiyuChess_1.43          0= ## 1= 11 11 11 11 11   86%  12.0 ( 88.0,  64.5)
 3. ShaMax 4.8S               0= 0= ## 1= == 11 11 11   68%   9.5 ( 93.0,  46.3)
 4. Sjaak 524                 00 00 0= ## 10 11 =1 11   50%   7.0 ( 98.0,  26.8)
 5. Pulsar2009-9b             =0 00 == 01 ## == == 11   46%   6.5 ( 99.0,  32.3)
 6. HaChu 0.5beta             00 00 00 00 == ## =1 11   32%   4.5 (103.0,  13.0)
 7. ChessV_WinBoard           00 00 00 =0 == =0 ## 01   21%   3.0 (106.0,  13.3)
 8. Dabbaba 6.52 JA           00 00 00 00 00 00 10 ##    7%   1.0 (110.0,   3.0)
Cycle two has started.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Chess variant tournament: Shatranj

Post by Evert »

enhorning wrote: But the game that caught my eye was this win by Sjaak, where near the end, it looks like Sjaak is fumbling around a bit, seeing mate scores, but not actually progressing towards the win - in particular, it made several moves immediately with a +160.00 score. Looks like hash hits - I remember having that problem in my Draughts program, where it would see the win from hash hits, but fail to actually progress towards it for quite a while.
A while back I changed the way mate scores are handled in the transposition table. It's possible this doesn't work correctly if stalemate should be scored the same as checkmate. I'll investigate.