Evaluate king proximity for bughouse
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 13 Mar 2020 14:06:15 +0000 (15:06 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 13 Mar 2020 14:06:15 +0000 (15:06 +0100)
bughouse
Total: 500 W: 280 L: 216 D: 4

src/evaluate.cpp

index fea27a4..b871253 100644 (file)
@@ -345,7 +345,7 @@ namespace {
                                 PieceValue[EG][Pt] - PieceValue[EG][pos.unpromoted_piece_on(s)]) / 8;
 
         // Penalty if the piece is far from the kings in drop variants
-        if (pos.captures_to_hand() && pos.count<KING>(Them) && pos.count<KING>(Us))
+        if ((pos.captures_to_hand() || pos.two_boards()) && pos.count<KING>(Them) && pos.count<KING>(Us))
             score -= KingProximity * distance(s, pos.square<KING>(Us)) * distance(s, pos.square<KING>(Them));
 
         if (Pt == BISHOP || Pt == KNIGHT)