X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=5c0f4f5b775c57f811a382746936b519043c9710;hp=7120ba0c37feeffb4c83bbde8a9aca0c2c26b3aa;hb=1130c8d8153b2132c4352324421f342e9c50b08e;hpb=607ac0687a53c764ad548932d35e651c540f4764 diff --git a/src/movepick.cpp b/src/movepick.cpp index 7120ba0c..5c0f4f5b 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -61,10 +61,12 @@ namespace { MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss) : pos(p), H(h) { + int searchTT = ttm; ttMoves[0].move = ttm; if (ss) { ttMoves[1].move = (ss->mateKiller == ttm)? MOVE_NONE : ss->mateKiller; + searchTT |= ttMoves[1].move; killers[0].move = ss->killers[0]; killers[1].move = ss->killers[1]; } else @@ -81,11 +83,11 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, if (p.is_check()) phasePtr = EvasionsPhaseTable; else if (d > Depth(0)) - phasePtr = MainSearchPhaseTable; + phasePtr = MainSearchPhaseTable + !searchTT; else if (d == Depth(0)) - phasePtr = QsearchWithChecksPhaseTable; + phasePtr = QsearchWithChecksPhaseTable + !searchTT; else - phasePtr = QsearchWithoutChecksPhaseTable; + phasePtr = QsearchWithoutChecksPhaseTable + !searchTT; phasePtr--; go_next_phase();