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]);
const Square square() const
static int value(int offset_id, Square p0, PtypeO o0, Square p1, PtypeO o1, const Weights &values)
static int valueCompiled(int offset_id, Piece p, Square p1, PtypeO o1)
static int evalWithUpdate(const NumEffectState &state, Move moved, int last_value, const Weights &values)
static IndexTable plain_table
static int evalWithUpdateCompiled(const NumEffectState &state, Move moved, int last_value)
static int weight(Player attack, int index, const Weights &values)
static index_t index(int offset_id, Piece p, Piece q)
static int value(int offset_id, Piece p, Piece q, const Weights &values)
static int sum12One(const Piece *basePtr, const int *xbase, const int *ybase)
static const CArray< Offset, 12 > offsets
static int sum12(NumEffectState const &state, Square base, PtypeO ptypeO)
static int pieceValue(const NumEffectState &state, Piece p, const Weights &values)
static int adjust12One(const Piece *basePtr, const int *xbase1, const int *ybase1, const int *xbase2, const int *ybase2)
static int adjust12(NumEffectState const &state, Square base, PtypeO pos, PtypeO neg)
static void compile(const Weights &values)
values を展開してクラス全体で使う
static CArray< IndexTable, 10 > y_table
static void sanitize(Weights &values)
static int pieceValueDouble(const NumEffectState &state, Piece p, const Weights &)
static int value(int offset_id, Piece p, Square p1, PtypeO o1, const Weights &values)
static CArray< IndexTable, 10 > x_table
int delta(Player p)
playerにとってちょっと高い値
unsigned int ptypeOIndex(PtypeO ptypeo)
PtypeO
Player + Ptype [-15, 15] PtypeO の O は Owner の O.
PtypeO newPtypeO(Player player, Ptype ptype)
static int pindex(Player player, Ptype ptype)
void fillSame(int index, int dir, Ptype p0, Ptype p1)
for same owner
void fillBW(int index, int dir, Ptype p0, Ptype p1)
void fillDiffer(int index, int dir, Ptype p0, Ptype p1)
for different owner
int value(size_t index) const