Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Is improvement from hash tables in middle game linear or exponential

Author: Robert Hyatt

Date: 13:22:06 12/20/03

Go up one level in this thread


On December 20, 2003 at 03:15:55, Andrew Dados wrote:

>On December 20, 2003 at 02:20:33, Russell Reagan wrote:
>
>>On December 19, 2003 at 22:05:11, Dann Corbit wrote:
>>
>>>You can make too large of a hash table if you clear hash frequently (e.g.
>>>between moves) and the hash clear time becomes significant.
>>
>>You could avoid this by adding a counter element to each hash table entry. If
>>the counter of the hash entry is equal to the counter value representing the
>>"current" search, then that entry is from the current search. Otherwise, it's
>>old data. You increment the counter after each game move is made (not each
>>search move). You just have to make sure your counter will last long enough.
>>Probably a byte will do (256 plies have to pass before an old element could be
>>considered current).
>>
>>If your choices are to use a small hash size (say, 32 MB) because you need to
>>clear it, or use a larger hash size (say, 1 GB) and "waste" one byte per entry,
>>you'll probably come out way ahead on the amount of data you can store in your
>>table.
>
>3 bits (8 values) for 8 consecutive searches was enough last time I worked on my
>proggy (some years ago it was :). By the time that 3-bit counter wraps you
>either:
>
>a) have no entries left from 8 searches ago (tiny HT, all were overwritten)
>b) still have some 8-search old entries left, which means HT size is huge
>comparing to single search nodecount, so little harm is made.
>
>-Andrew-


That's what I did in Cray Blitz.  That's what I have always done in Crafty as
well.  It works just fine, IMHO.



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.