Author: Miguel A. Ballicora
Date: 13:02:10 05/08/02
Go up one level in this thread
On May 08, 2002 at 15:27:33, Uri Blass wrote:
>On May 07, 2002 at 19:26:43, martin fierz wrote:
>
><snipped>
>>i used to use a two-table approach in my checkers program, with one table being
>>used for all nodes which were <N plies from the root, the other for >=N. in the
>>first table, i replaced with deeper draft only, in the second, i always
>>replaced. i changed it to a single table after finding no significant
>>difference; in the single table i have a hash bucket size of 2,
>
>I do not understand.
>
>What does a hash buket size of 2 means?
>Do you have 2 keys ( 2 64 bits integers) in the single table?
>
>Can you describe the structure of the single table?
>
>
>I understand based on bruce's site that the two table approach is to have 2
>tables of hash elemenets when every hash element has the following structure:
>
>typedef struct tagHASHE
>{
> U64 key;
> int depth;
> int flags;
> int value;
> MOVE best;
>}
>HASHE;
>
>Note that I do not understand what is the reason for using 3 integers for
>depth,flags and value when it is possible to compress these 3 numbers to a
>single 32 bit integer in order to have more entries in the hash tables.
>
>The only reason that I see for doing it is that it is always better to start
>with something relatively simple with no bugs but in this case it is better also
>to start with one table and with using hash tables only for order of moves.
>
>Uri
That is a website to teach, so the examples are in pseudocode or something
easy to read and understand. Anyway, to compress it you just need to add the
bitfield on the declaration and nothing else will change. You will have a very
good trade-off of memory and readability.
I did not do it in that way, but maybe I should have. You have to be extremely
careful if you use bit operations like shifts ands and ors when you have many
fields, some that are suppose to signed and others unsigned.
Regards,
Miguel
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.