Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: draw by repetition when using best move from transposition table ent

Author: Robert Hyatt

Date: 08:44:09 01/15/06

Go up one level in this thread


On January 14, 2006 at 22:15:10, Branislav Bezak wrote:

>I'm doing something like this:
>
>if(entry.Depth < depth)
>{
>	// found entry but depth is less then required
>}
>else
>{
>	if(entry.EvalType == EvalTypeExact ||
>	  (entry.EvalType == EvalTypeBetaCutoff && entry.Score >= beta) ||
>	  (entry.EvalType == EvalTypeAlphaCutoff && entry.Score <= alpha)
>	)
>	{
>// what do I need to do here to detect immediate or future draw by repetition?
>		bestMove.m = entry.BestMove;
>		return entry.Score;
>	}
>}
>
>Thanks, Branislav

Nothing.  The question to ask is "OK, when I _stogred_ this position, assuming
draft > 0, why didn't I find the repetition when I searched below this node,
before I stored the result?  Answer that and your problem will go away.

If you say "but wait, I stored it with draft = 0, so I didn't do repetition
checks in the q-search" I'd respond, fine, but we are on the next iteration, so
we are going one ply deeper, your old draft is no good.  If we are on the same
iteration, there is no way to find the draw anyway since we are not going deep
enough...

Note also the "bestMove.m" above won't work for all three cases.  In the case of
a fail high (you store a "LOWER" indication) or an exact score (you store an
"EXACT" indication) you have a best move.  But not on a fail low.  Storing a
best move there will make your search tree bigger because the best move is
always searched first, and in that case it is not the best move but a random
move, since it is impossible to find a best move when you search all moves and
each one fails low.



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.