Skip to content

Commit

Permalink
Bench: 2996197
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonnold committed Nov 14, 2024
1 parent 525dab9 commit 46a30e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void InitPruningAndReductionTables() {
LMP[1][depth] = 2.1885 + 0.9911 * depth * depth;

STATIC_PRUNE[0][depth] = -15.2703 * depth * depth; // quiet move cutoff
STATIC_PRUNE[1][depth] = -94.0617 * depth; // capture cutoff
STATIC_PRUNE[1][depth] = -94.0617 * depth; // capture cutoff
}
}

Expand Down Expand Up @@ -599,6 +599,8 @@ int Negamax(int alpha, int beta, int depth, int cutnode, ThreadData* thread, PV*
InitNormalMovePicker(&mp, hashMove, thread, ss);

while ((move = NextMove(&mp, board, skipQuiets))) {
TTPrefetch(KeyAfter(board, move));

if (ss->skip == move)
continue;
if (isRoot && !ValidRootMove(thread, move))
Expand Down Expand Up @@ -693,7 +695,6 @@ int Negamax(int alpha, int beta, int depth, int cutnode, ThreadData* thread, PV*
}
}

TTPrefetch(KeyAfter(board, move));
ss->move = move;
ss->ch = &thread->ch[IsCap(move)][Moving(move)][To(move)];
MakeMove(move, board);
Expand Down Expand Up @@ -915,6 +916,8 @@ int Quiesce(int alpha, int beta, int depth, ThreadData* thread, SearchStack* ss)
int legalMoves = 0, skipQuiets = !inCheck;

while ((move = NextMove(&mp, board, skipQuiets))) {
TTPrefetch(KeyAfter(board, move));

if (!IsLegal(move, board))
continue;

Expand All @@ -935,7 +938,6 @@ int Quiesce(int alpha, int beta, int depth, ThreadData* thread, SearchStack* ss)
else if (IsCap(move) && numCaptures < 32)
captures[numCaptures++] = move;

TTPrefetch(KeyAfter(board, move));
ss->move = move;
ss->ch = &thread->ch[IsCap(move)][Moving(move)][To(move)];
MakeMove(move, board);
Expand Down

0 comments on commit 46a30e9

Please sign in to comment.