3#ifndef OSL_EVAL_ML_PIECEPAIRKING_H
4#define OSL_EVAL_ML_PIECEPAIRKING_H
27 template <Player King>
30 template <Player King>
32 template <Player King>
34 template <Player King>
38 return king + i0*45*7 + i1;
42 return p.
x()-1 + (p.
y()-1)*9;
48 assert(king.
y() <= 3);
56 return (king.
x()-1 + (king.
y()-1)*5)*45*7*45*7;
66 assert(position.
y() <= 5);
int y() const
将棋としてのY座標を返す.
const Square rotate180() const
int x() const
将棋としてのX座標を返す.
const Square flipHorizontal() const
static int indexWhite(Square p)
static int add(const NumEffectState &state, Square to, Ptype ptype)
static void setUp(const Weights &weights)
static int addSub(const NumEffectState &state, Square to, Ptype ptype, Square from)
static void evalWithUpdateBang(const NumEffectState &state, Move moved, CArray< int, 2 > &last_value)
static int composeIndex(int king, int i0, int i1)
static int evalOne(const NumEffectState &)
static osl::CArray< int16_t, ONE_DIM > table
static int sub(const NumEffectState &state, Square from, Ptype ptype)
static int indexKing(Player owner, Square king, bool &flipx)
static int indexPiece(Player owner, Square position, Ptype ptype)
bool isPromoted(Ptype ptype)
ptypeがpromote後の型かどうかのチェック