pre-announcement: 10x8 tourney

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: pre-announcement: 10x8 tourney

Post by Evert »

hgm wrote:Yes, the 4.8R (and also 4.8Q) so support Spartan as independent variant. (And 4.8R also Cambodian Ouk and Falcon Chess!)
Where is it?
I downloaded the version from http://home.hccnet.nl/h.g.muller/CVfairy.html, which is indeed different from the one I had (didn't look at how it is different), but the fmax.ini is actually the same as the one I had.
Ouk looks similar enough to Makruk that it shouldn't be that hard to implement. The special initial steps for the King and the queen are probably the most tricky, since I think I only implemented "special moves" for pawn-type pieces. Easy to fix, but not high on my list of things to do.
Is Falcon chess interesting? I looked at it a long while back and again recently, and I can't make heads or tails from the description given on chessvariants.org. The Falcon looks like a much too complicated piece to fit into Sjaak's description of how a piece moves, but maybe it just seems that way because I don't understand how it's supposed to work.
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pre-announcement: 10x8 tourney

Post by hgm »

I guess I have too many obsolete pages on my website. The most recent sources are in my on-line repository.

The release announcement with links to some binaries is here: http://www.talkchess.com/forum/viewtopic.php?t=40667 .

The Falcon was a funny idea: it is basically a lame leaper, like the Xiangqi Horse or Elephant: unlike a Knight a Horse goes from b1 to c3 over b2, and cannot make the move when b2 is not empty. Although it can never go from b1 to b2 even if it is empty. The Falcon, however, is a multi-path lame leaper: it needs a clear path to its destination, but several paths lead to the same desitnation. With the Xiangqi Horse (Mao in Chinese) there exists an alternative (the 'Moa') that moves from b1 to c3 over c2, rather than b2, and a multi-path variant ('Moo') that could do both, and so only would be blocked when both b2 and c2 are occupied. The Falcon has 3 paths to any destination: b1-b2-b3-c4 or b1-b2-c3-c4 or b1-c2-c3-c4 for a (1,3) move, and b1-c2-d3-d4 or b1-c2-c3-d4 or b1-b2-c3-d4 for a (2,3) move. So it is pretty adept as slithering through enemy lines. It needed some special code in Fairy-Max to implement it, and it would make a nightmare out of pin detection in egines smart enough to have that.

In practice it is not a very exciting game, though. The Falcon is about as valuable as a Rook, perhaps slightly less. So it is not nearly so tactical as Capablanca variants.

As to Ouk: basically the initial moves are like double pawn pushes (without e.p. captures, like in Spartan Chess). In Fairy-Max I had to slightly adapt the code, because it assumed that such a special initial move of a royal piece would always be a castling,and would move the corner piece. So it now more generally separates initial moves with e.p. rights (under which the castling is grouped) from those without, not based on royalty but on the move-rights code, like it already did for Pawns.
Ferdy
Posts: 4850
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: pre-announcement: 10x8 tourney

Post by Ferdy »

hgm wrote:Well, it is questionable how important King Safety is when you still have two Kings. Leaving one King exposed to capture by R or Q, protecting it rather than moving it away is a quite common strategy for the Spartans, as the extra King seems to be worth slightly less than a Rook. A good way to calculate King safety could be to calculate the safety of both Kings like it was the only King, and then take the best of the two, possibly giving a bonus if the other one is also quite safe (like you would evaluate castling rights when you can still castle both ways). And perhaps giving a small penalty when the unsafest King is actually attacked.

The fact that you have a second King already provides a lot of King safety in itself. But this is of course incorporated in the piece value of the King, which is nearly 2 Pawns higher than it would be based on its tactical merits. KQKK with connected Spartan Kings is a draw. (Far-apart Kings are toast, of course, to a Queen.)
Interesting, I am creating now piece square tables for spartan pieces, a different table for kings when there are still 2 kings. After this I will go for pawn/hoplite structure and passer evaluation.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: pre-announcement: 10x8 tourney

Post by Evert »

