mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 18:17:02 +08:00
Introduce Counter Move History tables
Introduce a counter move history table which additionally is indexed by the last move's piece and target square. For quiet move ordering use now the sum of standard and counter move history table. STC: LLR: 2.96 (-2.94,2.94) [-1.50,4.50] Total: 4747 W: 1005 L: 885 D: 2857 LTC: LLR: 2.95 (-2.94,2.94) [0.00,6.00] Total: 5726 W: 1001 L: 872 D: 3853 Because of reported low NPS on multi core test STC (7 threads): ELO: 7.26 +-3.3 (95%) LOS: 100.0% Total: 14937 W: 2710 L: 2398 D: 9829 Bench: 7725341 Resolves #282
This commit is contained in:
committed by
Joona Kiiski
parent
81c7975dcd
commit
13c11f4048
@@ -43,6 +43,7 @@ struct Stats {
|
||||
static const Value Max = Value(250);
|
||||
|
||||
const T* operator[](Piece pc) const { return table[pc]; }
|
||||
T* operator[](Piece pc) { return table[pc]; }
|
||||
void clear() { std::memset(table, 0, sizeof(table)); }
|
||||
|
||||
void update(Piece pc, Square to, Move m) {
|
||||
@@ -70,6 +71,7 @@ private:
|
||||
typedef Stats< true, Value> GainsStats;
|
||||
typedef Stats<false, Value> HistoryStats;
|
||||
typedef Stats<false, std::pair<Move, Move> > MovesStats;
|
||||
typedef Stats<false, HistoryStats> CounterMovesHistoryStats;
|
||||
|
||||
|
||||
/// MovePicker class is used to pick one pseudo legal move at a time from the
|
||||
@@ -84,9 +86,9 @@ public:
|
||||
MovePicker(const MovePicker&) = delete;
|
||||
MovePicker& operator=(const MovePicker&) = delete;
|
||||
|
||||
MovePicker(const Position&, Move, Depth, const HistoryStats&, Square);
|
||||
MovePicker(const Position&, Move, const HistoryStats&, PieceType);
|
||||
MovePicker(const Position&, Move, Depth, const HistoryStats&, Move*, Move*, Search::Stack*);
|
||||
MovePicker(const Position&, Move, Depth, const HistoryStats&, const CounterMovesHistoryStats&, Square);
|
||||
MovePicker(const Position&, Move, const HistoryStats&, const CounterMovesHistoryStats&, PieceType);
|
||||
MovePicker(const Position&, Move, Depth, const HistoryStats&, const CounterMovesHistoryStats&, Move*, Move*, Search::Stack*);
|
||||
|
||||
template<bool SpNode> Move next_move();
|
||||
|
||||
@@ -98,6 +100,7 @@ private:
|
||||
|
||||
const Position& pos;
|
||||
const HistoryStats& history;
|
||||
const CounterMovesHistoryStats& counterMovesHistory;
|
||||
Search::Stack* ss;
|
||||
Move* countermoves;
|
||||
Move* followupmoves;
|
||||
|
||||
Reference in New Issue
Block a user