Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Why hash tables? Where do programs spend the majority of the CPU ti

Author: Robert Hyatt

Date: 18:36:38 09/16/98

Go up one level in this thread


On September 16, 1998 at 18:31:14, John Coffey wrote:

>On September 16, 1998 at 18:23:09, Robert Hyatt wrote:
>>You apparently misunderstand the concept.  "hash tables" (more correctly
>>called transposition/refutation tables) store the results of searches at
>>nodes inside the tree.  so that if I search the move path Nf3 Nf6 Ng5 and
>>search some more stuff deeper into the tree, when I get back to the position
>>after these three moves I store the search result in the hash table.  Then
>>when search the moves Nh3 Nf6 Ng5 I reach the same position by different
>>moves, but I find the result of the other search from this position and
>>don't have to repeat it...
>
>Thanks for the response.
>
>Is there a limit to the depth that you will store positions into the
>hash table?  Does the hash table add much overhead?

overhead is nominal, in the 1-2-3 percent range, max.  The work it saves
is always more than that.  Sometimes *far* more.  For example, if you take
a simple pawn endgame position, without a hash table, you might search 14-15
plies deep in 3 minutes.  That same position with hash tables might hit 30-40
plies deep.

I don't hash in the capture search, but at all interior nodes I do...


>
>Back to my other question:  Do programs spend more time evaluating the positions
>than they do traversing the tree?


I can only answer for mine.  I spend about 50% of the total search time in
the various evaluation function procedures.  The remainder of the time is in
the usual alpha/beta tree traversal, ordering moves, sorting moves, check
detection, etc...




>
>John Coffey



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.