Bonus for connected soldiers
authorFabian Fichter <ianfab@users.noreply.github.com>
Tue, 15 Sep 2020 21:51:18 +0000 (23:51 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Tue, 15 Sep 2020 21:51:18 +0000 (23:51 +0200)
janggi
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 644 W: 369 L: 259 D: 16

src/evaluate.cpp

index 90de684..f91626f 100644 (file)
@@ -360,6 +360,9 @@ namespace {
         else if (pos.count<KING>(Us) && (Pt == FERS || Pt == SILVER))
             score -= EndgameKingProximity * (distance(s, pos.square<KING>(Us)) - 2);
 
+        if (Pt == SOLDIER && (pos.pieces(Us, SOLDIER) & rank_bb(s) & adjacent_files_bb(s)))
+            score += make_score(20, 20);
+
         if (Pt == BISHOP || Pt == KNIGHT)
         {
             // Bonus if piece is on an outpost square or can reach one