X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.h;h=477570e3919e3d40c7d0092e44a61630a4357e61;hp=1218ef3be223289f10fbb744d3bab771d1b32fb8;hb=44236f4ed9844598e1cb065937c3770a938964b2;hpb=8b15961349e18a9ba113973c53f53913d0cd0fad diff --git a/src/search.h b/src/search.h index 1218ef3b..477570e3 100644 --- a/src/search.h +++ b/src/search.h @@ -21,7 +21,6 @@ #ifndef SEARCH_H_INCLUDED #define SEARCH_H_INCLUDED -#include #include #include "misc.h" @@ -38,13 +37,13 @@ namespace Search { struct Stack { Move* pv; - CounterMoveStats* counterMoves; + PieceToHistory* contHistory; int ply; Move currentMove; Move excludedMove; Move killers[2]; Value staticEval; - int history; + int statScore; int moveCount; }; @@ -56,14 +55,16 @@ struct Stack { struct RootMove { explicit RootMove(Move m) : pv(1, m) {} - - bool operator<(const RootMove& m) const { - return m.score != score ? m.score < score : m.previousScore < previousScore; } // Descending sort - bool operator==(const Move& m) const { return pv[0] == m; } bool extract_ponder_from_tt(Position& pos); + bool operator==(const Move& m) const { return pv[0] == m; } + bool operator<(const RootMove& m) const { // Sort in descending order + return m.score != score ? m.score < score + : m.previousScore < previousScore; + } Value score = -VALUE_INFINITE; Value previousScore = -VALUE_INFINITE; + int selDepth = 0; std::vector pv; }; @@ -91,15 +92,6 @@ struct LimitsType { TimePoint startTime; }; - -/// SignalsType struct stores atomic flags updated during the search, typically -/// in an async fashion e.g. to stop the search by the GUI. - -struct SignalsType { - std::atomic_bool stop, stopOnPonderhit; -}; - -extern SignalsType Signals; extern LimitsType Limits; void init();