Reduce memory footprint of continuation history
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 25 Oct 2019 14:27:30 +0000 (16:27 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 25 Oct 2019 14:27:30 +0000 (16:27 +0200)
Close #43.

No functional change.

src/movepick.h

index 0ae1214..f188375 100644 (file)
@@ -96,7 +96,7 @@ typedef Stats<Move, NOT_USED, PIECE_NB, SQUARE_NB> CounterMoveHistory;
 typedef Stats<int16_t, 10692, PIECE_NB, SQUARE_NB, PIECE_TYPE_NB> CapturePieceToHistory;
 
 /// PieceToHistory is like ButterflyHistory but is addressed by a move's [piece][to]
-typedef Stats<int16_t, 29952, PIECE_NB, SQUARE_NB> PieceToHistory;
+typedef Stats<int16_t, 29952, 2 * PIECE_SLOTS, SQUARE_NB> PieceToHistory;
 
 /// ContinuationHistory is the combined history of a given pair of moves, usually
 /// the current one given a previous one. The nested history table is based on