Skip to content

Commit dc6a378

Browse files
authored
Separate promotions in tactical history on captures (#403)
Bench: 5480015 Separate promotion captures from promotions in tactical history. STC ELO | 3.08 +- 3.05 (95%) SPRT | 10.0+0.10s Threads=1 Hash=8MB LLR | 2.95 (-2.94, 2.94) [-1.00, 4.00] GAMES | N: 23032 W: 5439 L: 5235 D: 12358 LTC ELO | 1.34 +- 1.92 (95%) SPRT | 60.0+0.60s Threads=1 Hash=64MB LLR | -0.10 (-2.94, 2.94) [0.00, 4.00] GAMES | N: 55176 W: 12288 L: 12075 D: 30813
1 parent a7fcf67 commit dc6a378

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/history.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void UpdateHistories(Board* board, SearchData* data, Move bestMove, int depth, i
5353
} else {
5454
int piece = PieceType(Moving(bestMove));
5555
int to = To(bestMove);
56-
int captured = (IsEP(bestMove) || Promo(bestMove)) ? PAWN : PieceType(board->squares[to]);
56+
int captured = IsEP(bestMove) ? PAWN : PieceType(board->squares[to]);
5757

5858
AddHistoryHeuristic(&TH(piece, to, captured), inc);
5959
}
@@ -77,7 +77,7 @@ void UpdateHistories(Board* board, SearchData* data, Move bestMove, int depth, i
7777
if (m != bestMove) {
7878
int piece = PieceType(Moving(m));
7979
int to = To(m);
80-
int captured = (IsEP(m) || Promo(m)) ? PAWN : PieceType(board->squares[to]);
80+
int captured = IsEP(m) ? PAWN : PieceType(board->squares[to]);
8181

8282
AddHistoryHeuristic(&TH(piece, to, captured), -inc);
8383
}
@@ -108,7 +108,7 @@ int GetCounterHistory(SearchData* data, Move move) {
108108
int GetTacticalHistory(SearchData* data, Board* board, Move m) {
109109
int piece = PieceType(Moving(m));
110110
int to = To(m);
111-
int captured = (IsEP(m) || Promo(m)) ? PAWN : PieceType(board->squares[to]);
111+
int captured = IsEP(m) ? PAWN : PieceType(board->squares[to]);
112112

113113
return TH(piece, to, captured);
114114
}

src/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ typedef struct {
137137
int hh[2][2][2][64 * 64]; // history heuristic butterfly table (stm / threatened)
138138
int ch[12][64][12][64]; // continuation move history table
139139

140-
int th[6][64][6]; // tactical (capture) history
140+
int th[6][64][7]; // tactical (capture) history
141141

142142
int64_t tm[64 * 64];
143143
} SearchData;

0 commit comments

Comments
 (0)