X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.h;h=4a66b11f48d8bcaf76d1ca95901f975b1143b699;hp=5f9b74d7e530e4b0df12bc6e851678b9bc845249;hb=733d0099b2a3e3ad594bb551d37c8a06c62f13db;hpb=b50ce5ebfbc9f8b043f0d915c47b0ac550d4affc diff --git a/src/search.h b/src/search.h index 5f9b74d7..4a66b11f 100644 --- a/src/search.h +++ b/src/search.h @@ -44,7 +44,7 @@ struct Stack { Move excludedMove; Move killers[2]; Depth reduction; - Value eval; + Value staticEval; Value evalMargin; int skipNullMove; }; @@ -56,12 +56,11 @@ struct Stack { /// all non-pv moves. struct RootMove { - RootMove(){} // Needed by sort() RootMove(Move m) : score(-VALUE_INFINITE), prevScore(-VALUE_INFINITE) { pv.push_back(m); pv.push_back(MOVE_NONE); } - bool operator<(const RootMove& m) const { return score < m.score; } + bool operator<(const RootMove& m) const { return score > m.score; } // Ascending sort bool operator==(const Move& m) const { return pv[0] == m; } void extract_pv_from_tt(Position& pos); @@ -80,9 +79,9 @@ struct RootMove { struct LimitsType { LimitsType() { memset(this, 0, sizeof(LimitsType)); } - bool use_time_management() const { return !(movetime | depth | nodes | infinite); } + bool use_time_management() const { return !(mate | movetime | depth | nodes | infinite); } - int time[2], inc[2], movestogo, depth, nodes, movetime, infinite, ponder; + int time[COLOR_NB], inc[COLOR_NB], movestogo, depth, nodes, movetime, mate, infinite, ponder; }; @@ -98,7 +97,8 @@ typedef std::auto_ptr > StateStackPtr; extern volatile SignalsType Signals; extern LimitsType Limits; extern std::vector RootMoves; -extern Position RootPosition; +extern Position RootPos; +extern Color RootColor; extern Time::point SearchTime; extern StateStackPtr SetupStates;