added cutnode to SE | bench 1894069
This commit is contained in:
1 parent
a077d9bd3e
commit
68377cbf7b
1 file changed
+3
-4
+3
-4
@@ -374,13 +374,10 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
|
|||||||
if (!ctx->doingNullMove && staticEval >= beta) {
|
if (!ctx->doingNullMove && staticEval >= beta) {
|
||||||
if (depth > 1 && !board.InPossibleZug()) {
|
if (depth > 1 && !board.InPossibleZug()) {
|
||||||
Board copy = board;
|
Board copy = board;
|
||||||
bool isLegal = copy.MakeMove(Move());
|
copy.MakeMove(Move());
|
||||||
// Always legal so we dont check it
|
|
||||||
|
|
||||||
const int reduction = 3 + improving;
|
const int reduction = 3 + improving;
|
||||||
|
|
||||||
copy.MakeMove(Move());
|
|
||||||
|
|
||||||
ctx->doingNullMove = true;
|
ctx->doingNullMove = true;
|
||||||
int score = -PVS<false, mode>(copy, depth - reduction, -beta, -beta + 1, ply + 1, ctx, !cutnode).score;
|
int score = -PVS<false, mode>(copy, depth - reduction, -beta, -beta + 1, ply + 1, ctx, !cutnode).score;
|
||||||
ctx->doingNullMove = false;
|
ctx->doingNullMove = false;
|
||||||
@@ -470,6 +467,8 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
|
|||||||
|
|
||||||
if (score < sBeta)
|
if (score < sBeta)
|
||||||
extension = 1;
|
extension = 1;
|
||||||
|
else if (cutnode)
|
||||||
|
extension = -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PVS SEE
|
// PVS SEE
|
||||||
|
|||||||
Reference in new issue
Block a user