// Remaining depth: 1 ply 1.5 ply 2 ply 2.5 ply 3 ply 3.5 ply
const Value RazorApprMargins[6] = { Value(0x520), Value(0x300), Value(0x300), Value(0x300), Value(0x300), Value(0x300) };
+ // The main transposition table
+ TranspositionTable TT;
+
/// Variables initialized by UCI options
int NodesSincePoll;
int NodesBetweenPolls = 30000;
- // The main transposition table
- TranspositionTable TT;
-
/// Functions
// Calculate dynamic search window based on previous iterations
Value alpha, beta;
- if (MultiPV == 1 && Iteration >= 6)
+ if (MultiPV == 1 && Iteration >= 6 && abs(IterationInfo[Iteration - 1].value) < VALUE_KNOWN_WIN)
{
int prevDelta1 = IterationInfo[Iteration - 1].speculatedValue - IterationInfo[Iteration - 2].speculatedValue;
int prevDelta2 = IterationInfo[Iteration - 2].speculatedValue - IterationInfo[Iteration - 3].speculatedValue;
&& moveCount >= LMRPVMoves
&& !dangerous
&& !moveIsCapture
- && !move_promotion(move)
+ && !move_is_promotion(move)
&& !move_is_castle(move)
&& !move_is_killer(move, ss[ply]))
{
if ( useFutilityPruning
&& !dangerous
&& !moveIsCapture
- && !move_promotion(move))
+ && !move_is_promotion(move))
{
// History pruning. See ok_to_prune() definition
if ( moveCount >= 2 + int(depth)
&& moveCount >= LMRNonPVMoves
&& !dangerous
&& !moveIsCapture
- && !move_promotion(move)
+ && !move_is_promotion(move)
&& !move_is_castle(move)
&& !move_is_killer(move, ss[ply]))
{
if ( enoughMaterial
&& !isCheck
&& !pvNode
- && !move_promotion(move)
+ && !move_is_promotion(move)
&& !pos.move_is_check(move, dcCandidates)
&& !pos.move_is_passed_pawn_push(move))
{
// Don't search captures and checks with negative SEE values
if ( !isCheck
- && !move_promotion(move)
+ && !move_is_promotion(move)
&& (pos.midgame_value_of_piece_on(move_from(move)) >
pos.midgame_value_of_piece_on(move_to(move)))
&& pos.see(move) < 0)
if ( useFutilityPruning
&& !dangerous
&& !moveIsCapture
- && !move_promotion(move)
+ && !move_is_promotion(move)
&& moveCount >= 2 + int(sp->depth)
&& ok_to_prune(pos, move, ss[sp->ply].threatMove, sp->depth, Threads[threadID].H))
continue;
if ( !dangerous
&& moveCount >= LMRNonPVMoves
&& !moveIsCapture
- && !move_promotion(move)
+ && !move_is_promotion(move)
&& !move_is_castle(move)
&& !move_is_killer(move, ss[sp->ply]))
{
if ( !dangerous
&& moveCount >= LMRPVMoves
&& !moveIsCapture
- && !move_promotion(move)
+ && !move_is_promotion(move)
&& !move_is_castle(move)
&& !move_is_killer(move, ss[sp->ply]))
{
&& pos.type_of_piece_on(move_to(m)) != PAWN
&& ( pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
- pos.midgame_value_of_piece_on(move_to(m)) == Value(0))
- && !move_promotion(m)
+ && !move_is_promotion(m)
&& !move_is_ep(m))
{
result += PawnEndgameExtension[pvNode];
bool ok_to_history(const Position& pos, Move m) {
- return !pos.move_is_capture(m) && !move_promotion(m);
+ return !pos.move_is_capture(m) && !move_is_promotion(m);
}