X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.h;h=5f9b74d7e530e4b0df12bc6e851678b9bc845249;hb=4e7da9be3dcb2d58d59da7b3d421a1ff20f040a9;hp=a4cba6bf700ed7e716b8a8aaf2fdd1c723290b42;hpb=103b368ab7f5fd696e0c6925917344d15a3c2d9c;p=stockfish diff --git a/src/search.h b/src/search.h index a4cba6bf..5f9b74d7 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 { @@ -39,7 +42,6 @@ struct Stack { int ply; Move currentMove; Move excludedMove; - Move bestMove; Move killers[2]; Depth reduction; Value eval; @@ -78,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[2], inc[2], movestogo, depth, nodes, movetime, infinite, ponder; }; @@ -91,13 +93,17 @@ 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 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