Author: Pallav Nawani
Date: 11:13:55 07/29/04
Go up one level in this thread
On July 29, 2004 at 13:55:37, Eric Oldre wrote:
>
>I have a couple theories about trans table replacement that i'd like some input
>on.
>
>I started off with a single replace if deeper trans table.
.
.
.
>
>then I wanted to try something else. I was going to look not just at the entry
>exactly at &trans_table.entries[board->zobrist0%trans_table.size];
>but also the few entries following that entry.
>
> chesstranstableentry *entry;
> chesstranstableentry *cmp_entry;
> entry = &trans_table.entries[board->zobrist0%trans_table.size];
> int i;
> for(i=1;i<=transtable_max_offset;i++){
> cmp_entry = &trans_table.entries[(board->zobrist0%trans_table.size)+i];
> if(cmp_entry->depth < entry->depth){
> entry = cmp_entry;
> }
> }
>
> if(depth>=((entry->depth)-(entry->age))){
> entry->zobrist1 = board->zobrist1;
.
.
>with the idea that if there was a lower depth entry near the address that it
>would normally
>replace at, then it would replace the lowest depth entry in that area. keeping
>more valuable deeper entries.
>
>I discovered that instead of reducing my node counts it actually went up.
Not surprising. What you are doing is that you are replacing an entry at
(board->zobrist0%trans_table.size)+i with an entry that should have been here:
board->zobrist0%trans_table.size. As a result, when you do a hashprobe later at
the position that maps to (board->zobrist0%trans_table.size)+i, you get nothing.
Not to mention that board->zobrist0%trans_table.size also has a very old and
probably useless entry.
Instead, I suggest you use the following scheme:
Replace if deeper or if the hash keys don't match
This is (in _my experience_) slightly better than replace if deeper scheme. Also
see the source code for fruit & beowulf for still better schemes.
hth,
Pallav
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.