Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hashtables: is larger always better?

Author: James Swafford

Date: 04:28:12 09/23/01

Go up one level in this thread


On September 23, 2001 at 00:28:03, Antonio Dieguez wrote:

>On September 22, 2001 at 23:42:29, James Swafford wrote:
>
>>On September 22, 2001 at 22:17:06, Uri Blass wrote:
>>
>>>On September 22, 2001 at 19:08:06, Torstein Hall wrote:
>>>
>>>>On September 22, 2001 at 18:29:46, Andreas De Troy wrote:
>>>>
>>
>>>If the hash tables are very big then the probability for hash collision can
>>>increase and if there are enough hash collisions the result can be a bad move.
>>>
>>>Uri
>>
>>Why do you think the size of the table has any bearing on the number
>>of collisions?  The number of collisions is a function of the
>>"uniqueness" of your key, not how many entries are in your table.
>>
>>Maybe my definition of a collision is different than the norm:  I
>>define a collision as a match of the entire key between different
>>positions, not a match of the portion of the key used as a probe into
>>the table.
>
>why not? the probability to have two position differents but seen equal with the
>eyes of the hashtable depends in the portion of bits that are used in the probe.

That doesn't have to be true.  I do this:
h_e = *(hash_ptr + (cp->hash_key & hash_mask));

BUT, within each hash entry the entire key is stored, and is compared
before the move is used.  Hence, they are not necessarily seen as equal
even if the bits used in the probe are equal.


>
>Off course more time or speed can cause more colisions, and the thing is that it
>could be that just one hurts the search. I use always 48 bits, nonrandoms
>numbers really, I just hope that doesn't happen.
>
>>Either way, I don't see how making the hash table bigger increases the
>>chance of a collision.  Would you explain?
>
>With the always replace scheme, I don't see neither, at the moment.
>
>>
>>--
>>James



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.