diff --git a/src/search.c b/src/search.c index 2386d1e2..bcf28edc 100644 --- a/src/search.c +++ b/src/search.c @@ -330,18 +330,12 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth Depth reduction = 3 + depth / 4 + MIN(3, (eval - beta) / 256); - // Remember who last null-moved - Color nullMoverTemp = thread->nullMover; - thread->nullMover = sideToMove; - ss->continuation = &thread->continuation[0][0][EMPTY][0]; MakeNullMove(pos); int score = -AlphaBeta(thread, ss+1, -beta, -alpha, depth - reduction, !cutnode); TakeNullMove(pos); - thread->nullMover = nullMoverTemp; - // Cutoff if (score >= beta) // Don't return unproven terminal win scores @@ -494,8 +488,6 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth r -= pvNode; // Reduce less when improving r -= improving; - // Reduce more for the side that was last null moved against - r += opponent == thread->nullMover; // Reduce quiets more if ttMove is a capture r += moveIsCapture(ttMove); // Reduce more when opponent has few pieces diff --git a/src/threads.c b/src/threads.c index f6b00a96..7b9b7776 100644 --- a/src/threads.c +++ b/src/threads.c @@ -117,7 +117,6 @@ void PrepareSearch(Position *pos, Move searchmoves[]) { for (Thread *t = threads; t < threads + threads->count; ++t) { memset(t, 0, offsetof(Thread, pos)); memcpy(&t->pos, pos, sizeof(Position)); - t->nullMover = -1; t->rootMoveCount = rootMoveCount; for (Depth d = 0; d <= MAX_PLY; ++d) (t->ss+SS_OFFSET+d)->ply = d; diff --git a/src/threads.h b/src/threads.h index d1812ede..4e4fb4f6 100644 --- a/src/threads.h +++ b/src/threads.h @@ -59,7 +59,6 @@ typedef struct Thread { uint64_t tbhits; RootMove rootMoves[MULTI_PV_MAX]; Depth depth; - Color nullMover; int rootMoveCount; bool doPruning; bool uncertain;