mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-15 02:12:40 +01:00
Update to current Stockfish development version
Corresponds to commit 8b8a510fd6a1a17b39b2d4b166f60ac7be0dab23 in Stockfish repository, from Wed Sep 16 17:39:11 2020 +0200.
This commit is contained in:
@@ -1015,12 +1015,19 @@ make_v:
|
||||
|
||||
Value Eval::evaluate(const Position& pos) {
|
||||
|
||||
// Use classical eval if there is a large imbalance
|
||||
// If there is a moderate imbalance, use classical eval with probability (1/8),
|
||||
// as derived from the node counter.
|
||||
bool useClassical = abs(eg_value(pos.psq_score())) * 16 > NNUEThreshold1 * (16 + pos.rule50_count());
|
||||
bool classical = !Eval::useNNUE
|
||||
|| abs(eg_value(pos.psq_score())) * 16 > NNUEThreshold1 * (16 + pos.rule50_count());
|
||||
|| useClassical
|
||||
|| (abs(eg_value(pos.psq_score())) > PawnValueMg / 4 && !(pos.this_thread()->nodes & 0xB));
|
||||
Value v = classical ? Evaluation<NO_TRACE>(pos).value()
|
||||
: NNUE::evaluate(pos) * 5 / 4 + Tempo;
|
||||
|
||||
if (classical && Eval::useNNUE && abs(v) * 16 < NNUEThreshold2 * (16 + pos.rule50_count()))
|
||||
if ( useClassical
|
||||
&& Eval::useNNUE
|
||||
&& abs(v) * 16 < NNUEThreshold2 * (16 + pos.rule50_count()))
|
||||
v = NNUE::evaluate(pos) * 5 / 4 + Tempo;
|
||||
|
||||
// Damp down the evaluation linearly when shuffling
|
||||
|
||||
Reference in New Issue
Block a user