Will keep it on my list. I have a version with no fail lows at the root now (window=(-inf, +inf)). Testing and tweaking as this affected several places in the code.hgm wrote:How about this algorithm?
This would try to solve a fail low that just fails a little bit low in the current node, but on a drastic score drop would prefer to hand the fail low down to the parent.Code: Select all
int Search(int realAlpha, int realBeta, int aspirationWidth) { int alpha = realAlpha, beta = realBeta; ProbeHash(); if(beta - alpha > 1) { // PV node alpha = hash.score - aspirationWidth; if(alpha < realAlpha) alpha = realAlpha; } do { int startAlpha = alpha; for(ALL_MOVES) { MakeMove(); score = -Search(-beta, -alpha, aspirationWidth*0.95); UnMake(); if(score > alpha) { alpha = score; ... } } retry = (alpha <= startAlpha && alpha < realAlpha); alpha = realAlpha; } while(retry); return alpha; } // Root call: Search(-MATE, +MATE, 100*centiPawn);
First thing I noticed is a massive reduction in those fail high followed by a fail low (at the root) circumstances that were always annoying... But I have to first confirm I haven't broken anything, then test thoroughly...