mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
use classical for certain endgames.
STC https://tests.stockfishchess.org/tests/view/5fbc64c067cbf42301d6b1d6 LLR: 2.97 (-2.94,2.94) {-0.25,1.25} Total: 53360 W: 5223 L: 5024 D: 43113 Ptnml(0-2): 184, 3877, 18390, 4014, 215 LTC https://tests.stockfishchess.org/tests/view/5fbc97f267cbf42301d6b1ee LLR: 2.96 (-2.94,2.94) {0.25,1.25} Total: 126472 W: 5111 L: 4766 D: 116595 Ptnml(0-2): 50, 4032, 54749, 4333, 72 closes https://github.com/official-stockfish/Stockfish/pull/3240 bench: 3820648
This commit is contained in:
parent
7615e3485e
commit
190dd26b9f
1 changed files with 4 additions and 2 deletions
|
@ -1035,12 +1035,14 @@ Value Eval::evaluate(const Position& pos) {
|
|||
bool largePsq = psq * 16 > (NNUEThreshold1 + pos.non_pawn_material() / 64) * r50;
|
||||
bool classical = largePsq || (psq > PawnValueMg / 4 && !(pos.this_thread()->nodes & 0xB));
|
||||
|
||||
v = classical ? Evaluation<NO_TRACE>(pos).value() : adjusted_NNUE();
|
||||
bool strongClassical = pos.non_pawn_material() < 2 * RookValueMg && pos.count<PAWN>() < 2;
|
||||
|
||||
v = classical || strongClassical ? Evaluation<NO_TRACE>(pos).value() : adjusted_NNUE();
|
||||
|
||||
// If the classical eval is small and imbalance large, use NNUE nevertheless.
|
||||
// For the case of opposite colored bishops, switch to NNUE eval with
|
||||
// small probability if the classical eval is less than the threshold.
|
||||
if ( largePsq
|
||||
if ( largePsq && !strongClassical
|
||||
&& ( abs(v) * 16 < NNUEThreshold2 * r50
|
||||
|| ( pos.opposite_bishops()
|
||||
&& abs(v) * 16 < (NNUEThreshold1 + pos.non_pawn_material() / 64) * r50
|
||||
|
|
Loading…
Add table
Reference in a new issue