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;
66 static MultiInt eval(
int black_count,
int white_count);
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))));
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>
155 KnightCheck::canCheck<Defense>(state));
Ptype capturePtype() const
uint64_t Iking8Info(Player king) const
int getIndexMin(Ptype ptype) const
int countPiecesOnStand(Player pl, Ptype ptype) const
持駒の枚数を数える
int y() const
将棋としてのY座標を返す.
unsigned int dropCandidate() const
0-7 bit 目を返す
bool hasMoveCandidate(NumEffectState const &state) const
static void setUp(const Weights &weights)
static bool canCheck(const NumEffectState &state)
static void setUp(const Weights &weights)
static MultiInt sumUp(const CArray< int, 6 > &indices, const CArray< MultiInt, 5625 > &values)
static CArray< MultiInt, 5625 > check_table
static CArray< MultiInt, 5625 > table
static MultiInt evalWithUpdate(const NumEffectState &state, Move moved, const MultiInt &last_value, const CArray< bool, 2 > &could_check, const CArray< bool, 2 > &can_check)
static int index(int rook, int bishop, int gold, int silver, int knight, int lance)
NonPawnPieceStandCombination()
static int index(Player player, Player turn, Ptype ptype, int count)
static void setUp(const Weights &weights)
static CArray< MultiInt, 44 > table
static void evalWithUpdateBang(const NumEffectState &state, Move moved, MultiIntPair &last_value_and_out)
static void setUp(const Weights &weights, int stage)
static CArray< MultiInt, 21 > table
static void setUp(const Weights &weights)
static CArray< MultiInt, 16384 > table
static CArray< MultiInt, 360 > y_attack_table
static int index(Ptype ptype, Player player, Square king, int count)
static CArray< MultiInt, 9 *7 *19 > y_attack_table_sum
static int index(int i, Player player, Square king, int count)
static void updateResult(NumEffectState const &state, MultiInt &result, int i, Ptype ptype, CArray< Square, 2 > const &kings)
static MultiInt evalWithUpdate(const NumEffectState &state, Move moved, const MultiInt &last_value)
static CArray< MultiInt, 9 *7 *19 > y_defense_table_sum
static CArray< MultiInt, 360 > y_defense_table
static void setUp(const Weights &weights)
static MultiInt evalWithUpdate(const NumEffectState &state, Move moved, MultiInt last_value)
static CArray< MultiInt, osl::Piece::SIZE > table
static void setUp(const Weights &weights, int stage)
const PtypeTable Ptype_Table
Ptype unpromote(Ptype ptype)
ptypeがpromote後の型の時に,promote前の型を返す. promoteしていない型の時はそのまま返す
constexpr Player alt(Player player)
PtypeO captured(PtypeO ptypeO)
unpromoteすると共に,ownerを反転する.