Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: how to implement hash tables?

Author: Jaime Benito de Valle Ruiz

Date: 15:27:36 12/21/03

Go up one level in this thread


On December 21, 2003 at 17:37:57, Michael Henderson wrote:

>Hello, i have a simple alpha-beta chess program and I have been trying to
>understand what values to store, compare, and return when a hash table is put
>in.  I believe there are three results for a node: exact value, fail high, and
>fail low.  I'm having difficulty esp. with fail high/low.  Any tips would be
>great!
>
>Thx in advance,
>Michael Henderson

If you find any beta-cutoff during search, store the flag BETA.
If you finish making/unmaking all moves for a node, you should store either
EXACT or ALPHA, depending on whether the maximum value found for this node
during the search is equal to alpha, or not.

At every node, even before you generate all moves, if the depth of the hash
entry is greater or equal to the current one, then depending on the type you
return:

-EXACT: return the value stored in the hash
-ALPHA: return the current alpha
-BETA:  return the current beta.


If the depth is less than the current one, use the best move from the hash entry
for move ordering.

Regards,

  Jaime



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.