Skip to content

Commit

Permalink
Fix: Add new patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Joachim26 authored May 13, 2024
1 parent 88cd269 commit 05458d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ Value Eval::evaluate(const Eval::NNUE::Networks& networks,
else
nnue = networks.big.evaluate(pos, &caches.big, true, &nnueComplexity);
}

const auto adjustEval = [&](int nnueDiv, int pawnCountMul, int evalDiv, int shufflingConstant) {

if (smallNet && (nnue * simpleEval < 0 || std::abs(nnue) < 500))
nnue = Eval::mediumNetOn ? networks.medium.evaluate(pos, &caches.medium, true, &nnueComplexity)
: networks.big.evaluate(pos, &caches.big, true, &nnueComplexity);

const auto adjustEval = [&](int nnueDiv, int pawnCountMul, int evalDiv, int shufflingConstant) {
// Blend optimism and eval with nnue complexity and material imbalance
optimism += optimism * (nnueComplexity + std::abs(simpleEval - nnue)) / 584;
nnue -= nnue * (nnueComplexity * 5 / 3) / nnueDiv;
Expand Down

0 comments on commit 05458d0

Please sign in to comment.