hgm wrote:I guess I have too many obsolete pages on my website. The most recent sources are in my on-line repository.
:)
It's where google sent me.
The Falcon was a funny idea: it is basically a lame leaper, like the Xiangqi Horse or Elephant: unlike a Knight a Horse goes from b1 to c3 over b2, and cannot make the move when b2 is not empty. Although it can never go from b1 to b2 even if it is empty. The Falcon, however, is a multi-path lame leaper: it needs a clear path to its destination, but several paths lead to the same desitnation. With the Xiangqi Horse (Mao in Chinese) there exists an alternative (the 'Moa') that moves from b1 to c3 over c2, rather than b2, and a multi-path variant ('Moo') that could do both, and so only would be blocked when both b2 and c2 are occupied.
I actually have both the Mao and the Moa in my Xiangqi engine: one is used for move generation, one is used for check detection (basically, a Moa in the location of the king that can capture a Mao means the king is in check). The way I implemented this is to move as a wazir first and a ferz second for a Mao and the other way around for a Moa. In either case, I only accept squares that a knight could move to. This seemed the easiest way to do this in a bitboard engine. Sjaak has the same thing (but none of its current variants have lame leapers).
Maybe I can do something similar to make a Falcon. Maybe.
The Falcon has 3 paths to any destination: b1-b2-b3-c4 or b1-b2-c3-c4 or b1-c2-c3-c4 for a (1,3) move, and b1-c2-d3-d4 or b1-c2-c3-d4 or b1-b2-c3-d4 for a (2,3) move. So it is pretty adept as slithering through enemy lines. It needed some special code in Fairy-Max to implement it, and it would make a nightmare out of pin detection in egines smart enough to have that.
I can imagine.
In practice it is not a very exciting game, though. The Falcon is about as valuable as a Rook, perhaps slightly less. So it is not nearly so tactical as Capablanca variants.
Hmm... could still be interesting to look at. Is it me or does the guy who invented it seem a bit... odd?
As to Ouk: basically the initial moves are like double pawn pushes (without e.p. captures, like in Spartan Chess). In Fairy-Max I had to slightly adapt the code, because it assumed that such a special initial move of a royal piece would always be a castling,and would move the corner piece. So it now more generally separates initial moves with e.p. rights (under which the castling is grouped) from those without, not based on royalty but on the move-rights code, like it already did for Pawns.
Sjaak should be able to do that with little difficulty if I enable special moves for pieces other than pawns (castling is its own thing entirely). Do I remember correctly that you can't move the king as a knight after it has been checked? That'll be more tricky, since I don't have a rule to keep track of that. I could though, which if done right means I could also implement three-check. Maybe I'll add that to my ever-growing TODO list.

I've done some calibration of piece values for Capablanca, mainly the Archbishop. There seem to be a lot of very different values floating around the Internet (based on some dubious numerology), some as low as 6 or 7 pawns. The optimum for me seems to be about 8.25 though (+/- 0.10) so I'll stick with that.
I also wrote a nice pawn structure evaluation routine, but even with pawn hash it reduced the search depth by 1 or 2 ply, which meant it had to go. I've now pulled most of it into the evaluation in a way that's not nearly as expensive and it seems to help ok, although it's not calibrated yet. One of the neat things about not having passed pawn evaluation though was an end-game of KBNPPPPPK, where instead of queening a pawn Sjaak decided to drive the lone king to a corner and mate it with bishop and knight. :D
Having said that, I've also seen some horrendous games where the score suddenly jumps by over two pawns and then runs away, suggesting the engine just played a horrible blunder. I'll have to track those down.
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pre-announcement: 10x8 tourney

Post by hgm »

Evert wrote:Sjaak should be able to do that with little difficulty if I enable special moves for pieces other than pawns (castling is its own thing entirely). Do I remember correctly that you can't move the king as a knight after it has been checked?
I think that was Chaturanga. Unfortunately the rules of Ouk are not very clear, and various sources seem to contradict each other. In particular there is doubt about whether
*) The King can jump to c3 and e3
*) If he can capture anything with the Knight moves
*) If he can still do it if previously checked, or even when currently checked
*) If the Met jumps directly to e3, or can be blocked
*) If it can be blocked, whether it moves via e2 or (multi-path) via d2/f2
*) If it can capture with this move

Fairy-Max implements it such that the moves are jumps, can capture, all Knight moves are allowed, and check plays no role.
I've done some calibration of piece values for Capablanca, mainly the Archbishop. There seem to be a lot of very different values floating around the Internet (based on some dubious numerology), some as low as 6 or 7 pawns.
Numerology for piece values seldomly works...
Ferdy
Posts: 4850
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: pre-announcement: 10x8 tourney

Post by Ferdy »

