X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsearch.cpp;h=23066d8f5d7186aa5391dca08822787624c53e0d;hb=0fdc75c0bdf1b273f080724d03fd706ebb8c17cb;hp=c1a91a97ea0f637ca1658bb946c1886060f3ce65;hpb=dae7cacd3bec86bbe35796825942335c5078f950;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index c1a91a97..23066d8f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1103,8 +1103,11 @@ namespace { tte = TT.retrieve(pos.get_key()); ttMove = (tte ? tte->move() : MOVE_NONE); - // Go with internal iterative deepening if we don't have a TT move - if (UseIIDAtPVNodes && ttMove == MOVE_NONE && depth >= 5*OnePly) + // Go with internal iterative deepening if we don't have a TT move or + // if search depth is more then 4*OnePly higher then TT move depth. + if ( UseIIDAtPVNodes + && depth >= 5*OnePly + &&(!ttMove || depth > tte->depth() + 4*OnePly)) { search_pv(pos, ss, alpha, beta, depth-2*OnePly, ply, threadID); ttMove = ss[ply].pv[ply];