std::memset(ss-7, 0, 10 * sizeof(Stack));
for (int i = 7; i > 0; i--)
- (ss-i)->continuationHistory = &this->continuationHistory[0][NO_PIECE][0]; // Use as a sentinel
+ (ss-i)->continuationHistory = &this->continuationHistory[0][0][NO_PIECE][0]; // Use as a sentinel
ss->pv = pv;
if (rootDepth >= 4)
{
Value previousScore = rootMoves[pvIdx].previousScore;
- delta = Value(23);
+ delta = Value(21 + abs(previousScore) / 128);
alpha = std::max(previousScore - delta,-VALUE_INFINITE);
beta = std::min(previousScore + delta, VALUE_INFINITE);
Depth R = (835 + 70 * depth) / 256 + std::min(int(eval - beta) / 185, 3);
ss->currentMove = MOVE_NULL;
- ss->continuationHistory = &thisThread->continuationHistory[0][NO_PIECE][0];
+ ss->continuationHistory = &thisThread->continuationHistory[0][0][NO_PIECE][0];
pos.do_null_move(st);
probCutCount++;
ss->currentMove = move;
- ss->continuationHistory = &thisThread->continuationHistory[priorCapture][pos.moved_piece(move)][to_sq(move)];
+ ss->continuationHistory = &thisThread->continuationHistory[inCheck][priorCapture][pos.moved_piece(move)][to_sq(move)];
assert(depth >= 5);
// Update the current move (this must be done after singular extension search)
ss->currentMove = move;
- ss->continuationHistory = &thisThread->continuationHistory[priorCapture][movedPiece][to_sq(move)];
+ ss->continuationHistory = &thisThread->continuationHistory[inCheck][priorCapture][movedPiece][to_sq(move)];
// Step 15. Make the move
pos.do_move(move, st, givesCheck);
}
ss->currentMove = move;
- ss->continuationHistory = &thisThread->continuationHistory[priorCapture][pos.moved_piece(move)][to_sq(move)];
+ ss->continuationHistory = &thisThread->continuationHistory[inCheck][priorCapture][pos.moved_piece(move)][to_sq(move)];
// Make and search the move
pos.do_move(move, st, givesCheck);