Skip to content

Commit

Permalink
Bench: 2575504
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonnold committed Nov 23, 2024
1 parent 8a6282e commit fd65f8d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ INLINE int CheckLimits(ThreadData* thread) {
(Limits.nodes && NodesSearched() >= Limits.nodes);
}

INLINE int AdjustEvalOnFMR(Board* board, int eval) {
return (200 - board->fmr) * eval / 200;
}

INLINE int ThreadValue(ThreadData* thread, const int worstScore) {
return (thread->rootMoves[0].score - worstScore) * thread->depth;
}
Expand Down Expand Up @@ -470,18 +466,12 @@ int Negamax(int alpha, int beta, int depth, int cutnode, ThreadData* thread, PV*
rawEval = Evaluate(board, thread);
eval = ss->staticEval = ClampEval(rawEval + GetPawnCorrection(board, thread) / 2 + GetContCorrection(ss, thread));

// correct eval on fmr
eval = AdjustEvalOnFMR(board, eval);

if (ttScore != UNKNOWN && (ttBound & (ttScore > eval ? BOUND_LOWER : BOUND_UPPER)))
eval = ttScore;
} else if (!ss->skip) {
rawEval = Evaluate(board, thread);
eval = ss->staticEval = ClampEval(rawEval + GetPawnCorrection(board, thread) / 2 + GetContCorrection(ss, thread));

// correct eval on fmr
eval = AdjustEvalOnFMR(board, eval);

TTPut(tt, board->zobrist, -1, UNKNOWN, BOUND_UNKNOWN, NULL_MOVE, ss->ply, rawEval, ttPv);
}

Expand Down Expand Up @@ -877,18 +867,12 @@ int Quiesce(int alpha, int beta, int depth, ThreadData* thread, SearchStack* ss)
rawEval = Evaluate(board, thread);
eval = ss->staticEval = ClampEval(rawEval + GetPawnCorrection(board, thread) / 2 + GetContCorrection(ss, thread));

// correct eval on fmr
eval = AdjustEvalOnFMR(board, eval);

if (ttScore != UNKNOWN && (ttBound & (ttScore > eval ? BOUND_LOWER : BOUND_UPPER)))
eval = ttScore;
} else {
rawEval = Evaluate(board, thread);
eval = ss->staticEval = ClampEval(rawEval + GetPawnCorrection(board, thread) / 2 + GetContCorrection(ss, thread));

// correct eval on fmr
eval = AdjustEvalOnFMR(board, eval);

TTPut(tt, board->zobrist, -1, UNKNOWN, BOUND_UNKNOWN, NULL_MOVE, ss->ply, rawEval, ttPv);
}

Expand Down

0 comments on commit fd65f8d

Please sign in to comment.