Discussion of anything and everything relating to chess playing software and machines.
Moderator: Ras
hgm
Posts: 28361 Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller
Post
by hgm » Mon Jan 13, 2014 8:15 pm
syzygy wrote: In theory the "drawing move" might lead to the engine quickly being checkmated, but that can only happen if the opponent overlooked the checkmate the first time around. In engine-engine matches this is unlikely to happen (and this includes correspondence play). In engine-human matches it could happen but the chances are rather slim.
Well apparently there are people complaining about it. And this is not the first time.
I think the search would simply look for a PV not ending in a position that has been seen before. I doubt it would do much to prevent needless repetitions.
What I had in mind was to apply a reduction to the search score, so that any evaluation of a position where it ends would be reduced, whether that is a repetition or not. Like
Code: Select all
if(RepeatOfTreePos())
score = 0;
else if(FirstRepeatOfGamePos())
score = -Search(-2*beta, -2*alpha, depth-1)/2;
else
score = -Search(-beta, -alpha, depth-1);
syzygy
Posts: 5697 Joined: Tue Feb 28, 2012 11:56 pm
Post
by syzygy » Mon Jan 13, 2014 9:00 pm
hgm wrote: Well apparently there are people complaining about it. And this is not the first time.
Yes, this has been discussed many times now and certainly the SF developers will have considered all possibilities, so I think it is fair to say that the current way of dealing with repetitions is intentional, the choice for it having been made in full knowledge of its drawbacks.
What I had in mind was to apply a reduction to the search score, so that any evaluation of a position where it ends would be reduced, whether that is a repetition or not. Like
Code: Select all
if(RepeatOfTreePos())
score = 0;
else if(FirstRepeatOfGamePos())
score = -Search(-2*beta, -2*alpha, depth-1)/2;
else
score = -Search(-beta, -alpha, depth-1);
Ok, in principle that should work, but it would add quite a bit of code to a complicated search function and most likely cost a considerable number of Elo points.
phenri
Posts: 284 Joined: Tue Aug 13, 2013 9:44 am
Post
by phenri » Tue Jan 14, 2014 2:24 pm
At the risk of sounding stupid, here is a final illustration.
Code: Select all
[Event "?"]
[Site "?"]
[Date "2014.01.11"]
[Round "?"]
[White "3-fold rep starting position"]
[Black "?"]
[Result "0-1"]
[SetUp "1"]
[FEN "8/kb6/1p6/p1p1p3/P2b3Q/8/3RK1q1/8 w - - 0 1"]
[PlyCount "8"]
[EventDate "2014.??.??"]
1. Kd1 Qf3+ 2. Ke1 Qe3+ 3. Kd1 Qf3+ 4. Ke1 Qe3+
({===== The King =====} 4... Qe3+)
({Houdini 3 Pro x64:} 4... Qe3+ 5.Kd1 Bf3+ 6. Kc2 Qc3+ 7. Kb1 Qa1+ 8. Kc2 Qb2+ 9. Kd3 Qb3# {-#6/33})
({===== Other I =====} 4... Qe3+)
({Arasan 15.1:} 4... Qe3+ 5. Kd1 {-#8/12})
({Bouquet 1.8x64:} 4... Qe3+ 5. Kd1 Bf3+ 6. Kc2 Qc3+ 7. Kb1 Qa1+ 8. Kc2 Qb2+ 9. Kd3 Qb3# {-#6/25})
({Chiron 2 64bit:} 4... Qe3+ 5. Kd1 Bf3+ 6.Kc1 Qa3+ 7. Kb1 Qa1+ 8. Kc2 Qb2+ 9. Kd3 Qc3# {-#6/88})
({DiscoCheck 5.2:} 4... Qe3+ 5. Kd1 {-#5/46})
({Equinox 2.02 x64mp:} 4... Qe3+ 5. Kd1 Bf3+ 6. Kc1 Qa3+ 7. Kb1 Qa1+ 8. Kc2 Qb2+ 9. Kd3 Qb3# {-#5/30})
({Gaviota 0.86:} 4... Qe3+ 5. Kd1 Bf3+ 6. Kc2 Qc3+ 7. Kb1 Qa1+ 8. Kc2 {-#6/13})
({IvanHoe:} 4... Qe3+ 5. Kd1 Bf3+ 6. Kc1 Qa3+ 7.Kb1 Qa1+ 8. Kc2 Qb2+ 9. Kd3 Qb3# {-#6/24})
({Zappa Mexico II x64:} 4... Qe3+ 5. Kd1 Bf3+ 6. Kc1 Qc3+ 7. Kb1 Qa1+ 8. Kc2 Qb2+ 9.Kd3 Qb3# {-#6/19})
({===== Other II =====} 4... Bc3)
({Crafty 23.05 x64:} 4... Bc3 5. Qh6)
({Critter 1.6a 64-bit:} 4... c4 5.Qh7)
({Deep Fritz 10:} 4... Bc3 {-20.29/13})
({Deep Fritz 13:} 4... Bc3 5. Qh6)
({DeepHIARCS WCSC 2011:} 4... Bc3 {-28.19/18})
({Deep Sjeng WC2008 x64:} 4... Bc3 {-12.61/15})
({Gull R600 x64:} 4... Bc3 5. Qd8)
({Hannibal 1.4bx64:} 4... Bc3 5. Qh6)
({Komodo:} 4... Bc3 {-#97/21})
({MinkoChess x64:} 4... Bc3 {-23.72/15})
({Naum 4.2 x64:} 4... e4 5. Qh2)
({Protector1.6.0 x64:} 4... Bc3 5. Qh6)
({Ruffian 1.0.5:} 4... Bc3 {-13.42/12})
({Rybka 2.2n2 mp:} 4... e4 5. Rxd4)
({Quazar 0.4 x64:} 4... Bc3 5. Qh6)
({SmarThink 1.41:} 4... Bc3 5. Qd8)
({Stockfish:} 4... Bc3 5. Qh6)
({Toga Hair 1.0 280513:} 4... Bc3 5. Qg5)
0-1
There are those who see the checkmate, and others who are like billiard balls miss their hole.
phenri
Posts: 284 Joined: Tue Aug 13, 2013 9:44 am
Post
by phenri » Fri Jan 17, 2014 9:19 am
A position which seems to be basic for Houdini and Critter, is much less for Stockfish.
Even in multi-pv 4 it does not consider Be2+!! And even if he had Be2+ in the pv, he would not see 2.Nd5!!
Critter only seem to find the solution in a few seconds, which differs somewhat from Houdini.
Code: Select all
[Event "?"]
[Site "?"]
[Date "2014.01.17"]
[Round "?"]
[White "SF Strange Eval"]
[Black "#4"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/2p1q3/p3P3/2P4p/1PBP2kP/2N3P1/7K/8 w - - 0 1"]
[PlyCount "1"]
1. Be2+
({Stockfish 140114 :} 1. Bf1 Kf3 2. Bg2+ Kf2 3. d5 c6 4. Ne4+ Ke1 5. dxc6 Qxe6 6. Ng5 Qc8 7. Nh3 Qg4 8. Nf4 Kf2 9. Nh3+ Ke1 {0.00/43})
({Houdini 4 Pro x64:} 1. Be2+ $3 Kf5 $3 2. Nd5 $3 Qxe6 3. Bd3+ Kg4 4. Be4 Qh6 5. Nf4 Qg7 6. Nd3 Qxd4 7. c6 Qxe4 8. Nf2+ Kf3 9. Nxe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Qxf2+ 9.Kxf2 Kh3 10.Bxc6
+- (104.91 ++) Depth: 44/68 00:11:11 4634MN, tb=3246884
Michel
Posts: 2292 Joined: Mon Sep 29, 2008 1:50 am
Post
by Michel » Fri Jan 17, 2014 1:38 pm
A position which seems to be basic for Houdini and Critter, is much less for Stockfish.
Even in multi-pv 4 it does not consider Be2+!! And even if he had Be2+ in the pv, he would not see 2.Nd5!!
This is a composition by Troitsky. The pv depends on an extremely subtle zugzwang on the 7th move. This is very unlikely to appear in a real game.
Stockfish is optimized for playing strength. Not for solving compositions.