4 #ifndef EVAL_ML_PIECESTAND_H
5 #define EVAL_ML_PIECESTAND_H
24 static CArray<MultiInt, osl::Piece::SIZE>
table;
39 state.countPiecesOnStand(P, moved.
ptype()) + 1;
43 return last_value - value;
45 return last_value + value;
50 const int count = state.countPiecesOnStand(P, ptype);
53 return last_value + value;
55 return last_value - value;
64 static CArray<MultiInt, 21>
table;
80 const CArray<bool, 2> &can_check);
82 const NumEffectState &state,
84 const CArray<bool, 2> &could_check,
85 const CArray<bool, 2> &can_check);
88 const CArray<MultiInt, 5625> &values);
89 static int index(
int rook,
int bishop,
int gold,
int silver,
90 int knight,
int lance)
93 5 * (knight + 5 * (silver + 5 * (gold + 5 * (3 * bishop + rook))));
95 static CArray<MultiInt, 5625>
table;
108 const NumEffectState &state,
115 (turn == player ? 22 : 0);
127 const int king_y = (player ==
BLACK ? king.
y() : 10 - king.
y());
132 const int king_y = (player ==
BLACK ? king.
y() : 10 - king.
y());
133 return (king_y - 1) * 7*19 + i*19 +
count;
142 const NumEffectState &state,
Move moved,
151 template <Player Defense>
155 const King8Info king(state.Iking8Info(Defense));
156 return (king.dropCandidate() != 0 ||
157 king.hasMoveCandidate<Attack>(state) ||
158 KnightCheck::canCheck<Defense>(state));
168 static CArray<MultiInt, 16384>
table;
173 #endif // EVAL_ML_PIECESTAND_H