From 7aa36ad318bc524abb299125c03abf1d07f1ddd1 Mon Sep 17 00:00:00 2001 From: ProgramciDusunur Date: Tue, 24 Dec 2024 22:53:50 +0300 Subject: [PATCH 1/2] try late move pruning --- src/search.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/search.c b/src/search.c index 3c7a9853..f7dd19f1 100644 --- a/src/search.c +++ b/src/search.c @@ -616,6 +616,14 @@ int negamax(int alpha, int beta, int depth, board* position, time* time, bool cu if (!rootNode && isQuiet && isNotMated) { + int lmpBase = 4; + int lmpMultiplier = 3; + int lmpThreshold = (lmpBase + lmpMultiplier * depth * depth); + + if (legal_moves>= lmpThreshold) { + skipQuiet = 1; + } + if (canPrune && depth <= 2 && static_eval + 82 * depth <= alpha) { skipQuiet = 1; } From 9217853e32c5c866aff0b74b50481934ad1a6751 Mon Sep 17 00:00:00 2001 From: ProgramciDusunur Date: Tue, 24 Dec 2024 22:54:05 +0300 Subject: [PATCH 2/2] bench: 9292340 --- src/search.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/search.c b/src/search.c index f7dd19f1..87948a0a 100644 --- a/src/search.c +++ b/src/search.c @@ -612,6 +612,7 @@ int negamax(int alpha, int beta, int depth, board* position, time* time, bool cu continue; } + bool isNotMated = alpha > -mateScore + maxPly; if (!rootNode && isQuiet && isNotMated) {