Consider Janggi cannon restrictions in evaluation
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 3 Apr 2020 21:57:04 +0000 (23:57 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 3 Apr 2020 21:57:04 +0000 (23:57 +0200)
janggi
LLR: 2.99 (-2.94,2.94) [0.00,10.00]
Total: 694 W: 364 L: 260 D: 70

src/evaluate.cpp

index 638789f..12c7067 100644 (file)
@@ -321,6 +321,12 @@ namespace {
             score -= make_score(PieceValue[MG][Pt], PieceValue[EG][Pt]) / 3;
         }
 
+        if (Pt == JANGGI_CANNON)
+        {
+            b &= ~pos.pieces(Pt);
+            b &= attacks_bb(Us, Pt, s, pos.pieces() ^ pos.pieces(Pt));
+        }
+
         if (pos.blockers_for_king(Us) & s)
             b &= LineBB[pos.square<KING>(Us)][s];