+ // IterationInfoType stores search results for each iteration
+ //
+ // Because we use relatively small (dynamic) aspiration window,
+ // there happens many fail highs and fail lows in root. And
+ // because we don't do researches in those cases, "value" stored
+ // here is not necessarily exact. Instead in case of fail high/low
+ // we guess what the right value might be and store our guess
+ // as a "speculated value" and then move on. Speculated values are
+ // used just to calculate aspiration window width, so also if are
+ // not exact is not big a problem.
+
+ struct IterationInfoType {
+
+ IterationInfoType(Value v = Value(0), Value sv = Value(0))
+ : value(v), speculatedValue(sv) {}
+
+ Value value, speculatedValue;
+ };
+
+
+ // The BetaCounterType class is used to order moves at ply one.
+ // Apart for the first one that has its score, following moves
+ // normally have score -VALUE_INFINITE, so are ordered according
+ // to the number of beta cutoffs occurred under their subtree during
+ // the last iteration.
+
+ struct BetaCounterType {
+
+ BetaCounterType();
+ void clear();
+ void add(Color us, Depth d, int threadID);
+ void read(Color us, int64_t& our, int64_t& their);
+
+ int64_t hits[THREAD_MAX][2];
+ };
+
+