Author: Robert Hyatt
Date: 07:02:27 07/08/01
Go up one level in this thread
On July 08, 2001 at 08:56:32, Alvaro Jose Povoa Cardoso wrote: > >My problems with mate scores adjustments are all gone now, thanks to the help of >Dr. Hyatt and Bruce Moreland. > >In main.c of Crafty 16.18 there is the following notes: >* A very interesting bug was found in storing mate bounds in the hash * >* table, one I had not heard of before. I now store two MATE * >* bounds, either > MATE-300, or < -MATE+300, which is conservative * >* but safe. > >Could you please explain why should we do so? This had to do with the problem that the bound is an absolute thing that says the score can not be less than X or it can not be greater than X. But X depends on the ply depth and it caused problems when I tried to adjust it like I adjust exact mate scores. That is all that I can really say here as this was done several years ago and I don't recall the exact circumstance where I got burned by this problem... I simply remember that it was a lot of debugging (hash table problems are generally difficult to debug since you have to follow a deep and complicated tree search). > > >Also this code is from Craft 18.XX > if (type == EXACT) { > if (value > MATE-300) value=value+ply-1; > else if (value < -MATE+300) value=value-ply+1; > if ((int) tree->pv[ply].pathl >= ply) > word1l|=tree->pv[ply].path[ply]; > } > else if (type == LOWER) { > word1l|=tree->current_move[ply]; > value=Min(value,MATE-300); <--------| > } | > else { | > value=Max(value,-MATE+300); <--------| > } | > v >Could you also please explain the lines: > value=Min(value,MATE-300); I keep the actual value passed in, _unless_ it is either > MATE-300, or < -MATE+300. If it is > MATE-300, I store a lesser bound MATE-300, which is still correct, but more conservative. If the score is < -MATE+300, I store a more conservative bound -MATE+300... I can do this because it is easy to prove that if the bound is supposed to be > MATE-10 (for example) then it is certainly greater than MATE-300 as well. And the MATE-300 needs no correction. One day this won't be good enough as TB mates are already at mate in 126 or 127. Which is 250 plies. That is getting dangerously close to my 300 ply fudge above. > value=Max(value,-MATE+300); >It was the inclusion of these two lines that solve all of my hash >inconsistencies and mate scores problems in the hash table. >But I don't understand how these two lines work, could you please explain? They simply take a bound that is really a mate in N score, and turns it into a mate in 150 score, so that I can safely store that without any need to adjust it depending on the depth, when I hit this position later... > >I also would apreciate very much an explanation from Bruce Moreland. >I don't kow much about him but seams to me he is quite an expert on the field. > He certainly is. Ferret is a difficult opponent to beat. > >Best regards, >Alvaro Cardoso
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.