assert(d <= DEPTH_ZERO);
stage = pos.checkers() ? EVASION_TT : QSEARCH_TT;
- ttMove = ttm
- && pos.pseudo_legal(ttm)
- && (depth > DEPTH_QS_RECAPTURES || to_sq(ttm) == recaptureSquare) ? ttm : MOVE_NONE;
+ ttMove = ttm
+ && (depth > DEPTH_QS_RECAPTURES || to_sq(ttm) == recaptureSquare)
+ && pos.pseudo_legal(ttm) ? ttm : MOVE_NONE;
stage += (ttMove == MOVE_NONE);
}
stage = PROBCUT_TT;
ttMove = ttm
- && pos.pseudo_legal(ttm)
&& pos.capture(ttm)
+ && pos.pseudo_legal(ttm)
&& pos.see_ge(ttm, threshold) ? ttm : MOVE_NONE;
stage += (ttMove == MOVE_NONE);
}
m.value = (*mainHistory)[pos.side_to_move()][from_to(m)]
+ (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)]
+ (*continuationHistory[1])[pos.moved_piece(m)][to_sq(m)]
- + (*continuationHistory[3])[pos.moved_piece(m)][to_sq(m)];
+ + (*continuationHistory[3])[pos.moved_piece(m)][to_sq(m)]
+ + (*continuationHistory[5])[pos.moved_piece(m)][to_sq(m)] / 2;
else // Type == EVASIONS
{