Skip to content

Commit 0405f35

Browse files
SFisGODvondele
authored andcommitted
Double probability of using classical eval
This patch doubles the moderate imbalance threshold and probability of using classical eval. So now if imbalance is greater than PawnValueMg / 4 then there is a 1/8 chance of using classical eval. STC: LLR: 2.93 (-2.94,2.94) {-0.25,1.25} Total: 10984 W: 1303 L: 1140 D: 8541 Ptnml(0-2): 58, 867, 3489, 1010, 68 https://tests.stockfishchess.org/tests/view/5f554c9f97da2d5437d3813e LTC: LLR: 2.95 (-2.94,2.94) {0.25,1.25} Total: 43064 W: 2476 L: 2276 D: 38312 Ptnml(0-2): 37, 1985, 17308, 2145, 57 https://tests.stockfishchess.org/tests/view/5f55690a00a0aa2ca79f0a43 closes #3114 Bench: 4161067
1 parent d2562cd commit 0405f35

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/evaluate.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,10 +1015,13 @@ namespace {
10151015

10161016
Value Eval::evaluate(const Position& pos) {
10171017

1018+
// Use classical eval if there is a large imbalance
1019+
// If there is a moderate imbalance, use classical eval with probability (1/8),
1020+
// as derived from the node counter.
10181021
bool useClassical = abs(eg_value(pos.psq_score())) * 16 > NNUEThreshold1 * (16 + pos.rule50_count());
10191022
bool classical = !Eval::useNNUE
10201023
|| useClassical
1021-
|| (abs(eg_value(pos.psq_score())) > PawnValueMg / 8 && !(pos.this_thread()->nodes & 0xF));
1024+
|| (abs(eg_value(pos.psq_score())) > PawnValueMg / 4 && !(pos.this_thread()->nodes & 0xB));
10221025
Value v = classical ? Evaluation<NO_TRACE>(pos).value()
10231026
: NNUE::evaluate(pos) * 5 / 4 + Tempo;
10241027

0 commit comments

Comments
 (0)