X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=e02529327435b46f49f4780d591877b201042cbf;hp=d654fec9c414a75be3fd6d406fdaf8fc24053613;hb=314faa905a60962595d610c26727c4b603c6ed62;hpb=a530fc2b600da4e9247a0e0242dead246d824c68 diff --git a/src/search.cpp b/src/search.cpp index d654fec9..e0252932 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1314,7 +1314,13 @@ namespace { ss[ply].currentMove = MOVE_NULL; pos.do_null_move(st); - int R = (depth >= 5 * OnePly ? 4 : 3); // Null move dynamic reduction + + // Null move dynamic reduction based on depth + int R = (depth >= 5 * OnePly ? 4 : 3); + + // Null move dynamic reduction based on value + if (approximateEval - beta > PawnValueMidgame) + R++; nullValue = -search(pos, ss, -(beta-1), depth-R*OnePly, ply+1, false, threadID);