Go to the documentation of this file.
3 #ifndef OSL_EVAL_PIECEPAIR_H
4 #define OSL_EVAL_PIECEPAIR_H
28 template<
int Direction,
int Offset>
29 static int sum12One(
const Piece *basePtr,
const int *xbase,
const int *ybase);
31 template<
int Direction,
int Offset>
32 static int adjust12One(
const Piece *basePtr,
const int *xbase1,
const int *ybase1,
const int *xbase2,
const int *ybase2);
63 for (
int i=0; i<3; ++i)
64 ret += (idx[i] > 0) ? values.
value(idx[i]) : -values.
value(-idx[i]);
static int pindex(Player player, Ptype ptype)
static int value(int offset_id, Square p0, PtypeO o0, Square p1, PtypeO o1, const Weights &values)
void fillBW(int index, int dir, Ptype p0, Ptype p1)
static int adjust12(NumEffectState const &state, Square base, PtypeO pos, PtypeO neg)
static int pieceValue(const NumEffectState &state, Piece p, const Weights &values)
static const CArray< Offset, 12 > offsets
static CArray< IndexTable, 10 > x_table
static index_t index(int offset_id, Piece p, Piece q)
PtypeO newPtypeO(Player player, Ptype ptype)
static int value(int offset_id, Piece p, Square p1, PtypeO o1, const Weights &values)
static int sum12One(const Piece *basePtr, const int *xbase, const int *ybase)
static int valueCompiled(int offset_id, Piece p, Square p1, PtypeO o1)
int value(size_t index) const
static int adjust12One(const Piece *basePtr, const int *xbase1, const int *ybase1, const int *xbase2, const int *ybase2)
static int weight(Player attack, int index, const Weights &values)
static int sum12(NumEffectState const &state, Square base, PtypeO ptypeO)
static CArray< IndexTable, 10 > y_table
static void sanitize(Weights &values)
PtypeO
Player + Ptype [-15, 15] PtypeO の O は Owner の O.
static int evalWithUpdate(const NumEffectState &state, Move moved, int last_value, const Weights &values)
const Square square() const
unsigned int ptypeOIndex(PtypeO ptypeo)
void fillSame(int index, int dir, Ptype p0, Ptype p1)
for same owner
void fillDiffer(int index, int dir, Ptype p0, Ptype p1)
for different owner
int delta(Player p)
playerにとってちょっと高い値
static int pieceValueDouble(const NumEffectState &state, Piece p, const Weights &)
static IndexTable plain_table
static int evalWithUpdateCompiled(const NumEffectState &state, Move moved, int last_value)
static int eval(const NumEffectState &, const Weights &)
static void compile(const Weights &values)
values を展開してクラス全体で使う
static int value(int offset_id, Piece p, Piece q, const Weights &values)