Chess variant tournament: Shatranj

Discussion of computer chess matches and engine tournaments.

Moderator: Ras

User avatar
hgm
Posts: 28441
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

hgm wrote:
enhorning wrote:Sjaak did a time-consuming trade-down dance against ShaMax. It had Rook + Knight + Ferz versus Rook... but when 50 moves approached and it hadn't been able to make any progress, it gave away the Ferz... then, another 50 moves later, repeated and gave away the Knight... only for it all to end in a draw after yet another 50 moves.
From tablebases I know that R+N vs R is draw even under Shatranj rules. But R+N+F vs R sounds as if it should be winnable. (The Ferz can be used as a shield to neutralize the distant-check weapon.) My generator could not do 6-man EGT, however.

But I recently bought a PC with 8GB RAM. I guess that should make it possible to do 6-men.
I tried this in ShaMax, and although it could not find a mate from a typical starting position even after a very long time, I had no trouble baring it by had under the threat of checkmate. It also had no trouble winning K+R+N+F vs K+R against itself, at 40 moves/5 min. So I suppose this should be an easy win.
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

hgm wrote:
hgm wrote:
enhorning wrote:Sjaak did a time-consuming trade-down dance against ShaMax. It had Rook + Knight + Ferz versus Rook... but when 50 moves approached and it hadn't been able to make any progress, it gave away the Ferz... then, another 50 moves later, repeated and gave away the Knight... only for it all to end in a draw after yet another 50 moves.
I tried this in ShaMax, and although it could not find a mate from a typical starting position even after a very long time, I had no trouble baring it by had under the threat of checkmate. It also had no trouble winning K+R+N+F vs K+R against itself, at 40 moves/5 min. So I suppose this should be an easy win.
Oops - my fault, I went back and looked at the game, and it was K+R+N+Elephant vs K+R. So an Elephant, instead of a Ferz, which does make it more difficult, I guess.

[d]8/8/8/3N4/K5k1/B7/2R5/1r6 b 0 104

Still, Sjaak never even got its King away from the A-file... any hope of progress would surely rely on using the King as an offensive piece?

[Event "Computer Chess Game"]
[Site "ENHORNING"]
[Date "2013.03.02"]
[Round "10"]
[White "Sjaak 524"]
[Black "ShaMax 4.8S"]
[Result "1/2-1/2"]
[TimeControl "40/1200"]
[Variant "shatranj"]
[Annotator "2. +0.03 1... +0.14"]

