Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: MTD(f)

Author: Brian McKinley

Date: 13:12:35 09/29/99

Go up one level in this thread


On September 29, 1999 at 06:40:29, Andrew Williams wrote:

>Again, because you never establish
>exact scores, you can't keep the PV in the normal way; you need to use your
>hashtable to keep track of it.
>

I am concerned about this statement because I use MTD(f) and don't use my hash
tables to determine my PV.  Maybe I don't use the normal way of tracking the PV.
 When I save a score from a evaluation or a lookup that might be backed, I save
the "path" with it.  This way the both the PV and the score get backed up.  This
may sound slow, but I only save the PV if there is a chance the score will be
backed up at the previous ply (currentply.best < -previousply.best).  This is
only true for a small percentage of the nodes evaluated.  I keep a pointer to a
PV at each ply.  Before I back up a score with an associated PV and return to
the previous ply I swap the PV pointers for the current ply and the previous ply
so that I can reuse that space the next time I need to save a PV at the current
ply and so that my current PV storage space doesn't get overwritten.

Once lowerbound >= upperbound I simply use the PV associated with the score from
the last iteration.  This seems to work.  What am I missing?

I have found positions in the past where AlphaBeta does not return the same PV
as MTD(f), but mostly the scores have been the same and difference appears to be
because of move ordering.  In the other cases, the MTD(f) search appeared to
suffered from a transposition that was searched deeper and returned a lower
score causing the need for a research.  Because I don't do a research, I got a
bad PV and score.  I haven't figured out (or given much thought to) how to deal
with this problem.  Maybe I should trap for this condition and clear the hash
table when it happens.  This seem drastic with MTD(f) and could seriously affect
performance if it happens often.  There might be the potential for an infinite
loop if I don't reset the upper or lower bound too.  At this point I am simply
thinking out loud so it is time to post.

-Brian





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.