summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d2971f3)
After the history simplifications, we are only using Value Stats for CounterMoveHistory table. Therefore the parameter CM is not necessary.
No functional change.
/// Entries are stored using only the moving piece and destination square, hence
/// two moves with different origin but same destination and piece will be
/// considered identical.
/// Entries are stored using only the moving piece and destination square, hence
/// two moves with different origin but same destination and piece will be
/// considered identical.
-template<typename T, bool CM = false>
struct Stats {
const T* operator[](Piece pc) const { return table[pc]; }
T* operator[](Piece pc) { return table[pc]; }
struct Stats {
const T* operator[](Piece pc) const { return table[pc]; }
T* operator[](Piece pc) { return table[pc]; }
if (abs(int(v)) >= 324)
return;
if (abs(int(v)) >= 324)
return;
- table[pc][to] -= table[pc][to] * abs(int(v)) / (CM ? 936 : 324);
+ table[pc][to] -= table[pc][to] * abs(int(v)) / 936;
table[pc][to] += int(v) * 32;
}
table[pc][to] += int(v) * 32;
}
};
typedef Stats<Move> MoveStats;
};
typedef Stats<Move> MoveStats;
-typedef Stats<Value, true> CounterMoveStats;
+typedef Stats<Value> CounterMoveStats;
typedef Stats<CounterMoveStats> CounterMoveHistoryStats;
typedef Stats<CounterMoveStats> CounterMoveHistoryStats;