summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-08-31 04:40:01 +0300
committereug-vs <eugene@eug-vs.xyz>2022-08-31 04:40:01 +0300
commite90c9419df5ac9bdd831551713c1fee9f92a750f (patch)
treececf3a783b9c65a2c555c3f1fcc15a0d160b96f3
parent1a37a1b9e79b4a4de8df12cd51bf1604ea728cf3 (diff)
downloadc-chess-e90c9419df5ac9bdd831551713c1fee9f92a750f.tar.gz
feat: include heuristic values into transpositions
-rw-r--r--src/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 5fa9f8c..deb7d96 100644
--- a/src/main.c
+++ b/src/main.c
@@ -525,9 +525,7 @@ Move find_best_move(int* board, int color, int depth, int alpha, int beta, int*
? find_best_move(board, 1 - color, depth + 1, alpha, beta, metrics, hash, transposition_table, zobrist_seed).value
: compute_score(board, available_moves_count, color);
- if (depth < MAX_DEPTH) {
- transposition_table[move_hash % TRANSPOSITION_TABLE_SIZE] = move.value;
- }
+ transposition_table[move_hash % TRANSPOSITION_TABLE_SIZE] = move.value;
reverse_move(move, captured_piece, board);