1. Nc3 Nc6 {+0.14/12 32} 2. Nf3 {+0.03/15 20} g6 {+0.14/12 27} 3. d3
{+0.07/15 18} f6 {+0.24/12 17} 4. d4 {+0.08/15 24} Bd6 {+0.01/11 18} 5. Qd2
{+0.09/14 17} a6 {-0.04/12 29} 6. Be3 {+0.25/14 24} e6 {+0.04/12 21} 7. Bd3
{+0.21/13 18} b6 {+0.05/12 18} 8. a3 {+0.23/12 22} e5 {+0.10/13 20} 9. d5
{+0.22/14 35} Nce7 {+0.01/13 26} 10. Ne1 {+0.14/13 41} Bf4 {+0.02/14 28}
11. a4 {+0.14/13 29} Bxd2 {+0.78/13 21} 12. Kxd2 {+0.11/14 22} d6
{+0.78/13 17} 13. Ra2 {+0.10/13 35} h6 {+1.04/14 27} 14. a5 {-0.40/12 24}
b5 {+1.16/15 29} 15. Bxb5 {-0.55/14 18} axb5 {+0.99/14 18} 16. Nd3
{-0.62/14 34} f5 {+1.05/13 16} 17. Nb4 {-0.71/13 51} Nf6 {+0.98/11 44} 18.
a6 {-0.62/13 17} Qd7 {+0.84/11 20} 19. Rd1 {-0.66/12 23} c6 {+1.01/12 21}
20. Ke1 {-0.70/12 26} cxd5 {+1.28/12 20} 21. Nbxd5 {-0.50/13 24} Nfxd5
{+1.08/15 23} 22. Nxd5 {-0.55/14 24} Nc6 {+1.01/15 33} 23. a7 {-0.63/15 40}
Be6 {+0.93/14 43} 24. Rda1 {-0.55/14 42} Bc4 {+0.81/14 21} 25. Ra3
{-0.43/14 36} Nd4 {+0.78/13 22} 26. Kd2 {+0.00/13 19} Rc8 {+0.36/13 25} 27.
a8=Q {+0.04/13 28} Qe6 {+0.52/12 17} 28. Qb7 {+0.06/13 27} Rb8
{-0.17/13 31} 29. Nb4 {+0.23/12 25} Qd7 {-0.35/13 49} 30. Ra7 {+0.40/13 40}
Ke8 {-0.34/12 23} 31. b3 {+0.70/13 39} Rd8 {-0.32/11 21} 32. bxc4
{+0.96/13 38} bxc4 {-0.54/12 32} 33. R1a4 {+0.95/13 41} Nb5 {-0.66/12 30}
34. R7a5 {+1.11/13 35} c3+ {-0.91/14 34} 35. Kd3 {+1.24/14 48} e4+
{-0.81/14 31} 36. Kc4 Nc7 {-1.03/15 1:34} 37. Na2 {+1.40/13 42} d5+
{-1.06/11 14} 38. Kxc3 {+1.43/14 34} Rb8 {-1.20/12 21} 39. Rb4
{+1.39/14 47} Rd8 {-1.32/12 31} 40. Rb6 {+1.69/13 47} Qe6 {-1.27/11 12} 41.
Bc5 {+1.67/12 19} d4+ {-1.24/12 35} 42. Kd2 {+1.69/13 20} f4 {-1.38/12 36}
43. Ra7 {+1.71/13 32} Qf5 {-1.24/11 18} 44. Nb4 {+1.83/12 17} Rh7
{-1.56/12 1:00} 45. Qc6 {+1.91/13 32} Rf7 {-1.95/12 18} 46. Rbb7
{+2.42/13 28} e3+ {-3.92/13 23} 47. Kc1 {+3.27/13 32} exf2 {-4.15/14 20}
48. Rxc7 {+3.19/15 27} Rxc7 {-4.19/16 25} 49. Rxc7 {+3.14/15 24} f1=Q
{-4.10/16 23} 50. g3 {+3.15/14 19} fxg3 {-4.06/16 25} 51. Rh7 {+3.06/15 22}
Rd6 {-4.13/16 24} 52. hxg3 {+3.14/16 33} Kf8 {-4.05/16 22} 53. Rxh6
{+3.23/15 22} Qxe2 {-3.87/16 25} 54. Kb2 {+3.24/14 21} Kg7 {-3.79/16 20}
55. Rh2 {+3.17/16 35} Qf3 {-3.94/16 20} 56. Kb3 {+3.18/16 24} Kf6
{-3.89/16 21} 57. Qd5 {+3.20/16 34} Q5e4 {-3.97/17 53} 58. Kc4
{+3.55/17 26} Kf5 {-3.91/17 51} 59. Qxe4+ {+3.75/17 26} Qxe4 {-4.68/18 17}
60. Rf2+ {+3.75/18 28} Ke5 {-4.82/19 21} 61. Re2 {+3.75/18 24} Kf5
{-3.94/17 18} 62. g4+ {+3.03/15 35} Kf4 {-3.86/21 28} 63. Rg2 {+2.99/15 22}
Ke5 {-3.82/18 25} 64. Rd2 {+3.03/14 26} Qd5+ {-3.81/19 18} 65. Kb3
{+3.11/17 51} Qe4 {-3.91/19 21} 66. Be7 {+2.95/16 25} Rd7 {-3.87/18 32} 67.
Kc4 {+2.95/16 23} Qd5+ {-3.81/20 22} 68. Kc5 {+2.95/18 27} Rc7+
{-3.81/19 28} 69. Kb6 {+2.95/19 39} Rc4 {-3.87/19 30} 70. Nd3+
{+2.95/18 26} Kd6 {-3.85/19 26} 71. Re2 {+2.95/19 26} Rc6+ {-3.80/19 22}
72. Ka5 {+2.95/21 42} Rc8 {-3.87/19 46} 73. Nf4 {+2.95/20 28} Ra8+
{-3.86/18 26} 74. Kb6 {+2.95/20 22} Rb8+ {-3.82/18 21} 75. Ka6
{+2.95/21 47} Ra8+ {-3.86/19 41} 76. Kb7 {+2.95/21 26} Rf8 {-3.83/20 29}
77. Nxg6 {+2.95/21 46} Rg8 {-3.87/20 23} 78. Nh4 {+2.95/20 29} Rxg4
{-3.91/20 24} 79. Nf5+ {+2.95/21 1:04} Kd7 {-3.84/20 20} 80. Bc5
{+2.95/21 46} Qe6 {-3.74/20 26} 81. Ne7 {+2.95/20 29} Rg1 {-3.77/19 20} 82.
Kb6 {+2.95/19 31} Rb1+ {-3.70/20 22} 83. Ka6 {+2.95/19 31} Kd6
{-3.72/19 31} 84. Nc8+ {+2.95/18 31} Kd7 {-3.88/19 35} 85. Na7
{+2.95/17 18} Qd5 {-3.91/19 26} 86. Rh2 {+2.95/17 19} Ra1+ {-3.83/19 37}
87. Kb6 {+2.95/18 25} Rb1+ {-3.81/20 27} 88. Ka5 {+2.95/19 22} Ra1+
{-3.82/19 20} 89. Kb4 {+2.95/19 32} Rb1+ {-3.84/18 21} 90. Ka4
{+2.95/16 22} Kc7 {-3.92/18 32} 91. Rh5 {+3.65/15 17} Qc4 {-4.86/18 36} 92.
Ba3 {+3.65/17 33} Rb6 {-5.02/18 19} 93. Rh7+ {+3.75/17 33} Kb8
{-5.06/18 20} 94. Ka5 {+3.94/17 20} Rb1 {-5.06/18 43} 95. Nc6+
{+4.01/16 23} Kc8 {-5.00/18 21} 96. Rh5 {+4.07/17 19} d3 {-4.93/18 27} 97.
Rc5 {+4.13/16 25} d2 {-4.95/20 40} 98. Rxc4 {+4.18/17 35} Kd7 {-5.34/18 26}
99. Nb4 {+4.70/16 30} Ke6 {-5.55/18 25} 100. Rd4 {+4.73/17 29} d1=Q
{-5.66/20 24} 101. Rd2 {+4.76/16 22} Kf5 {-5.77/20 28} 102. Ka4
{+4.78/16 23} Kg4 {-5.80/20 29} 103. Nd5 {+4.78/16 25} Qxc2 {-5.71/20 44}
104. Rxc2 {+4.80/15 23} Kf5 {-5.74/20 32} 105. Re2 {+4.83/15 23} Rb7
{-5.81/19 23} 106. Bc5 {+4.83/15 31} Rb8 {-5.70/18 22} 107. Nc3
{+4.85/14 23} Kf4 {-5.74/20 25} 108. Re4+ {+4.86/15 35} Kf5 {-5.73/21 28}
109. Re7 {+4.87/17 35} Rb2 {-5.73/20 34} 110. Ka3 {+4.88/16 22} Rb6
{-5.73/20 25} 111. Ka2 {+4.88/17 44} Rb8 {-5.73/19 43} 112. Be3
{+4.87/17 44} Kf4 {-5.71/21 29} 113. Nd5+ {+4.87/15 22} Kf5 {-5.67/20 21}
114. Ka3 {+4.88/18 47} Rb1 {-5.68/20 25} 115. Nc3 {+4.88/17 28} Rb8
{-5.69/21 23} 116. Ne4 {+4.88/17 45} Kf4 {-5.63/20 41} 117. Bc5
{+4.88/17 32} Rb5 {-5.65/20 23} 118. Ka2 {+4.88/18 56} Rb8 {-5.70/21 51}
119. Nd6 {+4.88/17 35} Rb6 {-5.70/21 41} 120. Rf7+ {+4.88/17 1:07} Kg3
{-5.72/21 22} 121. Ne4+ {+4.88/15 17} Kg4 {-5.66/20 27} 122. Ka3
{+4.89/15 30} Rb1 {-5.64/20 28} 123. Nf2+ {+4.89/16 21} Kg3 {-5.72/21 27}
124. Nd3 {+4.89/16 20} Rb8 {-5.71/20 1:04} 125. Ne5 {+4.89/16 26} Rb5
{-5.63/22 31} 126. Nd7 {+4.89/16 20} Rb1 {-5.70/21 19} 127. Ka2
{+4.89/16 19} Rb4 {-5.70/20 22} 128. Nf8 {+4.89/16 20} Rb5 {-5.75/21 38}
129. Ne6 {+4.89/17 33} Rb4 {-5.68/20 25} 130. Ng5 {+4.89/16 17} Rb5
{-5.67/21 27} 131. Ka3 {+4.89/16 28} Kg4 {-5.65/21 28} 132. Ne6
{+4.88/17 25} Rb6 {-5.66/21 22} 133. Nf4 {+4.89/17 34} Rb8 {-5.65/22 45}
134. Ng6 {+4.88/17 34} Kg5 {-5.71/22 30} 135. Nf8 {+4.89/17 18} Rb1
{-5.77/21 36} 136. Ka2 {+4.89/16 32} Rb5 {-5.77/20 20} 137. Ne6+
{+4.81/14 44} Kh4 {-5.70/20 20} 138. Rd7 {+4.87/15 48} Rb6 {-5.65/21 44}
139. Nf4 {+4.70/13 26} Kg4 {-5.61/20 33} 140. Nd3 {+4.35/13 43} Kf5
{-5.69/21 37} 141. Ka3 {+4.07/12 41} Ke6 {-5.69/20 27} 142. Rh7
{+3.67/12 26} Kd5 {-5.68/20 48} 143. Nb4+ {+3.55/12 27} Kxc5 {-4.67/23 32}
{... and after another 99 moves, 49 to give away the Knight, then 50 for the rule to kick in: Xboard adjudication: 50-move rule} 1/2-1/2

