From b908912acd26586cad4dfd36ce6168f3fdffd07d Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sat, 27 Mar 2021 13:39:05 +0100 Subject: [PATCH] Simplify variant piece value adjustments No functional change. --- src/psqt.cpp | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/psqt.cpp b/src/psqt.cpp index 57fc7d6..bdbc91a 100644 --- a/src/psqt.cpp +++ b/src/psqt.cpp @@ -171,16 +171,12 @@ void init(const Variant* v) { eg_value(score) * 4700 / (3500 + mg_value(score))); } - // For drop variants, halve the piece values - if (v->capturesToHand) + if (v->capturesToHand || v->twoBoards) score = make_score(mg_value(score) * 7000 / (7000 + mg_value(score)), eg_value(score) * 7000 / (7000 + eg_value(score))); else if (!v->checking) score = make_score(std::min(mg_value(score), Value(1800)) / 2, std::min(eg_value(score), Value(1800)) * 3 / 5); - else if (v->twoBoards) - score = make_score(mg_value(score) * 7000 / (7000 + mg_value(score)), - eg_value(score) * 7000 / (7000 + eg_value(score))); else if (v->blastOnCapture) score = make_score(mg_value(score) * 7000 / (7000 + mg_value(score)), eg_value(score)); else if (v->checkCounting) @@ -201,6 +197,7 @@ void init(const Variant* v) { if (v->extinctionValue == VALUE_MATE) score = -make_score(mg_value(score) / 8, eg_value(score) / 8 / (1 + !pi->sliderCapture.size())); + // For drop variants, halve the piece values to compensate for double changes by captures if (v->capturesToHand) score = score / 2; -- 1.7.0.4