hgm wrote:Well, it is questionable how important King Safety is when you still have two Kings. Leaving one King exposed to capture by R or Q, protecting it rather than moving it away is a quite common strategy for the Spartans, as the extra King seems to be worth slightly less than a Rook. A good way to calculate King safety could be to calculate the safety of both Kings like it was the only King, and then take the best of the two, possibly giving a bonus if the other one is also quite safe (like you would evaluate castling rights when you can still castle both ways). And perhaps giving a small penalty when the unsafest King is actually attacked.

The fact that you have a second King already provides a lot of King safety in itself. But this is of course incorporated in the piece value of the King, which is nearly 2 Pawns higher than it would be based on its tactical merits. KQKK with connected Spartan Kings is a draw. (Far-apart Kings are toast, of course, to a Queen.)
I am testing my spartan chess engine vs Fairy-Max 4.8R and there was a False draw claim: 'Stalemate' by Fairy-Max 4.8R. See part of debug below.
Second engine is Fairy-Max 4.8R. This happened in the 2nd game after black's 56th move.

Code: Select all

...
1582087 >second: g1f1
silence
Hply=110, Fifty=2
1582196 <second:  1   -447        0          7 e2d1
1582196 <second:  1   -436        0          9 e2e3
1582196 <second:  2  -1066        0         17 e2e3 f2g1
1582196 <second:  3  -1065        0        115 e2e3 f2g1 e3f4
1582196 <second:  4  -1074        0        174 e2e3 f2g1 e3f4 g1e2
1582196 <second:  4   -932        0        245 e2d1 f2g1
1582196 <second:  5   -932        0        319 e2d1 f2g1
1582196 <second:  6   -932        0        538 e2d1 f2g1
1582196 <second:  7   -932        0       1553 e2d1 f2g1
1582196 <second:  8   -932        0       3117 e2d1 f2g1
1582196 <second:  9   -932        0      13167 e2d1 f2g1
1582196 <second: 10   -932        1      37159 e2d1 f2g1
1582196 <second: 11   -932        6     156569 e2d1 f2g1
1582274 <second: 12   -932       18     466203 e2d1 f2g1
1582540 <second: 13   -926       45    1120657 e2d1 f2g1 e4d2 c4d3 d2f1 g1f3 d1c1 f3e2 c1b1 e2f1 b1a2 f1d2 b2b3
1588733 <second: 14  -1060      664   15491658 e2d1 c4d3 e4g3 h6g5 g3f1 f2f1 d1e1 f1g3 e1d1 g5f4 b2b4 f4e3 d1c1
1588858 <second: move e2d1
machine move 110, castling = 45 0 45 45 45 45
trial 4,2,3,1  type 2121
45 0 45 45 45 45 Legality test? e2d1
45 0 45 45 45 45 Legality test? e2d1
(45,0) (0,0) (45,0) (45,7) (45,7) (45,7) castling rights
CoordsToAlgebraic, piece=21 (4,1)-(3,0) -
TC string = ':40/300'
mps=40 tc=300000 inc=0
mps=40 tc=300000 inc=0
MateTest: K=2, my=5, his=3
move: e2d1
, parse: Kd1 (
)
MateTest: K=2, my=5, his=3
repeat test fmm=111 bmm=0 ep=-4, reps=3
time odds: 1.000000 1.000000 
1588858 >first : time 18693
1588858 >first : otim 17991
book hit = (NULL)
1588858 >first : e2d1
silence
1588967 <first : # 8/8/1h5h/8/2k1N3/8/1P3h2/3K1k2 b - -
1588967 <first : # TimeLeft=186930.00 ms.  MaxTime=9346.00 ms  AllocatedTime=7170.00 ms.
1588967 <first : # ply score  time     nodes Pv line
1588967 <first : # -----------------------------------
1588967 <first :   1  1312      0         30 f2e1g d1c2 e1e4
1588967 <first :   2  1312      0        320 f2e1g d1c2 e1e4
1588967 <first :   3  1307      0       1039 f2e1g d1c2 e1e4 c2d2
1588967 <first :   4  1339      0       1089 f2e1g
1588967 <first :   4  1340      1       4339 f2e1g d1c2 e1e4 c2c1 e4e2
1588967 <first :   5  1370      1       4550 f2e1g (1.0)
1588967 <first :   5  1431      3      14691 f2e1g d1c2 e1e4 c2b1 c4b3 b1c1 b3b2 (2.1)
1588982 <first :   6  1440     12      56576 f2e1g d1c2 e1e4 c2c1 c4b3 c1d2 e4e2 d2c1 b3b2 (4.0)
1588982 <first :   7  1470     12      57834 f2e1g (1.0)
1588982 <first :   7  1570     12      58019 f2e1g (1.0)
1589263 <first :   7  9989     40     201051 f2e1g d1c2 e1e4 c2c1 c4b3 c1d2 e4e2 d2c1 b3b2 c1b1 b2b1 (3.3)
1590215 <first :   8  9989    135     681232 f2e1g d1c2 e1e4 c2c1 c4b3 c1d2 e4e2 d2c1 b3b2 c1b1 b2b1 (3.4)
1593366 <first :   9  9989    450    2308615 f2e1g d1c2 e1e4 c2c1 c4b3 c1d2 e4e2 d2c1 b3b2 c1b1 b2b1 (3.3)
1596034 <first : move f2e1g
machine move 111, castling = 45 0 45 45 45 45
trial 5,2,4,1  type 2121
45 0 45 45 45 45 Legality test? f2e1
45 0 45 45 45 45 Legality test? f2e1
(45,0) (0,0) (45,0) (45,7) (45,7) (45,7) castling rights
CoordsToAlgebraic, piece=40 (5,1)-(4,0) g
TC string = ':40/300'
mps=40 tc=300000 inc=0
mps=40 tc=300000 inc=0
MateTest: K=1, my=3, his=5
move: f2e1g
, parse: He1=G+ (g)
MateTest: K=1, my=3, his=5
repeat test fmm=112 bmm=0 ep=-4, reps=3
time odds: 1.000000 1.000000 
Interrupting second
1596034 >second: time 17991
1596034 >second: otim 17975
book hit = (NULL)
1596034 >second: f2e1g
silence Hply=112, Fifty=0
1596143 <second: 1/2-1/2 {Stalemate}
GameEnds(27, Stalemate, 6)
GE(26, False draw claim: 'Stalemate', 6) bare king k=5 color=22
1596143 >first : result 0-1 {False draw claim: 'Stalemate'}
Interrupting second
1596143 >second: result 0-1 {False draw claim: 'Stalemate'}
...
Test Games.

