4#ifndef EVAL_ML_MOBILITY_H
5#define EVAL_ML_MOBILITY_H
28 int vertical,
int horizontal,
34 int count,
bool vertical)
36 const int x = (rook.
x() > 5 ?
37 10 - rook.
x() : rook.
x());
38 return x - 1 + 5 * ((promoted ? 1 : 0) +
39 2 * ((vertical ? 1 : 0) + 2 * count));
43 int count,
bool vertical)
45 const int y = (Sign > 0 ? rook.
y() : 10 - rook.
y());
46 return y - 1 + 9 * ((promoted ? 1 : 0) +
47 2 * ((vertical ? 1 : 0) + 2 * count));
54 const bool flip = r.
x() > 5;
55 const int x = (flip ? 10 - r.
x() : r.
x());
56 const int king_x = (flip ? 10 - k.
x() : k.
x());
57 return king_x - 1 + 9 * (x - 1 + 5 * ((vertical ? 1 : 0) + 2 * count));
112 static void adjust(
bool promoted,
int mobility1,
int mobility2,
int y() const
将棋としてのY座標を返す.
const Square rotate180() const
int x() const
将棋としてのX座標を返す.
static void setUp(const Weights &weights)
static void setUp(const Weights &weights, int stage)
static void setUp(const Weights &weights, int stage)
static CArray< MultiInt, 9 > lance_table
static CArray< MultiInt, 34 > sum_table
static int indexX(Square rook, bool promoted, int count, bool vertical)
static CArray< MultiInt, 18 > rook_vertical_table
static int indexXKingX(Square rook, Square king, int count, bool vertical)
static CArray< MultiInt, 324 > x_table
static int indexY(Square rook, bool promoted, int count, bool vertical)
static CArray< MultiInt, 324 > y_table
static void eval(const NumEffectState &, MultiInt &out)
static CArray< MultiInt, 17 *9 > sumkingx_table
static CArray< MultiInt, 18 > rook_horizontal_table
static CArray< MultiInt, 9 *2 *5 *9 > xkingx_table
static void adjust(const NumEffectState &, bool promoted, int vertical, int horizontal, Square pos, MultiInt &value)
static void setUp(const Weights &weights)
static void setUp(const Weights &weights)
static void setUp(const Weights &weights)
static void setUp(const Weights &weights)
static void setUp(const Weights &weights)
static void setUp(const Weights &weights, int stage)
static void adjust(bool promoted, int mobility1, int mobility2, MultiInt &value)
static CArray< MultiInt, 18 > each_table
static void eval(const NumEffectState &, MultiInt &out)
static CArray< MultiInt, 36 > bishop_table
static void adjust(int index, MultiInt &value)
static void eval(const NumEffectState &, MultiInt &out)