Move movesSearched[256];
EvalInfo ei;
StateInfo st;
- Bitboard dcCandidates;
const TTEntry* tte;
Move ttMove, move;
Depth ext, newDepth;
isCheck = pos.is_check();
mateThreat = pos.has_mate_threat(opposite_color(pos.side_to_move()));
CheckInfo ci(pos);
- dcCandidates = ci.dcCandidates;
MovePicker mp = MovePicker(pos, ttMove, depth, H, &ss[ply]);
// Loop through all legal moves until no moves remain or a beta cutoff
newDepth = depth - OnePly + ext;
// Make and search the move
- pos.do_move(move, st, dcCandidates);
+ pos.do_move(move, st, ci.dcCandidates);
if (moveCount == 1) // The first move in list is the PV
value = -search_pv(pos, ss, -beta, -alpha, newDepth, ply+1, threadID);
&& !AbortSearch
&& !thread_should_stop(threadID)
&& split(pos, ss, ply, &alpha, &beta, &bestValue, VALUE_NONE, VALUE_NONE, depth,
- &moveCount, &mp, dcCandidates, threadID, true))
+ &moveCount, &mp, ci.dcCandidates, threadID, true))
break;
}
Move movesSearched[256];
EvalInfo ei;
StateInfo st;
- Bitboard dcCandidates;
const TTEntry* tte;
Move ttMove, move;
Depth ext, newDepth;
// to search all moves.
MovePicker mp = MovePicker(pos, ttMove, depth, H, &ss[ply]);
CheckInfo ci(pos);
- dcCandidates = ci.dcCandidates;
futilityValue = VALUE_NONE;
useFutilityPruning = depth < SelectiveDepth && !isCheck;
}
// Make and search the move
- pos.do_move(move, st, dcCandidates);
+ pos.do_move(move, st, ci.dcCandidates);
// Try to reduce non-pv search depth by one ply if move seems not problematic,
// if the move fails high will be re-searched at full depth.
&& !AbortSearch
&& !thread_should_stop(threadID)
&& split(pos, ss, ply, &beta, &beta, &bestValue, futilityValue, approximateEval, depth, &moveCount,
- &mp, dcCandidates, threadID, false))
+ &mp, ci.dcCandidates, threadID, false))
break;
}
EvalInfo ei;
StateInfo st;
- Bitboard dcCandidates;
Move ttMove, move;
Value staticValue, bestValue, value, futilityValue;
bool isCheck, enoughMaterial;
// queen promotions and checks (only if depth == 0) will be generated.
MovePicker mp = MovePicker(pos, ttMove, depth, H);
CheckInfo ci(pos);
- dcCandidates = ci.dcCandidates;
enoughMaterial = pos.non_pawn_material(pos.side_to_move()) > RookValueMidgame;
// Loop through the moves until no moves remain or a beta cutoff
continue;
// Make and search the move
- pos.do_move(move, st, dcCandidates);
+ pos.do_move(move, st, ci.dcCandidates);
value = -qsearch(pos, ss, -beta, -alpha, depth-OnePly, ply+1, threadID);
pos.undo_move(move);