From ea48d382839ceb58fe615af468390a6fdc50adaa Mon Sep 17 00:00:00 2001 From: Robert Nurnberg <28635489+robertnurnberg@users.noreply.github.com> Date: Sun, 10 May 2026 11:44:38 +0200 Subject: [PATCH] remove simple eval No longer needed after the removal of smallnet. Also remove declaration of `use_smallnet()`. closes https://github.com/official-stockfish/Stockfish/pull/6799 No functional change --- src/evaluate.cpp | 12 ------------ src/evaluate.h | 2 -- 2 files changed, 14 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index dbd35d720..59472c83e 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -36,15 +36,6 @@ namespace Stockfish { -// Returns a static, purely materialistic evaluation of the position from -// the point of view of the side to move. It can be divided by PawnValue to get -// an approximation of the material advantage on the board in terms of pawns. -int Eval::simple_eval(const Position& pos) { - Color c = pos.side_to_move(); - return PawnValue * (pos.count(c) - pos.count(~c)) + pos.non_pawn_material(c) - - pos.non_pawn_material(~c); -} - // 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, @@ -100,9 +91,6 @@ std::string Eval::trace(Position& pos, const Eval::NNUE::Network& network) { v = pos.side_to_move() == WHITE ? v : -v; ss << "NNUE evaluation " << 0.01 * UCIEngine::to_cp(v, pos) << " (white side)\n"; - ss << "SimpleEval " << simple_eval(pos) - << " (side to move, internal units)\n\n"; - v = evaluate(network, pos, *accumulators, *caches, VALUE_ZERO); v = pos.side_to_move() == WHITE ? v : -v; diff --git a/src/evaluate.h b/src/evaluate.h index 6d3b3f180..154dc6122 100644 --- a/src/evaluate.h +++ b/src/evaluate.h @@ -43,8 +43,6 @@ class AccumulatorStack; std::string trace(Position& pos, const Eval::NNUE::Network& network); -int simple_eval(const Position& pos); -bool use_smallnet(const Position& pos); Value evaluate(const NNUE::Network& network, const Position& pos, Eval::NNUE::AccumulatorStack& accumulators,