But even if the position is a draw, what bemuses me is the fact that having failed to win within 50 moves with the 3 pieces, Sjaak seems to believe it is still worth trying to do so with a piece less. At best, it leads to a long draw, but at worst, it can lead to losing a drawn game, after giving up too much material. See the game I posted earlier where Tiyaga got put under pressure (though still held the draw), or there has been games by Nakamura against chess engines where he sets up a fortress and then waits for the engine to do unwise advances in order to avoid a 50-move draw.

For comparison, I copied and pasted the position, and had Tiyaga play the offense against ShaMax, and Tiyaga managed to win, but not within the 50-move rule. (I.e. it was making progress, but I had to manually copy & paste the position and change the move count once along the way, otherwise, it did run into the 50-move rule.)

[Event "Edited game"]
[Site "ENHORNING"]
[Date "2013.03.03"]
[Round "-"]
[White "Tiyaga v1.0"]
[Black "ShaMax 4.8S"]
[Result "*"]
[Variant "shatranj"]
[FEN "8/8/8/3N4/K5k1/B7/2R5/1r6 b 0 1"]
[SetUp "1"]
1... Kf5 {-5.64/16 15} 2. Re2 {+9.99/19 50} Kg4 {-5.78/17 22} 3. Re5
{+10.07/20 48} Kg3 {-5.71/17 23} 4. Bc5 {+10.07/19 29} Kg4 {-5.65/18 24} 5.
Be3 {+10.06/20 29} Rb8 {-5.64/20 38} 6. Re8 {+10.06/21 32} Rb7
{-5.65/20 23} 7. Rf8 {+10.06/20 29} Kh5 {-5.67/19 23} 8. Rg8 {+10.07/20 43}
Rb2 {-5.66/20 20} 9. Ne7 {+10.14/21 28} Kh4 {-5.69/22 25} 10. Nf5+
{+10.13/20 28} Kh3 {-5.65/23 18} 11. Rg5 {+10.13/21 28} Rb7 {-5.63/22 17}
12. Rg1 {+10.13/22 26} Rb6 {-5.63/22 16} 13. Rg3+ {+10.14/22 29} Kh2
{-5.64/24 25} 14. Rg8 {+10.13/22 29} Kh3 {-5.58/23 25} 15. Bc5
{+10.14/22 29} Rf6 {-5.63/21 38} 16. Rg3+ {+10.15/22 29} Kh2 {-5.64/21 27}
17. Rf3 {+10.17/23 30} Rb6 {-5.62/20 17} 18. Ne3 {+10.17/22 23} Rb8
{-5.60/20 19} 19. Nd5 {+10.17/21 28} Kg2 {-5.61/20 17} 20. Rb3
{+10.18/19 32} Rd8 {-5.66/20 26} 21. Nf4+ {+10.20/20 30} Kf2 {-5.67/21 36}
22. Kb5 {+10.21/21 28} Rg8 {-5.65/20 23} 23. Kc6 {+10.22/19 29} Rd8
{-5.63/21 30} 24. Ne6 {+10.22/19 29} Rd2 {-5.64/21 21} 25. Rh3
{+10.22/21 25} Rd1 {-5.64/22 16} 26. Re3 {+10.21/20 29} Rd2 {-5.65/22 18}
27. Ra3 {+10.22/21 23} Rd1 {-5.64/23 27} 28. Rh3 {+10.21/20 29} Ke2
{-5.65/22 26} 29. Re3+ {+10.21/20 29} Kf2 {-5.66/24 1:02} 30. Kb5
{+10.21/20 29} Rg1 {-5.68/21 21} 31. Kc4 {+10.21/20 27} Rg4+ {-5.64/21 17}
32. Kd5 {+10.22/19 29} Rg8 {-5.61/22 21} 33. Re5 {+10.26/19 29} Rh8
{-5.61/21 22} 34. Rf5+ {+10.25/19 29} Kg3 {-5.61/22 28} 35. Ke4
{+10.25/19 29} Re8 {-5.61/22 17} 36. Rg5+ {+10.25/20 29} Kf2 {-5.61/23 26}
37. Kd5 {+10.25/20 29} Ke2 {-5.61/21 21} 38. Re5+ {+10.33/19 25} Kd2
{-5.63/22 29}
{Copied, edited, and pasted to reset move-counter}
[Event "Computer Chess Game"]
[Site "ENHORNING"]
[Date "2013.03.03"]
[Round "-"]
[White "Tiyaga v1.0"]
[Black "ShaMax 4.8S"]
[Result "1-0"]
[TimeControl "40/1200"]
[Variant "shatranj"]
[FEN "4r3/8/4N3/2BKR3/8/8/3k4/8 w 0 1"]
[SetUp "1"]
1. Nc7 {+11.63/20} Rf8 {-5.58/18 16} 2. Nb5 {+319.79/24 27} Ra8
{-5.59/17 18} 3. Kc4 {+319.83/24 44} Ra4+ {-79.92/22 19} 4. Kb3
{+319.85/24 29} Rf4 {-79.93/23 28} 5. Nc3 {+319.87/24 23} Rf8
{-79.94/24 27} 6. Kc4 {+319.89/23 29} Rc8 {-79.95/28 15} 7. Re2+
{+319.91/26 27} Kc1 {-79.96/28 0.1} 8. Kb3 {+319.93/7 0.1} Rb8+
{-79.97/28 0.1} 9. Ka2 {+319.95/5 0.1} Ra8+ {-79.98/28 0.1} 10. Ba3+
{+319.97/5 0.1} Rxa3+ {-79.99/28 0.1} 11. Kxa3# {+319.99/4 0.1}
{Xboard adjudication: Stalemate} 1-0

