Computer Chess Club Archives


Search

Terms

Messages

Subject: Crafty question about HashStorePV()

Author: Alvaro Jose Povoa Cardoso

Date: 14:57:19 04/21/01


Could someone (namely Dr. Hyatt) explain to me (perhaps with pseudocode) the
code below in HashStorePV()?

  if ((htablea->word2^htablea->word1) == temp_hashkey &&
      (htablea->word1>>61)) {
    htablea->word2=htablea->word2^htablea->word1;
    htablea->word1&=~((BITBOARD) 07777777<<32);
    htablea->word1|=(BITBOARD) tree->pv[ply].path[ply]<<32;
    htablea->word2=htablea->word2^htablea->word1;
  }
  else if ((htableb->word2^htableb->word1) == temp_hashkey) {
    htableb->word2=htableb->word2^htableb->word1;
    htableb->word1&=~((BITBOARD) 07777777<<32);
    htableb->word1|=(BITBOARD) tree->pv[ply].path[ply]<<32;
    htableb->word2=htableb->word2^htableb->word1;
  }
  else {
    htableb->word1=(BITBOARD) 65536;
    htableb->word1|=((BITBOARD) ((transposition_id<<2)+WORTHLESS))<<59;
    htableb->word1|=(BITBOARD) tree->pv[ply].path[ply]<<32;
    htableb->word2=temp_hashkey^htableb->word1;
  }


When storing a PV entry in the hash table, I can't figure out when to store in
the _depth_priority_ table and when to store in the _always_store_ table and
what exactly to store in every case.
I'd particularly like to know what to store as _type_  and _draft_ in each and
every case.

Thank you

Alvaro Cardoso





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.