diff --git a/src/Makefile b/src/Makefile index 2e26a188..f41307ec 100644 --- a/src/Makefile +++ b/src/Makefile @@ -381,6 +381,16 @@ ifeq ($(ARCH),ppc-64) prefetch = yes endif +ifneq ($(findstring e2k,$(ARCH)),) + arch = e2k + bits = 64 + sse = yes + sse2 = yes + ssse3 = yes + sse41 = yes + popcnt = yes +endif + endif ifeq ($(avx2),yes) @@ -820,6 +830,7 @@ help: @echo "armv7-neon > ARMv7 32-bit with popcnt and neon" @echo "armv7 > ARMv7 32-bit" @echo "apple-silicon > Apple silicon ARM64" + @echo "e2k > Elbrus 2000" @echo "general-64 > unspecified 64-bit" @echo "general-32 > unspecified 32-bit" @echo "" @@ -948,7 +959,8 @@ config-sanity: net @test "$(optimize)" = "yes" || test "$(optimize)" = "no" @test "$(arch)" = "any" || test "$(arch)" = "x86_64" || test "$(arch)" = "i386" || \ test "$(arch)" = "ppc64" || test "$(arch)" = "ppc" || \ - test "$(arch)" = "armv7" || test "$(arch)" = "armv8" || test "$(arch)" = "arm64" + test "$(arch)" = "armv7" || test "$(arch)" = "armv8" || test "$(arch)" = "arm64" || \ + test "$(arch)" = "e2k" @test "$(bits)" = "32" || test "$(bits)" = "64" @test "$(prefetch)" = "yes" || test "$(prefetch)" = "no" @test "$(popcnt)" = "yes" || test "$(popcnt)" = "no" diff --git a/src/search.c b/src/search.c index 84c61cfd..67f9c531 100644 --- a/src/search.c +++ b/src/search.c @@ -971,14 +971,6 @@ INLINE Value search_node(Position *pos, Stack *ss, Value alpha, Value beta, && ttValue != VALUE_NONE && ttValue < probCutBeta)) { - if ( ss->ttHit - && tte_depth(tte) >= depth - 3 - && ttValue != VALUE_NONE - && ttValue >= probCutBeta - && ttMove - && is_capture_or_promotion(pos, ttMove)) - return probCutBeta; - mp_init_pc(pos, ttMove, probCutBeta - ss->staticEval); int probCutCount = 2 + 2 * cutNode; bool ttPv = ss->ttPv; @@ -1136,7 +1128,7 @@ INLINE Value search_node(Position *pos, Stack *ss, Value alpha, Value beta, } else { // Countermoves based pruning - if ( lmrDepth < 4 + ((ss-1)->statScore > 0 || (ss-1)->moveCount == 1) + if ( lmrDepth < 4 && (*cmh )[movedPiece][to_sq(move)] < CounterMovePruneThreshold && (*fmh )[movedPiece][to_sq(move)] < CounterMovePruneThreshold) continue; @@ -1278,14 +1270,7 @@ INLINE Value search_node(Position *pos, Stack *ss, Value alpha, Value beta, if (singularQuietLMR) r--; - if (captureOrPromotion) { - // Unless giving check, this capture is likely bad - if ( !givesCheck - && ss->staticEval + PieceValue[EG][captured_piece()] + 210 * depth <= alpha) - r++; - - } else { - + if (!captureOrPromotion) { // Increase reduction if ttMove is a capture if (ttCapture) r++; @@ -1304,18 +1289,7 @@ INLINE Value search_node(Position *pos, Stack *ss, Value alpha, Value beta, + (*pos->mainHistory)[!stm()][from_to(move)] - 4741; - // Decrease/increase reduction by comparing with opponent's stat score. - if (ss->statScore >= -89 && (ss-1)->statScore < -116) - r--; - - else if ((ss-1)->statScore >= -112 && ss->statScore < -100) - r++; - - // Decrease/increase reduction for moves with a good/bad history. - if (inCheck) - r -= ( (*pos->mainHistory)[!stm()][from_to(move)] - + (*cmh)[movedPiece][to_sq(move)] - 3833) / 16384; - else + if (!inCheck) r -= ss->statScore / 14790; }