Which makes me wonder - do engines like Tiyaga and Sjaak and others who are aware of the 50-move rule just always assume that it is 50 moves? Or do they actually get told by Winboard what the Winboard adjudication setting is? For variants with slow-moving pieces, e.g. Courier, Makruk and Shatranj, one could certainly make the argument that more moves should be allowed - this game here is one case where winning took longer, and I've seen it several times in Zillions games as well.

I also had another case where I manually adjudicated a game (as one of the engines had stopped responding, or was taking extraordinarily long for its move - it was over 7 hours out of time) through the Action dropdown menu, and the game did not get written to the tournament's pgn-file. So, that occasional bug is still there in 4.7.0.
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

The second encounter between the two top programs (Nebiyu and Tiyaga) ended once again in one win for Tiyaga and one draw.

In the winning game, Tiyaga thought it had a clear advantage (+2 to +3) for quite some time, but fumbled around shuffling pieces back and forth, before coming into this nice attack, which Nebiyu remained clueless about for surprisingly long:

74. Rga8 +3.48/21 ... Kc6 +0.50/26
75. Qd8 +5.08/22 ... Rd7 +0.40/28

... Nebiyu still seems perfectly oblivious to how dangerous things are becoming around its King!
[d]R2Q4/3r4/1pk1q1pr/3p1pBp/3P2bP/2PB2PK/R7/8 w 53 76
76. Rc8+ +6.32/22 ... Kb7 -2.40/27

and first now, Nebiyu sees what trouble it is in...

