4 #ifndef EVAL_ML_PIECESTAND_H 5 #define EVAL_ML_PIECESTAND_H 40 return last_value - value;
42 return last_value + value;
50 return last_value + value;
52 return last_value - value;
86 static int index(
int rook,
int bishop,
int gold,
int silver,
87 int knight,
int lance)
90 5 * (knight + 5 * (silver + 5 * (gold + 5 * (3 * bishop + rook))));
104 static void evalWithUpdateBang(
112 (turn == player ? 22 : 0);
124 const int king_y = (player ==
BLACK ? king.
y() : 10 - king.
y());
129 const int king_y = (player ==
BLACK ? king.
y() : 10 - king.
y());
130 return (king_y - 1) * 7*19 + i*19 + count;
148 template <Player Defense>
153 return (king.dropCandidate() != 0 ||
154 king.hasMoveCandidate<Attack>(state) ||
155 KnightCheck::canCheck<Defense>(state));
170 #endif // EVAL_ML_PIECESTAND_H Ptype unpromote(Ptype ptype)
ptypeがpromote後の型の時に,promote前の型を返す. promoteしていない型の時はそのまま返す ...
NonPawnPieceStandCombination()
constexpr Player alt(Player player)
static int index(Player player, Player turn, Ptype ptype, int count)
static CArray< MultiInt, 9 *7 *19 > y_defense_table_sum
static CArray< MultiInt, 5625 > check_table
int countPiecesOnStand(Player pl, Ptype ptype) const
持駒の枚数を数える
static CArray< MultiInt, 5625 > table
int y() const
将棋としてのY座標を返す.
static CArray< MultiInt, osl::Piece::SIZE > table
static CArray< MultiInt, 360 > y_attack_table
static MultiInt eval(const NumEffectState &state)
const PtypeTable Ptype_Table
static MultiInt evalWithUpdate(const NumEffectState &state, Move moved, MultiInt last_value)
uint64_t Iking8Info(Player king) const
Ptype capturePtype() const
static int index(int rook, int bishop, int gold, int silver, int knight, int lance)
static CArray< MultiInt, 21 > table
static CArray< MultiInt, 44 > table
static void setUp(const Weights &weights, int stage)
static bool canCheck(const NumEffectState &state)
PtypeO captured(PtypeO ptypeO)
unpromoteすると共に,ownerを反転する.
static CArray< MultiInt, 16384 > table
static CArray< MultiInt, 360 > y_defense_table
static int index(int i, Player player, Square king, int count)
int getIndexMin(Ptype ptype) const
static int index(Ptype ptype, Player player, Square king, int count)
static CArray< MultiInt, 9 *7 *19 > y_attack_table_sum