yes that hit rate seems reasonable. But this leads to another interesting idea: For any probe the tb code has to decode a whole block (4kb?). Why then not put everything in this block (or a subset) into the hash table, instead of just returning one probe. All what's needed is a "block->hash" converter. This would bypass all the individual probes and eliminate the need for soft probing as the hash table is already in alignment with the egtb cache. I wonder how much time relative to individual probing would be needed to convert a whole block (or a subset) to hash entries. Any ideas?
michiguel wrote:The difference is huge!!. In the example I posted above you can see thisIQ wrote:Hi,
i wonder how effective this scheme really is. I would reckon that if hash table probes are also stored in the hash table, the number of "probe_softs" that are actually a tb cache hit to be minute. Do you have any numbers of the probe_soft hit rate?
GTB CACHE STATS
probes: 144794
hard: 5406
soft: 139388
hits: 64661
misses: 1115
softmisses: 79018
efficiency: 98.3%
average searches 786.4
occupancy: 54.4%
there you have 5406 "hard probes", but the number of hits was 64661 (that is soft + hard hits). In other words, the efficiency of total hits increases in such a way that is 12X more than the number of "hard" probes itself!
Half of the soft probes are misses, but that's not big deal because they are relatively cheap.It deserves experimentation but I think that the return will be little if the soft probes are implemented. Particularly because these queued systems will only work with uncompressed TBs.
There are many soft hits that are not in the hash table. Those are positions that were never visited in the search, but are neighbors in the tb blocks, when they are decompressed.
Miguel
The other scheme with the async i/o is also flawed as it would have to be queued. It would pile up a huge amount of probes in one part of the tree.
Therefore i would propose a prioritzed async queue system - the prioritization can easily done via search depth. This should ensure that the important tb probes actually get done in time to be meaningful for search.
What do you guys think?
Miguel
-IQmichiguel wrote: Because of this idea is that I started to write my own TBs so I can implement it. However, I found that something simpler could be done. This is what I have already in Gaviota and it works very well (not in the released version yet)
tb_probe_hard ()
{
/* it is the normal blocking probe. it probes the cache, if the info is not there, it loads the cache with the info needed and also returns the info */
}
tb_probe_soft()
{
/* probes the cache, if it is not there, return tb_UNKNOWN */
}
So, when the remaining depth is < 2 I only do tb_probe_soft(). At any other point, I do tb_probe_hard().
I see no decrease in nps when using remaining depth = 2, which indicates that probing is not that bad because we do not probe so often, many positions are in the hashtable, and many are already in cache. If I probe in the last two plies "softly", those probes are for free and the number of probes may increase in an order of magnitude.