Computer Chess Club Archives




Subject: Re: Question for the MTD(f) experts

Author: Tord Romstad

Date: 02:35:40 04/14/04

Go up one level in this thread

On April 14, 2004 at 04:57:01, Dann Corbit wrote:

>So my next question is, how do you normally populate a hash table with PV nodes,
>since we only get edge values during the search?  Do I need to follow the pv
>from hash to hash with a makemove for each succeeding pv node?

I am not sure exactly what you mean here.  Are you asking how you build the PV
beyond the first move?  In pseudo code, I do the following:

void build_PV() {
  hashentry_t *h;
  int i;

  for(h=get_hash(CurrentHashKey), i=0; h!=NULL && i<MAX_DEPTH && he->move;
      h=get_hash(CurrentHashKey), i++) {
    PV[i] = h->move;
  PV[i] = 0;

hash_make_move() is a function which is similar to make_move(), except
that it only updates the hash key.

Note that what you get is not really a PV at all.  It is just a string of
moves which all caused a beta cutoff somewhere in the search.  It could
be too short, too long, or contain incorrect moves.  In Gothmog, it even
happens that it contains illegal moves, because I don't hash en passant


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.