Code: Select all

[Event "Computer Chess Game"]
[Site "ccc-PC"]
[Date "2011.11.02"]
[Round "1"]
[White "Lawin v0.2.3"]
[Black "Fairy-Max 4.8R"]
[Result "1-0"]
[TimeControl "40/300"]
[Variant "spartan"]
[Annotator "1. +0.29   1... +1.01"]

1. Nf3 {+0.29/16} Lf6 {+1.01/8 4} 2. e3 {+0.33/17 7} Lc6 {+0.95/8 5} 3. Bd3
{+0.29/16 9} Hfg6 {+0.77/8 4} 4. O-O {+0.34/16 11} Hd5 {+0.94/9 8} 5. c4
{+0.47/13 6} Hac5 {+0.93/9 4} 6. b3 {+0.46/13 13} Cd6 {+0.79/9 6} 7. e4
{+0.46/11 7} Cd4 {+1.02/10 5} 8. Qc2 {+0.56/12 5} Cxd3 {+0.95/10 8} 9. Qxd3
{+0.48/12 1.5} Hed6 {+0.93/10 8} 10. cxd5 {+0.54/12 9} Hxd5 {+0.90/11 15}
11. Ba3 {+0.29/13 10} Gb6 {+0.93/10 13} 12. Re1 {+0.58/11 5} Le6
{+1.03/9 8} 13. exd5 {+0.85/12 10} Lcxd5 {+0.98/9 4} 14. b4 {+0.88/13 8}
Hc6 {+0.74/9 5} 15. Qe3 {+0.59/12 8} We7 {+0.63/10 15} 16. d4 {+1.08/11 6}
Wf5 {+0.54/9 9} 17. Qc3 {+0.94/14 6} Gb5 {+0.48/9 5} 18. Nbd2 {+1.24/12 9}
Ga4 {+0.48/9 15} 19. dxc5 {+1.29/11 8} We7 {+0.43/8 4} 20. Rad1
{+1.41/11 6} Hxc5 {+0.55/9 8} 21. Qb2 {+1.32/11 7} Wf5 {+0.58/9 6} 22. Re3
{+1.36/11 7} Lg4 {+0.53/7 5} 23. Rde1 {+1.76/12 7} Lc6 {+0.24/9 9} 24. Nd4
{+1.87/12 7} Wd7 {+0.23/9 4} 25. Ne4 {+1.87/12 7} Lxe4 {+0.24/9 3} 26. Rxe4
{+1.95/11 1.2} Ga6 {-0.02/9 4} 27. bxc5 {+2.02/11 6} Kf7 {-0.51/9 5} 28. h3
{+2.18/12 5} Le6 {-0.68/11 9} 29. Qb3 {+1.96/12 8} Hhf5 {-0.71/10 6} 30. g4
{+2.39/12 8} Gb7 {-0.76/9 4} 31. Bb4 {+3.66/13 6} Kf6 {-1.26/9 4} 32. Nxf5
{+3.40/12 8} Ga6 {-1.59/9 5} 33. Bc3 {+4.11/12 8} Hce5 {-2.22/10 5} 34. Nd6
{+4.36/12 8} Kd8 {-2.70/10 6} 35. Bxe5 {+5.52/13 7} Kfe7 {-3.38/10 4} 36.
Nxe8 {+5.58/14 7} Kdxe8 {-3.39/10 7} 37. Bd6 {+6.20/15 7} K8f7 {-4.63/11 8}
38. Qd3 {+6.32/13 8} Gc6 {-4.52/11 5} 39. Rf4+ {+7.05/14 8} Kfe8
{-3.47/10 6} 40. Bxe7 {+7.10/17 11} Kxe7 {-4.61/12 5} 41. Qf3 {+7.97/15 6}
He5 {-5.56/12 5} 42. Rd1 {+7.98/14 7} We8 {-6.20/13 9} 43. Rf8 {+9.02/14 6}
Wg7 {-6.19/12 5} 44. Qxc6 {+10.84/14 8} Wxf8 {-8.75/13 11} 45. f4
{+11.06/13 9} Hd4 {-8.99/12 5} 46. f5 {+11.72/12 9} Wd7 {-10.17/11 6} 47.
Qd6+ {+18.25/11 7} Kf7 {-16.15/11 6} 48. fxe6+ {+22.82/11 5} Wxe6
{-79.93/15 7} 49. Re1 {+99.87/10 7} He3 {-79.94/15 8} 50. Rxe3
{+99.89/10 7} Wd4 {-79.95/16 4} 51. Qxd4 {+99.93/9 7} Hf5 {-79.97/28 0.3}
52. gxf5 {+99.95/8 7} Kf8 {-79.98/28 0.1} 53. Qd7 {+99.97/8 7} Kg8
{-79.99/28 0.1} 54. Re8# {+99.99/8 7}
{Xboard adjudication: Checkmate} 1-0

