Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: repetition detection and the transposition table

Author: Uri Blass

Date: 00:27:41 02/16/03

Go up one level in this thread


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



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.