Skip to content

Commit

Permalink
Bench: 23633596
Browse files Browse the repository at this point in the history
  • Loading branch information
TerjeKir committed Jan 1, 2025
1 parent e4f903e commit fe2c7d2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,6 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth
continue;
}

MakeMove(pos, move);

moveCount++;

// Extension
Expand All @@ -494,9 +492,6 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth
&& ttBound != BOUND_UPPER
&& !isTerminal(ttScore)) {

// ttMove has been made to check legality
TakeMove(pos);

// Search to reduced depth with a zero window a bit lower than ttScore
int singularBeta = ttScore - depth * (2 - pvNode);
ss->excluded = move;
Expand All @@ -514,9 +509,6 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth
// Negative extension - not singular but likely still good enough to beat beta
else if (ttScore >= beta)
extension = -1;

// Replay ttMove
MakeMove(pos, move);
}

// Extend when in check
Expand All @@ -525,6 +517,8 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth

skip_extensions:

MakeMove(pos, move);

ss->move = move;
ss->doubleExtensions = (ss-1)->doubleExtensions + (extension == 2);
ss->continuation = &thread->continuation[inCheck][moveIsCapture(move)][piece(move)][toSq(move)];
Expand Down

0 comments on commit fe2c7d2

Please sign in to comment.