namespace Search {
/// Threshold used for countermoves based pruning
-const int CounterMovePruneThreshold = 0;
+constexpr int CounterMovePruneThreshold = 0;
/// Stack struct keeps track of the information we need to remember from nodes
struct Stack {
Move* pv;
- PieceToHistory* contHistory;
+ PieceToHistory* continuationHistory;
int ply;
Move currentMove;
Move excludedMove;
Value score = -VALUE_INFINITE;
Value previousScore = -VALUE_INFINITE;
int selDepth = 0;
+ int tbRank;
+ Value tbScore;
std::vector<Move> pv;
};
struct LimitsType {
LimitsType() { // Init explicitly due to broken value-initialization of non POD in MSVC
- nodes = time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] =
- npmsec = movestogo = depth = movetime = mate = perft = infinite = 0;
+ time[WHITE] = time[BLACK] = inc[WHITE] = inc[BLACK] = npmsec = movetime = TimePoint(0);
+ movestogo = depth = mate = perft = infinite = 0;
+ nodes = 0;
}
bool use_time_management() const {
}
std::vector<Move> searchmoves;
- int time[COLOR_NB], inc[COLOR_NB], npmsec, movestogo, depth,
- movetime, mate, perft, infinite;
+ TimePoint time[COLOR_NB], inc[COLOR_NB], npmsec, movetime, startTime;
+ int movestogo, depth, mate, perft, infinite;
int64_t nodes;
- TimePoint startTime;
};
extern LimitsType Limits;