X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.h;h=600d7a75198500dfd4582f48e76c239ebb5b2a50;hb=76a0d3c05ac84cd2016ba304f6d5290d04450bec;hp=c957c34bf6259b1107ddd860209454ffffed9351;hpb=cc2b3ece5c5d8d1183f8526fbb0ee4e1ea7a69fe;p=stockfish diff --git a/src/search.h b/src/search.h index c957c34b..600d7a75 100644 --- a/src/search.h +++ b/src/search.h @@ -21,11 +21,14 @@ #define SEARCH_H_INCLUDED #include +#include +#include #include +#include "misc.h" +#include "position.h" #include "types.h" -class Position; struct SplitPoint; namespace Search { @@ -41,7 +44,7 @@ struct Stack { Move excludedMove; Move killers[2]; Depth reduction; - Value eval; + Value staticEval; Value evalMargin; int skipNullMove; }; @@ -77,9 +80,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 times[2], incs[2], movestogo, depth, nodes, movetime, infinite, ponder; + int time[COLOR_NB], inc[COLOR_NB], movestogo, depth, nodes, movetime, mate, infinite, ponder; }; @@ -90,13 +93,18 @@ struct SignalsType { bool stopOnPonderhit, firstRootMove, stop, failedLowAtRoot; }; +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; extern void init(); -extern int64_t perft(Position& pos, Depth depth); +extern size_t perft(Position& pos, Depth depth); extern void think(); } // namespace Search