Increase connectivity bonus for drop variants
authorFabian Fichter <ianfab@users.noreply.github.com>
Mon, 24 Dec 2018 14:03:58 +0000 (15:03 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 26 Dec 2018 12:52:35 +0000 (13:52 +0100)
crazyhouse STC
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 6655 W: 3246 L: 3251 D: 158
http://35.161.250.236:6543/tests/view/5c1bb69c6e23db24728955d7

crazyhouse LTC
LLR: -2.95 (-2.94,2.94) [0.00,10.00]
Total: 8857 W: 4309 L: 4281 D: 267
http://35.161.250.236:6543/tests/view/5c1bc8f56e23db24728955de

LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 2160 W: 1067 L: 1016 D: 77
http://35.161.250.236:6543/tests/view/5c216fdf6e23db247289560b

shogi
LLR: 1.41 (-2.94,2.94) [0.00,10.00]
Total: 2219 W: 1106 L: 1027 D: 86

minishogi
LLR: 0.04 (-2.94,2.94) [0.00,10.00]
Total: 5000 W: 2362 L: 2289 D: 349

src/evaluate.cpp

index 7ad151d..4d5f390 100644 (file)
@@ -685,8 +685,8 @@ namespace {
     }
 
     // Connectivity: ensure that knights, bishops, rooks, and queens are protected
-    b = (pos.pieces(Us) ^ pos.pieces(Us, PAWN, KING)) & attackedBy[Us][ALL_PIECES];
-    score += Connectivity * popcount(b);
+    b = (pos.pieces(Us) ^ pos.pieces(Us, PAWN, KING) ^ pos.pieces(Us, SHOGI_PAWN)) & attackedBy[Us][ALL_PIECES];
+    score += Connectivity * popcount(b) * (1 + 2 * pos.captures_to_hand());
 
     if (T)
         Trace::add(THREAT, Us, score);