In line with the Stockfish implementation (and suggested by Rein), I now have the next formula for the LMR depth-reduction:
Code: Select all
void CSearch64::DepthReduction_Init(void)
{
int i, j, iReduction;
double dReduction;
for (i = 1; i < 64; i++)
for (j = 1; j < 64; j++) {
dReduction = 0.5 + log(double(i)) * log(double(j))/fLMR;
iReduction = int(dReduction >= 1.0 ? floor(dReduction) : 0);
iDepthReduction[i][j] = iReduction;
}
}
Code: Select all
inline int DepthReduction(int iDepth, int iMove) {
return ( iDepthReduction[min(iDepth,63)][min(iMove,63)] );
}
I still used a limit for depth and movecount, whereas with the log*log approach I might omit this in a next test:
Code: Select all
if (pSearchThreadData->bLMR && (pTDepth->bPV == false) && (pTDepth->iXCapture == 0) && (iXMovesSearched >= 4) && (iNewDepth >= 3)) {
iRDepth = (bDDepth && pTDepth->bPromotion == false ? iNewDepth - 1 : iNewDepth) - DepthReduction(iNewDepth, iXMovesSearched);
iRDepth = max(iRDepth, 1);
iMWScore = -SearchX(iSearchThreadID, iRDepth, -iAlfa-1, -iAlfa, pTDepth + 1, pEngineData, !bTurn);
In the Table the ELO-difference as a function of fLMR (Perspective Damage).
Code: Select all
LMR Off LMR On
0.5 -2 -42
1 -2 0
2 -2 2
3 -2 -11
4 -2 18
5 -2 2
6 -2 -11
7 -2 -2
8 -2 -31
9 -2 -29
Code: Select all
fLMR 0.5 1 2 3 4 5 6 7 8 9 off
W 25 15 17 12 10 12 17 16 25 26 14
L 6 15 18 7 18 13 12 15 11 13 13
D 127 128 123 139 130 133 129 127 122 119 131
Bert