77. Raa8 +7.38/23 ... Be2 -3.00/25
78. Rcb8+ +7.40/25 ... Kc6
79. Ra6 +7.43/25 ... Rb7 -3.10/30
80. Rc8+ +7.43/26 ... Kd6 -3.25/31
81. Raa8 +7.40/24 ... Rhh7 -3.20/29
82. Qe7+ +7.41/22
[d]R1R5/1r2Q2r/1p1kq1p1/3p1pBp/3P3P/2PB2PK/4b3/8 b 66 82
... and Nebiyu is forced to give up one of its Rooks in order to avoid mate, after which the game is won in fairly short order (another 30 moves) by Tiyaga. Full game below:

[Event "Computer Chess Game"]
[Site "ENHORNING"]
[Date "2013.03.03"]
[Round "21"]
[White "Tiyaga v1.0"]
[Black "NebiyuChess_1.43"]
[Result "1-0"]
[TimeControl "40/1200"]
[Variant "shatranj"]
[FEN "rnbkqbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBKQBNR w 0 1"]
[SetUp "1"]

1. Bd3 d6 {+0.05/24 23} 2. Nc3 {+0.13/21 33} Nf6 {+0.05/24 22} 3. e3
{+0.17/20 48} d5 {+0.05/24 29} 4. f3 {+0.22/19 44} Nc6 {+0.05/24 29} 5. f4
{+0.11/19 29} g6 {+0.05/21 25} 6. Nf3 {+0.10/18 29} Be6 {+0.05/21 29} 7.
Ne5 {+0.15/18 51} Rc8 {+0.15/22 22} 8. Ba3 {+0.35/17 28} Nxe5 {+0.30/25 29}
9. fxe5 {+0.06/20 6} Nd7 {+0.30/24 29} 10. Nxd5 {+0.00/22 29} Nxe5
{+0.25/24 29} 11. Nc3 {+0.00/21 45} b6 {+0.30/23 29} 12. Bc1 {+0.00/20 43}
Bd6 {+0.30/23 29} 13. a3 {+0.16/19 41} Rg8 {+0.30/22 28} 14. b3
{+0.12/19 35} c6 {+0.30/23 28} 15. a4 {+0.14/19 37} f6 {+0.30/22 24} 16. a5
{+0.15/19 35} Rg7 {+0.25/20 27} 17. axb6 {+0.44/19 33} axb6 {+0.35/19 7}
18. Ra7 {+0.26/19 32} Qd7 {+0.40/22 31} 19. Qf2 {+0.31/19 30} c5
{+0.40/19 31} 20. Rf1 {+0.61/16 29} c4 {+0.30/18 27} 21. bxc4 {+0.45/18 27}
Nxc4 {+0.40/21 25} 22. Bb5 {+0.53/17 26} Qc6 {+0.25/22 28} 23. e4
{+0.59/16 26} Rf7 {+0.20/19 29} 24. d3 {+0.84/16 26} Na5 {+0.00/21 27} 25.
d4 {+1.02/17 26} f5 {+0.00/21 26} 26. e5 {+1.36/17 26} Nc4 {+0.05/21 34}
27. exd6 {+1.42/18 26} Nxd6 {+0.00/22 27} 28. Bd3 {+1.43/20 26} Qb7
{+0.00/22 34} 29. Nb5 {+1.64/17 26} Rc4 {+0.10/24 35} 30. Nxd6
{+1.56/19 26} exd6 {+0.10/25 32} 31. Qe3 {+1.57/18 26} d5 {+0.10/24 35} 32.
g3 {+1.65/18 26} h6 {+0.10/22 35} 33. h3 {+1.68/17 26} h5 {+0.15/23 35} 34.
Ra3 {+1.79/17 26} Kc7 {+0.20/24 36} 35. c3 {+2.05/18 26} Qc6 {+0.45/21 33}
36. Qf4 {+2.32/19 26} Qb7 {+0.45/23 35} 37. Qe5 {+2.31/19 26} Kd7
{+0.50/21 29} 38. Rf2 {+2.23/18 26} Qc8 {+0.60/22 33} 39. Re2 {+2.29/18 26}
Rc7 {+0.45/23 42} 40. Rb2 {+2.55/20 34} Kc6 {+0.50/25 56} 41. Ra6
{+2.36/20 34} Rb7 {+0.45/26 28} 42. Be3 {+2.33/20 39} Rg7 {+0.45/21 21} 43.
Kc1 {+2.25/20 54} Bc4 {+0.45/25 29} 44. Ra8 {+1.94/22 32} Qd7 {+0.45/24 24}
45. Rb1 {+2.43/18 50} Qe6 {+0.35/23 29} 46. Rba1 {+2.29/18 28} Rbd7
{+0.45/22 29} 47. Qf4 {+2.24/18 49} Rde7 {+0.35/23 29} 48. Kd2
{+2.22/19 35} Rc7 {+0.40/24 27} 49. h4 {+2.36/17 27} Rcd7 {+0.40/23 23} 50.
Ke1 {+2.55/20 30} Rb7 {+0.45/24 29} 51. Kf2 {+2.66/18 27} Rh7 {+0.50/25 29}
52. Kg2 {+2.60/20 41} Be2 {+0.40/22 27} 53. Qe5 {+2.73/18 33} Bg4
{-1.05/22 30} 54. R1a3 {+2.63/17 37} Be2 {-1.40/23 30} 55. Bg5
{+2.73/19 35} Bc4 {-1.25/22 24} 56. Ra1 {+2.73/19 26} Rbf7 {+0.85/21 31}
57. Be3 {+2.68/19 26} Rc7 {-1.15/21 23} 58. Kh3 {+2.67/19 31} Rb7
{+0.40/22 24} 59. Bg5 {+2.64/19 29} Rhg7 {+0.45/24 31} 60. Qf6
{+2.77/20 28} Rgf7 {+0.70/24 31} 61. Qe7 {+2.83/23 26} Rg7 {+0.65/25 25}
62. Rf8 {+3.04/20 25} Be2 {+0.50/25 30} 63. Ra6 {+2.97/20 20} Bg4
{+0.55/26 27} 64. Rc8+ {+2.99/19 25} Rc7 {+0.40/27 32} 65. Rb8
{+3.00/21 25} Rb7 {+0.50/28 32} 66. Rba8 {+3.00/19 25} Rh7 {+0.40/25 32}
67. Rc8+ {+3.25/20 25} Rc7 {+0.55/30 31} 68. Rb8 {+3.21/21 25} Rb7
{+0.55/27 32} 69. Rg8 {+3.22/22 25} Rh6 {+0.80/27 25} 70. Ra2 {+3.24/20 25}
Rc7 {+0.55/25 25} 71. Rb8 {+3.24/21 25} Rb7 {+0.50/26 34} 72. Rf8
{+3.24/20 22} Rc7 {+0.70/27 34} 73. Rg8 {+3.19/20 26} Kb7 {+0.55/26 30} 74.
Rga8 {+3.48/21 21} Kc6 {+0.50/26 36} 75. Qd8 {+5.08/22 26} Rd7
{+0.40/28 36} 76. Rc8+ {+6.32/22 26} Kb7 {-2.40/27 48} 77. Raa8
{+7.38/23 26} Be2 {-3.00/25 33} 78. Rcb8+ {+7.40/25 26} Kc6 79. Ra6
{+7.43/25 26} Rb7 {-3.10/30 52} 80. Rc8+ {+7.43/26 34} Kd6 {-3.25/31 56}
81. Raa8 {+7.40/24 27} Rhh7 {-3.20/29 22} 82. Qe7+ {+7.41/22 30} Rhxe7
{-3.20/28 23} 83. Bxe7 {+7.50/22 8} Kxe7 {-3.25/28 29} 84. Rab8
{+7.45/23 30} Rxb8 {-3.25/29 28} 85. Rxb8 {+7.44/25 3} Bc4 {-3.65/33 29}
86. Rxb6 {+7.86/28 32} Kf6 {-3.85/35 29} 87. Kg2 {+8.03/31 47} Be2
{-4.00/35 26} 88. Kf3 {+9.02/27 26} Bg4 {-4.15/36 25} 89. Rb5 {+9.38/29 28}
Ke7 {-4.30/36 25} 90. Kf4 {+10.14/28 28} Kf6 {-4.30/34 30} 91. Rb2
{+10.50/27 45} Qd7 {-5.05/36 30} 92. Bxf5 {+11.21/27 30} Qe6 {-5.25/36 23}
93. Bd3 {+11.64/27 30} Qf7 {-5.30/38 30} 94. Ra2 {+12.36/25 32} Qe6
{-5.50/37 30} 95. Rc2 {+12.49/27 26} Qf7 {-5.40/38 26} 96. c4
{+12.56/25 35} dxc4 {-5.55/39 30} 97. Rxc4 {+12.56/22 4} Qe6 {-5.60/37 47}
98. Rc6 {+14.45/26 29} Kg7 {-6.00/37 30} 99. Kg5 {+18.29/25 27} Qf7
{-7.25/36 25} 100. d5 {+319.74/27 32} Be2 {-8.45/36 34} 101. Rc7
{+319.78/26 33} Bg4 {-10.25/32 30} 102. Re7 {+319.80/26 32} Kf8
{-299.81/34 30} 103. Kf6 {+319.82/24 32} Qe8 {-299.81/35 24} 104. Rc7
{+319.84/22 32} Kg8 {-299.83/35 30} 105. Rc8 {+319.86/21 32} Kf8
{-299.85/33 30} 106. d6 {+319.88/19 32} Be6 {-299.87/31 31} 107. Ra8
{+319.90/17 32} Bc8 {-299.89/30 31} 108. Rxc8 {+319.93/10 0.1} Kg8
{-299.91/29 31} 109. Rxe8+ {+319.93/5 0.1} Kh7 110. d7 {+319.95/5 0.1} g5
{-299.95/28 29} 111. Bf5+ {+319.97/5 0.1} Kh6 112. hxg5# {+319.99/5 0.1}
{Xboard adjudication: Checkmate} 1-0
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 even if the position is a draw, what bemuses me is the fact that having failed to win within 50 moves with the 3 pieces, Sjaak seems to believe it is still worth trying to do so with a piece less. At best, it leads to a long draw, but at worst, it can lead to losing a drawn game, after giving up too much material.
Of course, but look at it from the machine's point of view: the position is a draw, but it doesn't know that, so it thinks it's "ahead" because of the material on the board. On the approach to the 50-move draw, it will see the score dropping to 0, so it starts to look for ways to make progress, and it finds it: by trying to sacrifice a piece, the 50-move counter resets and if it's still "better" (ahead in material) it will go for it. Yes, it's stupid, but it's hard to see how to avoid it. Even putting in the knowledge that the position is probably drawn (based on the material combination) only helps so much because the program will still shuffle its pieces around the board for 50 moves. I'd prefer it if it went for the quick three-fold repetition instead...

