]> git.sesse.net Git - stockfish/blobdiff - src/search.h
Retire refine_eval()
[stockfish] / src / search.h
index a4cba6bf700ed7e716b8a8aaf2fdd1c723290b42..03fa5c640373f73affd8a41818ade11606da5845 100644 (file)
 #define SEARCH_H_INCLUDED
 
 #include <cstring>
 #define SEARCH_H_INCLUDED
 
 #include <cstring>
+#include <memory>
+#include <stack>
 #include <vector>
 
 #include <vector>
 
+#include "misc.h"
+#include "position.h"
 #include "types.h"
 
 #include "types.h"
 
-class Position;
 struct SplitPoint;
 
 namespace Search {
 struct SplitPoint;
 
 namespace Search {
@@ -39,10 +42,9 @@ struct Stack {
   int ply;
   Move currentMove;
   Move excludedMove;
   int ply;
   Move currentMove;
   Move excludedMove;
-  Move bestMove;
   Move killers[2];
   Depth reduction;
   Move killers[2];
   Depth reduction;
-  Value eval;
+  Value staticEval;
   Value evalMargin;
   int skipNullMove;
 };
   Value evalMargin;
   int skipNullMove;
 };
@@ -78,9 +80,9 @@ struct RootMove {
 struct LimitsType {
 
   LimitsType() { memset(this, 0, sizeof(LimitsType)); }
 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;
 };
 
 
 };
 
 
@@ -91,13 +93,18 @@ struct SignalsType {
   bool stopOnPonderhit, firstRootMove, stop, failedLowAtRoot;
 };
 
   bool stopOnPonderhit, firstRootMove, stop, failedLowAtRoot;
 };
 
+typedef std::auto_ptr<std::stack<StateInfo> > StateStackPtr;
+
 extern volatile SignalsType Signals;
 extern LimitsType Limits;
 extern std::vector<RootMove> RootMoves;
 extern Position RootPosition;
 extern volatile SignalsType Signals;
 extern LimitsType Limits;
 extern std::vector<RootMove> RootMoves;
 extern Position RootPosition;
+extern Color RootColor;
+extern Time::point SearchTime;
+extern StateStackPtr SetupStates;
 
 extern void init();
 
 extern void init();
-extern int64_t perft(Position& pos, Depth depth);
+extern size_t perft(Position& pos, Depth depth);
 extern void think();
 
 } // namespace Search
 extern void think();
 
 } // namespace Search