Skip to content

Commit

Permalink
Bench: 21963671
Browse files Browse the repository at this point in the history
  • Loading branch information
TerjeKir committed Nov 1, 2023
1 parent 17fe2e5 commit dedb074
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dedb074

Please sign in to comment.