[Event "Computer Chess Game"]
[Site "ccc-PC"]
[Date "2011.11.02"]
[Round "2"]
[White "Fairy-Max 4.8R"]
[Black "Lawin v0.2.3"]
[Result "0-1"]
[TimeControl "40/300"]
[Variant "spartan"]
[Annotator "1. -0.73   1... +0.05"]

1. f3 {-0.73/8} Lc6 {+0.05/14 15} 2. a3 {-0.76/8 7} Lf6 {+0.20/13 13} 3.
Nc3 {-0.68/8 6} Hfd5 {+0.30/13 6} 4. Ne4 {-0.77/9 6} Le5 {+0.24/12 12} 5.
d3 {-0.80/9 8} Ce6 {+0.25/11 6} 6. Be3 {-0.79/8 5} Ld4 {+0.52/12 7} 7. Bxd4
{-0.98/10 10} Hxd4 {+0.60/11 1.3} 8. Qd2 {-1.03/8 4} Hxd3 {+1.06/13 6} 9.
exd3 {-1.11/9 4} Lxe4 {+0.89/13 7} 10. dxe4 {-1.08/10 11} Hge5
{+0.89/12 10} 11. Bd3 {-1.09/9 13} Hxe4 {+1.06/12 9} 12. O-O-O {-1.26/9 6}
Wh6 {+1.15/13 6} 13. Qxh6 {-1.71/11 8} Hxh6 {+2.00/13 1.5} 14. fxe4
{-1.84/11 8} Cdd6 {+2.00/14 7} 15. Nf3 {-1.51/10 4} He5 {+2.03/12 7} 16.
Rhf1 {-1.53/10 4} Kg7 {+2.00/14 8} 17. Rfe1 {-1.62/10 5} Hbc6 {+2.02/11 7}
18. c3 {-1.48/10 6} Kc7 {+1.95/11 5} 19. g3 {-1.43/10 7} Ge8 {+1.96/11 8}
20. a4 {-1.39/10 8} Hec5 {+2.19/12 8} 21. Nd2 {-1.50/11 5} Gf7 {+2.08/11 7}
22. h4 {-1.45/10 4} Gf2 {+2.31/12 7} 23. Bc2 {-1.40/11 10} Hb6 {+2.28/11 7}
24. a5 {-1.17/11 15} Kg6 {+2.32/11 7} 25. a6 {-1.03/10 5} Kh5 {+2.53/12 7}
26. Rg1 {-0.69/10 6} Kg4 {+2.13/12 7} 27. Rdf1 {+0.20/11 5} Gh2
{+2.30/13 7} 28. Bd1 {+0.26/13 8} Kxg3 {+2.22/15 6} 29. Nf3 {+0.12/12 5}
Gh3 {+2.25/15 7} 30. Ng5 {+0.13/12 4} Gxh4 {+1.01/13 7} 31. Rf8
{+0.55/12 7} Cef6 {-0.34/12 5} 32. Rg8 {+0.41/11 4} Kf2 {+0.41/13 7} 33. a7
{+0.21/11 5} Kb7 {+2.28/15 7} 34. Rg4 {-0.59/13 8} Gxg4 {+2.77/16 5} 35.
Bxg4 {-0.57/14 9} Kxa7 {+2.62/16 6} 36. Rg7 {-1.42/12 5} Ke3 {+2.51/15 6}
37. Bh3 {-1.66/11 3} Ka6 {+3.08/13 6} 38. Bxd7 {-1.80/10 3} Cxd7
{+3.17/14 9} 39. Rxd7 {-2.01/14 9} Cg6 {+3.42/17 8} 40. Nh7 {-2.12/13 7}
Hxe4 {+3.95/18 13} 41. Re7 {-1.94/13 6} Cg7 {+3.90/18 10} 42. Rxg7
{-2.68/17 8} Hd3 {+3.96/19 15} 43. Rg2 {-2.92/16 7} He2 {+4.00/17 8} 44.
Rg1 {-3.24/15 6} Kf2 {+3.99/17 7} 45. Kd2 {-3.32/15 5} Kxg1 {+3.90/14 9}
46. Kxe2 {-3.11/14 12} Kb5 {+3.85/15 6} 47. Ng5 {-3.02/13 5} Kc4
{+3.99/14 9} 48. Kd2 {-3.16/14 21} Kb3 {+4.09/14 7} 49. Kc1 {-3.30/14 15}
Hd5 {+4.15/13 8} 50. Ne4 {-3.54/14 17} Hd4 {+5.74/14 8} 51. cxd4
{-3.55/13 4} Hxd4 {+5.78/13 1.5} 52. Nc5 {-5.71/14 13} Kc4 {+6.86/12 10}
53. Ne4 {-6.41/13 4} He3 {+6.88/11 5} 54. Kd2 {-7.02/15 8} Hf2 {+7.10/10 7}
55. Ke2 {-9.31/14 17} Kf1+ {+11.85/10 7} 56. Kd1 {-10.60/14 7} He1=G+
{+99.89/9 7}
{False draw claim: 'Stalemate'} 0-1

