From edc15aafa2de013002decc0440bd30bf5a0a4a60 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Tue, 1 Dec 2020 21:12:23 +0100 Subject: [PATCH] Use pure NNUE for king of the hill Since the best NNUE network is much stronger than classical evaluation, it seems intuitive to switch from hybrid to pure NNUE evaluation. kingofthehill STC Score: 133 - 34 - 33 [0.748] 200 Elo: 188.5 +/- 49.5, LOS: 100.0 %, DrawRatio: 16.5 % kingofthehill LTC Score: 63 - 20 - 17 [0.715] 100 Elo: 159.8 +/- 68.4, LOS: 100.0 %, DrawRatio: 17.0 % --- src/evaluate.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 0efda47..17b8a83 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1476,8 +1476,9 @@ Value Eval::evaluate(const Position& pos) { // If there is PSQ imbalance use classical eval, with small probability if it is small Value psq = Value(abs(eg_value(pos.psq_score()))); int r50 = 16 + pos.rule50_count(); - bool largePsq = psq * 16 > (NNUEThreshold1 + pos.non_pawn_material() / 64) * r50; - bool classical = largePsq || (psq > PawnValueMg / 4 && !(pos.this_thread()->nodes & 0xB)); + bool pure = pos.capture_the_flag_piece() && pos.checking_permitted(); + bool largePsq = psq * 16 > (NNUEThreshold1 + pos.non_pawn_material() / 64) * r50 && !pure; + bool classical = largePsq || (psq > PawnValueMg / 4 && !(pos.this_thread()->nodes & 0xB) && !pure); v = classical ? Evaluation(pos).value() : adjusted_NNUE(); -- 1.7.0.4