Computer Chess Club Archives




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

Author: Tord Romstad

Date: 03:32:59 04/14/04

Go up one level in this thread

On April 14, 2004 at 06:07:57, José Carlos wrote:

>On April 14, 2004 at 05:35:40, Tord Romstad wrote:
>>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 &#38;&#38; he->move;
>>      h=get_hash(CurrentHashKey), i++) {
>>    PV[i] = h->move;
>>    hash_make_move(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.
>  I get the last part of my pv from the hash table (I'm PVS, not MTD(f), but
>there's sometimes more moves in the hash table than in the pv array), but I need
>to make() the move (not only update the hash table) in order to walk through
>hash moves. I don't understand how you can make several moves in a row by only
>updating the hash key. Can you please explain it?
>  Thanks.

It's really simple.  I store more information in the moves than most people.
Most of you, I guess, store only the from and to squares, and the promotion
piece in the case of pawn promotions.  I also store the moving piece, the
captured piece, and whether the move was an en passant capture.  This gives
me everything I need to update the hash key, without looking at the board
at all.  The price is that I need a bigger number of bits to store moves
in the transposition table.


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.