[Event "Computer Chess Game"]
[Site "ccc-PC"]
[Date "2011.11.02"]
[Round "3"]
[White "Lawin v0.2.3"]
[Black "Fairy-Max 4.8R"]
[Result "1-0"]
[TimeControl "40/300"]
[Variant "spartan"]
[Annotator "1. +0.29   1... +1.05"]

1. Nf3 {+0.29/16} Lc6 {+1.05/8 5} 2. e3 {+0.30/17 9} Hde6 {+0.84/8 7} 3.
Bd3 {+0.48/15 7} Lf6 {+0.83/9 5} 4. O-O {+0.45/13 8} Cd6 {+0.79/10 10} 5.
c4 {+0.53/14 6} Hac5 {+0.88/9 4} 6. b3 {+0.54/13 11} Hxc4 {+0.77/9 5} 7.
bxc4 {+0.50/11 1.2} Hc5 {+0.82/9 5} 8. Ba3 {+0.61/13 12} Le7 {+0.73/10 6}
9. Nc3 {+0.65/13 5} Wf6 {+0.91/9 20} 10. Rb1 {+0.66/13 11} Hhf5 {+0.81/8 4}
11. Bb4 {+0.86/11 5} Hge5 {+0.79/9 13} 12. Nd4 {+0.90/11 10} Cxd4
{+0.69/11 8} 13. exd4 {+0.97/11 1.3} Hxc4 {+0.58/10 5} 14. Bxc4
{+0.88/11 1.4} Hd6 {+0.54/9 5} 15. f4 {+1.05/11 10} Hxf4 {+0.69/10 6} 16.
Rxf4 {+1.04/10 2.2} Wd7 {+0.76/9 5} 17. Qf3 {+1.06/10 8} Hfd5 {+0.79/9 5}
18. dxe5 {+0.81/10 9} Wxe5 {+0.88/10 7} 19. Qf1 {+0.89/12 9} Wd7
{+0.76/10 15} 20. Kh1 {+0.96/11 8} Ga8 {+0.69/9 4} 21. Rc1 {+0.94/11 8} Kd8
{+0.63/10 9} 22. Qf2 {+0.92/11 8} Lb6 {+0.86/9 6} 23. Ne4 {+1.08/11 8} Ld4
{+0.95/10 10} 24. Qf1 {+1.06/11 8} Le5 {+0.60/10 7} 25. Rf5 {+0.96/11 8}
Wc6 {+0.78/9 3} 26. Rb1 {+1.06/11 8} Kg7 {+0.68/9 7} 27. g4 {+1.13/11 6}
Ga7 {+0.92/8 5} 28. h4 {+1.15/10 5} Ga8 {+0.93/8 5} 29. Kg2 {+1.16/11 8}
Wd7 {+0.88/8 5} 30. a3 {+1.19/10 8} Hc6 {+0.92/9 10} 31. h5 {+1.11/11 8}
Lc5 {+0.42/9 4} 32. Bxc5 {+1.56/13 8} Hxc5 {+0.39/11 5} 33. Bb5
{+1.45/13 8} Wc8 {+0.18/10 9} 34. Bc6 {+1.61/12 6} Ga7 {+0.53/9 3} 35. Bxe8
{+1.31/11 6} Kxe8 {+0.40/11 12} 36. Nxc5 {+1.36/12 9} Gxa3 {+0.44/10 6} 37.
Qe1 {+1.49/12 9} Ke7 {-0.81/10 5} 38. Rb8 {+5.38/13 6} Wa7 {-2.17/11 3} 39.
Rb7 {+7.29/14 9} Wxc5 {-4.75/10 4} 40. Rxe7+ {+8.59/13 12} Kg8 {-4.98/10 4}
41. h6 {+16.94/14 7} Ga8 {-6.63/12 11} 42. Qb1 {+99.85/13 6} He4
{-12.12/11 6} 43. Qf1 {+99.87/13 6} We3+ {-79.94/14 6} 44. dxe3
{+99.89/11 8} Hf3 {-79.95/15 7} 45. Qxf3 {+99.91/12 8} Ga2+ {-79.96/20 6}
46. Kh3 {+99.93/12 7} Gg2+ {-79.97/28 1.8} 47. Qxg2 {+99.95/9 8} Hd5
{-79.98/28 0.1} 48. h7+ {+99.97/9 6} Kh8 {-79.99/28 0.1} 49. Rf8#
{+99.99/9 8}
{Xboard adjudication: Checkmate} 1-0

