X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.h;h=b7475577475246fa6892e309bde68afe6bd19097;hp=b6f28a73aa945d8091106f7d21a324e0c1d083e3;hb=55df3fa2d7631ed67e46f9433aa7f3a71c18e5e7;hpb=cc6c745b543e0cd94dea82deeed25572227f98ab diff --git a/src/search.h b/src/search.h index b6f28a73..b7475577 100644 --- a/src/search.h +++ b/src/search.h @@ -21,12 +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 { @@ -42,7 +44,7 @@ struct Stack { Move excludedMove; Move killers[2]; Depth reduction; - Value eval; + Value staticEval; Value evalMargin; int skipNullMove; }; @@ -80,7 +82,7 @@ struct LimitsType { LimitsType() { memset(this, 0, sizeof(LimitsType)); } bool use_time_management() const { return !(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, infinite, ponder; }; @@ -91,14 +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 Time SearchTime; +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