The question is though: why would the other program accept the sacrifice? It's still "behind" and so is worse off than when it accepts the 50-move draw...
See the game I posted earlier where Tiyaga got put under pressure (though still held the draw), or there has been games by Nakamura against chess engines where he sets up a fortress and then waits for the engine to do unwise advances in order to avoid a 50-move draw.
I think this is an unsolved problem...
Which makes me wonder - do engines like Tiyaga and Sjaak and others who are aware of the 50-move rule just always assume that it is 50 moves? Or do they actually get told by Winboard what the Winboard adjudication setting is? For variants with slow-moving pieces, e.g. Courier, Makruk and Shatranj, one could certainly make the argument that more moves should be allowed - this game here is one case where winning took longer, and I've seen it several times in Zillions games as well.
Sjaak currently has 50 moves hard-coded, but there's no reason I couldn't make that configurable for different variants.
In fact, it's (much) more complicated in a game like Makruk, where the limit depends on the amount of material on the board (so you'd better make sure you know how to mate KRK in at most 16 moves). Sjaak doesn't implement that either (and this would be hard to do).
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

Evert wrote:In fact, it's (much) more complicated in a game like Makruk, where the limit depends on the amount of material on the board (so you'd better make sure you know how to mate KRK in at most 16 moves).
... None of the online servers where I've played Makruk has implemented the endgame move counting either, so I generally ignore it (and therefore would prefer if whatever programs I used to analyze my games ignored it as well). Sure, it might be the original rules, but if it isn't actually used when playing against other humans, it doesn't have all that much value for me - perhaps they do use the traditional move counting rules in Thailand, but on the more international server I tend to play on, they're ignored. Nothing wrong with rules evolving and changing, after all.

