10000 Remove classical evaluation · official-stockfish/Stockfish@af110e0 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit af110e0

Browse files
committed
Remove classical evaluation
since the introduction of NNUE (first released with Stockfish 12), we have maintained the classical evaluation as part of SF in frozen form. The idea that this code could lead to further inputs to the NN or search did not materialize. Now, after five releases, this PR removes the classical evaluation from SF. Even though this evaluation is probably the best of its class, it has become unimportant for the engine's strength, and there is little need to maintain this code (roughly 25% of SF) going forward, or to expend resources on trying to improve its integration in the NNUE eval. Indeed, it had still a very limited use in the current SF, namely for the evaluation of positions that are nearly decided based on material difference, where the speed of the classical evaluation outweights its inaccuracies. This impact on strength is small, roughly 2Elo, and probably decreasing in importance as the TC grows. Potentially, removal of this code could lead to the development of techniques to have faster, but less accurate NN evaluation, for certain positions. STC https://tests.stockfishchess.org/tests/view/64a320173ee09aa549c52157 Elo: -2.35 ± 1.1 (95%) LOS: 0.0% Total: 100000 W: 24916 L: 25592 D: 49492 Ptnml(0-2): 287, 12123, 25841, 11477, 272 nElo: -4.62 ± 2.2 (95%) PairsRatio: 0.95 LTC https://tests.stockfishchess.org/tests/view/64a320293ee09aa549c5215b Elo: -1.74 ± 1.0 (95%) LOS: 0.0% Total: 100000 W: 25010 L: 25512 D: 49478 Ptnml(0-2): 44, 11069, 28270, 10579, 38 nElo: -3.72 ± 2.2 (95%) PairsRatio: 0.96 VLTC SMP https://tests.stockfishchess.org/tests/view/64a3207c3ee09aa549c52168 Elo: -1.70 ± 0.9 (95%) LOS: 0.0% Total: 100000 W: 25673 L: 26162 D: 48165 Ptnml(0-2): 8, 9455, 31569, 8954, 14 nElo: -3.95 ± 2.2 (95%) PairsRatio: 0.95 closes #4674 Bench: 1444646
1 parent 6a8767a commit af110e0

16 files changed

+37
-2745
lines changed

src/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ else
5656
endif
5757

5858
### Source and object files
59-
SRCS = benchmark.cpp bitbase.cpp bitboard.cpp endgame.cpp evaluate.cpp main.cpp \
60-
material.cpp misc.cpp movegen.cpp movepick.cpp pawns.cpp position.cpp psqt.cpp \
59+
SRCS = benchmark.cpp bitboard.cpp evaluate.cpp main.cpp \
60+
misc.cpp movegen.cpp movepick.cpp position.cpp psqt.cpp \
6161
search.cpp thread.cpp timeman.cpp tt.cpp uci.cpp ucioption.cpp tune.cpp syzygy/tbprobe.cpp \
6262
nnue/evaluate_nnue.cpp nnue/features/half_ka_v2_hm.cpp
6363

src/benchmark.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -153,24 +153,15 @@ vector<string> setup_bench(const Position& current, istream& is) {
153153
list.emplace_back("setoption name Hash value " + ttSize);
154154
list.emplace_back("ucinewgame");
155155

156-
size_t posCounter = 0;
157-
158156
for (const string& fen : fens)
159157
if (fen.find("setoption") != string::npos)
160158
list.emplace_back(fen);
161159
else
162160
{
163-
if (evalType == "classical" || (evalType == "mixed" && posCounter % 2 == 0))
164-
list.emplace_back("setoption name Use NNUE value false");
165-
else if (evalType == "NNUE" || (evalType == "mixed" && posCounter % 2 != 0))
166-
list.emplace_back("setoption name Use NNUE value true");
167161
list.emplace_back("position fen " + fen);
168162
list.emplace_back(go);
169-
++posCounter;
170163
}
171164

172-
list.emplace_back("setoption name Use NNUE value true");
173-
174165
return list;
175166
}
176167

src/bitbase.cpp

-172
This file was deleted.

src/bitboard.h

-7
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@
2525

2626
namespace Stockfish {
2727

28-
namespace Bitbases {
29-
30-
void init();
31-
bool probe(Square wksq, Square wpsq, Square bksq, Color us);
32-
33-
} // namespace Stockfish::Bitbases
34-
3528
namespace Bitboards {
3629

3730
void init();

0 commit comments

Comments
 (0)
0