changed TT writing and reading to fail-soft

This commit is contained in:
rektdie committed 2025-03-07 10:09:00 +01:00
1 parent 9e662e8e0c
commit 8aa244da16
3 files changed
+3 -69

No files matched your search

+1 -2
View File
@@ -184,7 +184,6 @@ SearchResults PVS(Board board, int depth, int alpha, int beta) {
}
}
}
}
int score = -inf;
@@ -235,7 +234,7 @@ SearchResults PVS(Board board, int depth, int alpha, int beta) {
killerMoves[1][ply] = killerMoves[0][ply];
killerMoves[0][ply] = board.moveList[i];
WriteEntry(board.hashKey, depth, beta, CutNode, Move());
WriteEntry(board.hashKey, depth, score, CutNode, Move());
return score;
}
+2 -2
View File
@@ -87,9 +87,9 @@ SearchResults ReadEntry(U64 &hashKey, int depth, int alpha, int beta) {
if (current->nodeType == PV){
return {current->score, current->bestMove};
} else if (current->nodeType == AllNode && current->score <= alpha) {
return alpha;
return current->score;
} else if (current->nodeType == CutNode && current->score >= beta) {
return beta;
return current->score;
}
}
}