(But then, I am one of those people who wishes that western Chess would get rid of some of the awkward corner cases... make the objective of the game to actually capture the King, for a start, and get rid off the check / checkmate / stalemate concepts! And en-passant is a ludicrous historical vestige, in my view, with many inconsistencies.)

Similar for XiangQi - the servers where I've played against other humans on either ignore the anti-repetition rules (more common), or implements a much simplified version of them (less common)... which is fine with me - if I was playing against another human OTB, I would never bother with the full detail of them (and I don't think I understand the full rules either - from what I've read, high-level players have at times had to rely on the judgement call of referees to interpret them).

Then again, I only play all these variants on a fairly casual level...
User avatar
hgm
Posts: 28441
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess variant tournament: Shatranj

Post by hgm »

WinBoard does not tell the adjudication setting to the engines. The main reason this setting is user-configurable is that it might be different for different variants, and the engine is supposed to know what it is for the variant it is playing. If anything, the engine should tell it to the GUI. But in practice it is very convenient that you can set it slightly different from the nominal value, like to 51 moves, to test if engines properly claim, while still not allowing games to drag on forever.

IMO the solution to the 50-move problem is to have the engine ignore it altogether. My claim has always been that making the engine aware of it only makes it weaker. Paarently Nakamura has made an art of exploiting this weakness (which I call '50-move blackmail'). So none of my engines is aware of the 50-move rule. This is of course also why ShaMax accepts the sacrifice.

There is no better evidence than that a situation is equal than that you were not able to make any progress in 50 moves. If your evaluation says +10 in that case, that only tells you that your evaluation is off by 10, not that you are 'ahead' in any meaningful sense. Sacrificing something to save this imagined lead often leads to actually creating a losing position.

The problem is that some engines are unusually passive, and don't try to make any progress when left pursuing maximum score. This is an indication something is badly wrong in their eval. Such engines then can need the 50-move rule to be 'flogged into action'. E.g. they won't ever push any Pawn unless refraining from doing so would make them recognize a 50-move draw. When the Pawns can easily promote in such a case, it will eventually get the promotion withing the horizon.

In Joker I change the Pawn piece-square table to get a greater gradient for advance after 30 reversible moves. So that initially it can be conservative with its Pawns, and try to make progress with its pieces. If it somehow does not manage to gain any material that way, it puts more emphasis on advancing its Pawns. If it can do it without losing them, that is. This leads to much more natural play. And even my other engines don't suffer from laziness, but have an evaluation that encourages them to make progress even without knowing about the 50-move rule. So they can be sure that after 50 moves of non-progress, sacrificing something would be the worst idea.

What could also help is taper scores linearly or quadratically (like (1 - N^2/2500)) towards zero, as N increases.
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

hgm wrote:IMO the solution to the 50-move problem is to have the engine ignore it altogether.
I whole-heartedly agree. Perhaps one could make a case for FIDE chess engines to not ignore it, as it is an established rule (though, as far as I know, it's the rule that has been changed about most recently - they went through a period of allowing longer for certain endgames, then went back to a flat 50 moves, and even when engines know it, I have seen little evidence that it makes them stronger - they'll break fortress-type positions more frequently... sometimes to their advantage, other times not!).

