X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.h;h=03fa5c640373f73affd8a41818ade11606da5845;hp=bd371a4aac1b705fb3b6a8eb1a1df9c7799bf09a;hb=70b1b79264b2a160f72dd2aa92c2f80045e4cd83;hpb=2608b9249d9c25a699c8db8725e35bd4ec0b65ab diff --git a/src/search.h b/src/search.h index bd371a4a..03fa5c64 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 !(maxTime | maxDepth | maxNodes | infinite); } + bool use_time_management() const { return !(movetime | depth | nodes | infinite); } - int time, increment, movesToGo, maxTime, maxDepth, maxNodes, infinite, ponder; + int time[COLOR_NB], inc[COLOR_NB], movestogo, depth, nodes, movetime, 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 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