Fp #33

Merged
rektdie merged 5 commits from FP into main 2025-03-26 17:15:15 +01:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 22f9e929f5 - Show all commits

No files matched your search

+3 -3
View File
@@ -234,9 +234,9 @@ SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) {
// Futility pruning // Futility pruning
// If our static eval is far below alpha, there is only a small chance // If our static eval is far below alpha, there is only a small chance
// that a quiet move will help us so we skip them // that a quiet move will help us so we skip them
int fpMargin = 100 + 50 * depth; int fpMargin = 100 * depth;
if (!isPV && ply && !board.InCheck() && currMove.IsQuiet() if (!isPV && ply && !board.InCheck() && currMove.IsQuiet()
&& depth <= 1 && staticEval + fpMargin < alpha) { && depth <= 5 && staticEval + fpMargin < alpha && results.score > MATE_SCORE) {
continue; continue;
} }
@@ -297,7 +297,7 @@ SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) {
if (moveSeen == 0) { if (moveSeen == 0) {
if (board.InCheck()) { // checkmate if (board.InCheck()) { // checkmate
return -99000 + ply; return MATE_SCORE + ply;
} else { // stalemate } else { // stalemate
return 0; return 0;
} }
+1
View File
@@ -7,6 +7,7 @@
namespace SEARCH { namespace SEARCH {
constexpr int MATE_SCORE = -99000;
constexpr int maxDepth = 64; constexpr int maxDepth = 64;
constexpr int maxHistory = 16384; constexpr int maxHistory = 16384;