[Event "Computer Chess Game"]
[Site "ccc-PC"]
[Date "2011.11.02"]
[Round "4"]
[White "Fairy-Max 4.8R"]
[Black "Lawin v0.2.3"]
[Result "1/2-1/2"]
[TimeControl "40/300"]
[Variant "spartan"]
[Annotator "1. -0.78   1... +0.02"]

1. c4 {-0.78/8} Lc6 {+0.02/14 15} 2. d4 {-0.57/9 5} Lf6 {-0.03/14 12} 3.
Nc3 {-0.55/9 6} Hed6 {-0.01/14 10} 4. Nf3 {-0.71/9 9} Hfd5 {-0.06/14 10} 5.
cxd5 {-0.76/9 5} Hxd5 {-0.07/14 13} 6. e4 {-0.75/10 9} Lxd4 {+0.10/13 10}
7. Nxd4 {-0.57/11 7} Hxd4 {+0.19/12 0.9} 8. Qxd4 {-0.73/10 17} Cd6
{+0.03/12 11} 9. Qe3 {-0.67/9 16} Hce5 {+0.05/13 11} 10. f3 {-0.59/9 4} We6
{+0.00/12 5} 11. Qf2 {-0.44/9 4} Hxe4 {-0.06/12 9} 12. Nxe4 {-0.37/9 4}
Lxe4 {+0.06/11 1.3} 13. fxe4 {-0.34/10 6} He5 {+0.00/12 6} 14. Be3
{-0.15/9 5} Wg4 {+0.00/12 5} 15. Qf4 {-0.29/10 4} Wh6 {+0.00/12 9} 16. Qf2
{-0.13/11 4} Wg4 {+0.00/19 7} 17. Qf4 {-0.01/14 7} Wh6 {+0.00/12 5} 18. Qf2
{-0.01/13 10} Wg4 {+0.00/21 6}
{XBoard adjudication: repetition draw} 1/2-1/2
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pre-announcement: 10x8 tourney

