Tweak initiative for xiangqi
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 30 Nov 2019 01:03:46 +0000 (02:03 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 30 Nov 2019 01:03:46 +0000 (02:03 +0100)
xiangqi
LLR: 3.02 (-2.94,2.94) [0.00,10.00]
Total: 828 W: 279 L: 196 D: 353

minixiangqi
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 312 W: 156 L: 72 D: 84

losers STC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 2266 W: 1013 L: 968 D: 285
http://www.variantfishtest.org:6543/tests/view/5de1105a6e23db1ffe4a2840

shatranj STC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 3498 W: 376 L: 347 D: 2775
http://www.variantfishtest.org:6543/tests/view/5de10fc66e23db1ffe4a283c

src/evaluate.cpp

index 9899090..00d5036 100644 (file)
@@ -974,11 +974,13 @@ namespace {
 
     bool almostUnwinnable =   !pe->passed_count()
                            &&  outflanking < 0
+                           && pos.stalemate_value() == VALUE_DRAW
                            && !pawnsOnBothFlanks;
 
     // Compute the initiative bonus for the attacking side
     int complexity =   9 * pe->passed_count()
                     + 11 * pos.count<PAWN>()
+                    + 15 * pos.count<SOLDIER>()
                     +  9 * outflanking
                     + 21 * pawnsOnBothFlanks
                     + 51 * !pos.non_pawn_material()