Consider soldiers for semi-open files
authorFabian Fichter <ianfab@users.noreply.github.com>
Tue, 5 Jan 2021 23:52:50 +0000 (00:52 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Tue, 5 Jan 2021 23:52:50 +0000 (00:52 +0100)
xiangqi STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 946 W: 310 L: 227 D: 409

janggi STC
ELO: 7.30 +-21.4 (95%) LOS: 74.9%
Total: 1000 W: 502 L: 481 D: 17

minixiangqi STC
ELO: 19.48 +-26.8 (95%) LOS: 92.3%
Total: 500 W: 207 L: 179 D: 114

src/position.h

index b8a137f..688b6de 100644 (file)
@@ -885,7 +885,7 @@ inline Bitboard Position::gates(Color c) const {
 }
 
 inline bool Position::is_on_semiopen_file(Color c, Square s) const {
-  return !(pieces(c, PAWN, SHOGI_PAWN) & file_bb(s));
+  return !((pieces(c, PAWN) | pieces(c, SHOGI_PAWN, SOLDIER)) & file_bb(s));
 }
 
 inline bool Position::can_castle(CastlingRights cr) const {