But for variants, where there is no tradition of such a rule, I think it should definitely be left up to a user-adjusted adjudication setting in the GUI. Next tournament with a slower variant, I might try running with a different value, and see if any engines get mightily confused by that!
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: ... None of the online servers where I've played Makruk has implemented the endgame move counting either, so I generally ignore it (and therefore would prefer if whatever programs I used to analyze my games ignored it as well). Sure, it might be the original rules, but if it isn't actually used when playing against other humans, it doesn't have all that much value for me - perhaps they do use the traditional move counting rules in Thailand, but on the more international server I tend to play on, they're ignored. Nothing wrong with rules evolving and changing, after all.
Sure. I'm not saying the original rules are better (too many rules to handle specific situations is bad), but it is interesting. It does mean you need to know how to play KRK (for instance) well because if you mess up you may be over the draw-limit. Then again, if the result is that every mate against a bare king becomes as annoying as KBNK in regular chess (don't mess up or you go risk going over the 50 move limit) and that players don't resign in lost positions (because you may mess up mating their lone king and they can claim a draw) it doesn't improve the game.
(But then, I am one of those people who wishes that western Chess would get rid of some of the awkward corner cases... make the objective of the game to actually capture the King, for a start, and get rid off the check / checkmate / stalemate concepts!
Other than making stalemate a win, does that have any practical consequences?
And en-passant is a ludicrous historical vestige, in my view, with many inconsistencies.)
It is, by far, the most annoying rule to implement in a chess program - especially considering how little it actually adds to the game.
Similar for XiangQi - the servers where I've played against other humans on either ignore the anti-repetition rules (more common), or implements a much simplified version of them (less common)...
I would definitely go with simplified (there's different sets of XiangQi rules too, some are easier than others), although not as stupid as Sjaak. Anything more complicated than "simplified" takes too much time to adjudicate in the search anyway...

As far as I know the problem is that without that rule many games would end by repetition draw (since it's easy to get into a position like that, apparently). As a way of "fixing" the game goes, it's not particularly elegant though...
enhorning
Posts: 342
Joined: Wed Jan 05, 2011 10:05 pm

Re: Chess variant tournament: Shatranj

Post by enhorning »

Evert wrote:
enhorning wrote: (But then, I am one of those people who wishes that western Chess would get rid of some of the awkward corner cases... make the objective of the game to actually capture the King, for a start, and get rid off the check / checkmate / stalemate concepts!
Other than making stalemate a win, does that have any practical consequences?
One can Castle out of and through "Check" (which is the way Extinction chess, and some rule-sets for Atomic chess work).

Standings after 112 games, 2 cycles out of 6:

Code: Select all

Cross table, sorted by score percentage, Buchholz, SB

                              Tiya Nebi ShaM Sjaa Puls HaCh Ches Dabb
 1. Tiyaga v1.0               #### 1=1= 1=1= 1111 =111 1111 1111 1111   91%  25.5 (346.0, 299.0)
 2. NebiyuChess_1.43          0=0= #### 1==1 1111 1111 1111 1111 1111   86%  24.0 (352.0, 257.5)
 3. ShaMax 4.8S               0=0= 0==0 #### 1==1 ==1= 1111 11=1 11==   64%  18.0 (376.0, 190.8)
 4. Sjaak 524                 0000 0000 0==0 #### 1011 111= =1=1 1111   52%  14.5 (390.0, 116.0)
 5. Pulsar2009-9b             =000 0000 ==0= 0100 #### ==== ==== 11==   36%  10.0 (408.0,  97.8)
 6. HaChu 0.5beta             0000 0000 0000 000= ==== #### =1== 1111   32%   9.0 (412.0,  60.0)
 7. ChessV_WinBoard           0000 0000 00=0 =0=0 ==== =0== #### 011=   27%   7.5 (418.0,  65.8)
 8. Dabbaba 6.52 JA           0000 0000 00== 0000 00== 0000 100= ####   12%   3.5 (434.0,  39.3)
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Chess variant tournament: Shatranj

Post by Evert »

hgm wrote: IMO the solution to the 50-move problem is to have the engine ignore it altogether. My claim has always been that making the engine aware of it only makes it weaker. Paarently Nakamura has made an art of exploiting this weakness (which I call '50-move blackmail'). So none of my engines is aware of the 50-move rule. This is of course also why ShaMax accepts the sacrifice.

There is no better evidence than that a situation is equal than that you were not able to make any progress in 50 moves. If your evaluation says +10 in that case, that only tells you that your evaluation is off by 10, not that you are 'ahead' in any meaningful sense. Sacrificing something to save this imagined lead often leads to actually creating a losing position.
That depends on the quality of the evaluation, of course. If it recognises the losing position as such, the program won't trade into it and accept the 50 move draw.

I tend to look at it differently: if a branch leads to a draw by 50-move rule, I like to prune it and explore branches that avoid it, in case there's a winning path there. I haven't tested this much, but I suspect it doesn't really help in practice since by the time the 50-move draw is within the horizon it may already be too late to do anything about it...
In Joker I change the Pawn piece-square table to get a greater gradient for advance after 30 reversible moves. So that initially it can be conservative with its Pawns, and try to make progress with its pieces. If it somehow does not manage to gain any material that way, it puts more emphasis on advancing its Pawns. If it can do it without losing them, that is. This leads to much more natural play.
Interesting idea. I may test that out. :)
What could also help is taper scores linearly or quadratically (like (1 - N^2/2500)) towards zero, as N increases.
Oh, I do that of course, but it doesn't help in this case: at some point the score of KERKR will be above the reduced score of KENRKR, and it will be preferable to sacrifice the knight.

I wonder if Sjaak considers EN to be a mating pair. If it does it probably thinks KENRKR is winning (white has a mate potential of 2, black has only one piece, so trading down results in a won position). It should still recognise KERKR or KBRKR as "draw-ish" though.