No initiative bonus for extinction variants
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 8 Sep 2018 13:01:43 +0000 (15:01 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 12 Sep 2018 18:50:46 +0000 (20:50 +0200)
STC giveaway
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1451 W: 646 L: 539 D: 266
http://35.161.250.236:6543/tests/view/5b8bfc716e23db0fbab0dd3a

STC extinction
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2590 W: 1273 L: 1140 D: 177
http://35.161.250.236:6543/tests/view/5b93c8af6e23db0fbab0dd66

src/evaluate.cpp

index e9307df..0e14191 100644 (file)
@@ -847,6 +847,10 @@ namespace {
   template<Tracing T>
   Score Evaluation<T>::initiative(Value eg) const {
 
+    // No initiative bonus for extinction variants
+    if (pos.extinction_value() != VALUE_NONE)
+      return SCORE_ZERO;
+
     int outflanking = !pos.count<KING>(WHITE) || !pos.count<KING>(BLACK) ? 0
                      :  distance<File>(pos.square<KING>(WHITE), pos.square<KING>(BLACK))
                       - distance<Rank>(pos.square<KING>(WHITE), pos.square<KING>(BLACK));