Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: repetition detection and the transposition table

Author: Filip Tvrzsky

Date: 05:06:01 02/16/03

Go up one level in this thread


On February 16, 2003 at 03:27:41, Uri Blass wrote:

>On February 16, 2003 at 01:02:17, Anthony Cozzie wrote:
>
>>[D]3r2k1/pR3ppp/3Qp3/4n3/2P1PP2/4B3/4KP2/7q b - - 0 30
>>
>>Zappa gives:
>>
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qh5
>> = (9.21)       Depth: 4        00:00:00.03     2kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qh5
>> = (9.21)       Depth: 5        00:00:00.08     6kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qh5
>> = (9.21)       Depth: 6        00:00:00.26     20kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qh5
>> = (9.21)       Depth: 7        00:00:00.63     54kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qh5
>> = (9.21)       Depth: 8        00:00:01.34     131kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qh5
>> = (9.21)       Depth: 9        00:00:02.49     295kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qh5
>> = (9.21)       Depth: 10       00:00:04.92     688kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qh5
>> = (9.21)       Depth: 11       00:00:09.54     1542kN
>>
>>which is clearly silly.
>>
>>Without the transposition table, I get the following, rather messy, output:
>>
>>1...Rb8
>> - (9.63)       Depth: 8        00:00:10.94     1532kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qd1 4. Qxd1 Rxd1
>> - (8.13)       Depth: 8        00:00:17.33     2434kN
>>1...Qf3 2. Kf1 Qh1 3. Ke2 Qh5 4. Kf1 Nc6 5. Rd7 Qh1 6. Ke2 Rxd7 7. Qxd7 Qxe4
>> = (3.56)       Depth: 8        00:00:20.96     3011kN
>>1...Qf3 2. Ke1 Qh1 3. Ke2 Qh5 4. Kf1 Qh3 5. Ke2 Qg4 6. Kf1 Qxf4
>> - (3.06)       Depth: 9        00:00:35.07     5489kN
>>1...Qf3 2. Ke1 Qh1 3. Ke2 Qh5 4. Kf1 Qh3 5. Ke2 Qg4 6. Kf1 Qh4 7. Qxd8 Qxd8 8.
>>fxe5 Qd3 9. Kg2
>> = (2.61)       Depth: 9        00:00:50.34     8168kN
>>1...Qh5 2. Kf1 Qh1 3. Ke2 Qf3 4. Ke1 Nc6 5. Rd7 Qh1 6. Kd2 Qh5
>> - (2.11)       Depth: 10       00:01:31.06     15360kN
>>1...Qf3 2. Ke1 Qh1 3. Ke2 Qh5 4. Kf1 Qh3 5. Ke1 Nc6 6. Rd7 Qh1 7. Ke2 Rc8 8. f3
>>a5
>> = (2.40)       Depth: 10       00:02:22.18     24297kN
>>1...Qf3 2. Ke1 Qh1 3. Ke2 Qh5 4. Kf1 Nc6 5. Rd7 Qh1 6. Ke2 Rc8 7. f3 a5 8. Bc5
>>Qc1
>> = (2.20)       Depth: 11       00:04:18.74     43985kN
>>
>>At depth 8, it starts to realize it is running out of checks, but even at depth
>>11 it doesn't really understand the position.
>>
>>The problem appears to be as follows:
>>
>>Zappa analyzes the position at depth 1, and determines it can win white's queen
>>with Rxd6. Search is stopped.
>>
>>Zappa analyzes the position at depth N, and follows the tree Qh5 Kf1 Qh1 Ke2.
>>Here Zappa does not declare a repetition because the position has occurred only
>>1 time in the tree.
>
>This is a mistake.
>
>If you see repetition of the root position You should evaluate it as a draw.
>
>I evaluate every repetition as a draw.
>I can understand not evaluating every repetition as a draw but the only
>repetition that it make sense not to evaluate as a draw are repetition of
>history positions that mean repetition of positions that were at least 1 ply
>before the root.
>
>If you are winning then you can win without repetition of the root position so
>it does not make sense not to evaluate repetition of the root position as a
>draw.
>
>Note that there are disadvantages of not evaluating repetition of history
>positions as a draw and in positions that the program does not understand it may
>waste time instead of playing a better move that is going to reduce it's score
>but improve it's position.
>
>It is not clear to me that evaluating repetition not as a draw is better so
>I prefered the simple solution that is used by many commercial programs and it
>is to evaluate every repetition as a draw.
>
>I think that the best solution is to evaluate repetition of history position as
>some average between a draw and the score that the program remember but I did
>not try it and I did not consider it as important enough to test it.
>
>  However, this is the root position, and its value has been
>>stored in the hash as 9.21 by iteration N-1. And the cycle continues.
>
>The first thing that you need to check is if there is a repetition and only if
>you see no repetition you can use the score from the hash tables.
>
>Uri

I agree with Uri and want to add that IMHO there is no point in storing the root
position evalution in the hash table during the search. I believe that
repetition is one of few things which my engine handles quite well:

Flip  WB2:
D5  00:00  8,04   1. ... Qh5 2.Kf1 Qh3 3.Ke2 Qf3 4.Ke1
D5  00:00  8,02   1. ... Qh5 2.Kf1 Qh3 3.Ke2 Qg4 4.Kf1 Rxd6 5.fxe5 Rd2
D5  00:00  7,93   1. ... Qh5 2.Kf1 Qh3 3.Ke2 Qh1 4.fxe5
D5  00:00  7,75   1. ... Qh5 2.Kf1 Qh3 3.Ke2 g5 4.fxe5
D5  00:00  7,34   1. ... Qh5 2.Kf1 Nc6 3.Qxd8
D5  00:00  6,60   1. ... Qh5 2.Kf1 Qh3 3.Ke2 Rc8 4.Rb8
D5  00:00  5,58   1. ... Qh5 2.Kf1 Nc6 3.Rb8 Qh1 4.Ke2 Qh5 5.Kd3 Qd1 6.Bd2 Nb4
7.Kc3
D5  00:00  3,85   1. ... Qh5 2.Kf1 Nc6 3.Rd7 Qh1 4.Ke2 Rxd7 5.Qxd7 Qxe4
D6  00:00  3,85   1. ... Qh5 2.Kf1 Nc6 3.Rd7 Qh1 4.Ke2 Rxd7
D6  00:00  3,84   1. ... Qh5 2.Kf1 Rb8 3.fxe5
D6  00:00  3,84   1. ... Qh5 2.Kf1 Nc6 3.Rd7 Qh1 4.Ke2 Rxd7 5.Qxd7 Qxe4
D7  00:00  3,84   1. ... Qh5 2.Kf1 Qh3 3.Ke2 Qf3 4.Ke1
D7  00:00  3,83   1. ... Qh5 2.Kf1 Qh3 3.Ke2 Qf3 4.Ke1 Rf8
D7  00:00  3,77   1. ... Qh5 2.Kf1 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This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.