Skip to content

Commit

Permalink
tune ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
PikaCat-OuO committed Oct 4, 2024
1 parent 4d91211 commit b67347d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

namespace Stockfish {

int ratio = 1024;
TUNE(ratio);

// Evaluate is the evaluator for the outer world. It returns a static evaluation
// of the position from the point of view of the side to move.
Value Eval::evaluate(const Eval::NNUE::Network& network,
Expand All @@ -45,7 +48,7 @@ Value Eval::evaluate(const Eval::NNUE::Network& network,
assert(!pos.checkers());

auto [psqt, positional] = network.evaluate(pos, &caches.cache);
Value nnue = psqt + positional;
Value nnue = ratio * psqt / 1024 + positional;
int nnueComplexity = std::abs(psqt - positional);

// Blend optimism and eval with nnue complexity
Expand Down

0 comments on commit b67347d

Please sign in to comment.