assert((ss-1)->currentMove != MOVE_NONE);
assert((ss-1)->currentMove != MOVE_NULL);
- MovePicker mp(pos, ttMove, History, CounterMovesHistory, pos.captured_piece_type());
+ MovePicker mp(pos, ttMove, History, CounterMovesHistory, PieceValue[MG][pos.captured_piece_type()]);
CheckInfo ci(pos);
while ((move = mp.next_move<false>()) != MOVE_NONE)
[pos.piece_on(to_sq(move))][to_sq(move)] <= VALUE_ZERO))
ss->reduction += ONE_PLY;
- if ( move == countermove
- || ( History[pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO
- && CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq]
- [pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO))
+ if ( History[pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO
+ && CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq]
+ [pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO)
ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY);
// Decrease reduction for moves that escape a capture