Post by hgm »

Ferdy wrote:I am testing my spartan chess engine vs Fairy-Max 4.8R and there was a False draw claim: 'Stalemate' by Fairy-Max 4.8R. See part of debug below.
Second engine is Fairy-Max 4.8R. This happened in the 2nd game after black's 56th move.
Interesting. When I let Fairy-Max think from the final position, it has no trouble to see that it will be mated soon. But when I first let it think about the previous move, it comes with the false stalemate claim.

It must have something to do with the under-promotion; Fairy-Max doesn't know this in its search, and when it happens at game level I add something to the hash key to invalidate it. But I guess it is not invalidated enough, as the only legal move Kc2 apparently hits upon a hashed position where it is in check, probably because it was searched when there was a Warlord on e1. (While the null move apparently hits upon a position where it is not in check, or it would heve thought it was mated rather than stalemated.) A bit strange that moves like Kc1 don't get a score that says they are legal. Or perhaps they do, but the depth might not have been sufficient for a score above alpha, so that the real search finds the King capture.

8/8/1h5h/8/2k1N3/8/1P6/3Kgk2 w - - 0 57
[d]8/8/1p5p/8/2k1N3/8/1P6/3Kqk2 w - - 0 57

I'd better check that key invalidation code...
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pre-announcement: 10x8 tourney

Post by hgm »

Indeed the hash 'invalidation' seems to be the problem. Fairy-Max uses two 32-bit keys, one providing the index, the other the signature. Only the index key is dependent on side-to-move, and this was also the key I adjusted for under-promotionsto invalidate the hash. Apparently for this particular combination of pieces the stm change could compensate for the promotion change, leading to wrong-results for probes after null move (which are used to determine in-check). I now invalidate by modifying the signature key, and the problem disappears.
Ferdy
Posts: 4850
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: pre-announcement: 10x8 tourney

Post by Ferdy »

hgm wrote:Indeed the hash 'invalidation' seems to be the problem. Fairy-Max uses two 32-bit keys, one providing the index, the other the signature. Only the index key is dependent on side-to-move, and this was also the key I adjusted for under-promotionsto invalidate the hash. Apparently for this particular combination of pieces the stm change could compensate for the promotion change, leading to wrong-results for probes after null move (which are used to determine in-check). I now invalidate by modifying the signature key, and the problem disappears.
I have encountered another problem again with Fairy-Max 4.8R as white, it claimed white wins, and winboard declares this as false win claim.

Q2B4/1h1h3h/1khh4/3P3h/P2P4/5P2/2h3P1/6K1 b - - 0 1
[d]Q2B4/1p1p3p/1kpp4/3P3p/P2P4/5P2/2p3P1/6K1 b - - 0 1
Black here still survived by promoting to a king, c2b1k.
I hope your fix will also address this.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: pre-announcement: 10x8 tourney

Post by Evert »

Ferdy wrote: Q2B4/1h1h3h/1khh4/3P3h/P2P4/5P2/2h3P1/6K1 b - - 0 1
[d]Q2B4/1p1p3p/1kpp4/3P3p/P2P4/5P2/2p3P1/6K1 b - - 0 1
Black here still survived by promoting to a king, c2b1k.
I hope your fix will also address this.
Survived is a bit of a generous term. ;)
I would guess that promotion to king is treated as an underpromotion and so not easily fixed... this situation probably happens rarely enough that it doesn't really matter in practice.