Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Extensions and Hashing

Author: Tony Werten

Date: 00:33:52 10/20/00

Go up one level in this thread


On October 19, 2000 at 09:45:23, Robert Hyatt wrote:

>On October 19, 2000 at 05:57:14, Tony Werten wrote:
>
>>On October 18, 2000 at 09:54:25, Robert Hyatt wrote:
>>
>>>On October 18, 2000 at 08:06:23, David Rasmussen wrote:
>>>
>>>>I was wondering about a potential "bug" or at least "unwanted feature" of the
>>>>way hashing and extensions affect eachother in, say, Crafty.
>>>>
>>>>The problem is basically this:
>>>>
>>>>In Crafty, whenever depth is used for other purposes than searching (that is
>>>>hashing and nullmove), the extension factor isn't included. That means that a
>>>>search that essentially asked for a depth=5 + extensions=3 == 8 ply search, will
>>>>return with success from the hashprobe if the draft is just 6 or 7. Shouldn't
>>>>the depth parameter ALWAYS be used with relevant extensions for the search to be
>>>>(at least more) theoretically correct ?
>>>>
>>>>Am I making sense?
>>>
>>>
>>>You are missing an important point.
>>>
>>>Extensions happen _after_ a move is made.  Hashing happens at the start of a
>>>ply.  If extensions were added in at any previous ply, they are certainly
>>>factored into the hash probe.  But there is no way to factor in extensions
>>>triggered by a move, when the hash probe is done _before_ any move is made.
>>>
>>>IE if an in-check extension is done, it is added in at the _previous_
>>>ply, rather than at the current ply.  Which means it is _always_ done.
>>>The only exception is that the one-reply extension isn't done until crafty
>>>discovers that there is only one legal move.  But this is perfectly
>>>consistent...
>>
>>How about threat extensions.
>>In the previous search you did a nullmove and found out you're about to be
>>checkmated and so you get an extension. Next search hashtable lookup >= current
>>depth so you abort.
>>
>>I solve this by setting a "got a threat extensions last search" flag.
>>
>>Tony
>
>
>Why would this be a problem?  IE the last time I did this search, I already
>had the threat extension folded in.  The idea is that When I store the result
>of a search, I use a consistent depth, namely the depth I had when I came in to
>the position, which will be the same depth I use when I probe later.  If you
>look at my code, inside a ply I _never_ adjust "depth".  I have a separate
>modifier that is added to it when I recursively call search.

Ah, I've never managed to do that so I took a different approach. ( First time I
looked at the Crafty code was about 4 weeks ago to see how the tablebases were
implemented.) Did give me the right ideas how to implement it in Delphi.

Tony

>
>So that 'depth' when I do a probe is exactly the same for this position as
>when I did a store.
>
>
>
>>
>>>
>>>Don't forget that the hash entry will be the result of searching _all_
>>>moves at this ply, which _does_ factor in the extensions for each move as
>>>appropriate...



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.