13 for (
size_t i = 0; i < weights.
dimension(); ++i)
18 for (
int black = 0; black < 16; ++black)
20 for (
int white = 0; white < 16; ++white)
38 return table[
index(black_attack, white_defense)] -
45 for (
size_t i = 0; i < weights.
dimension(); ++i)
59 return table[
index(black_attack, white_defense,
60 white_attack, black_defense)];
66 for (
size_t i = 0; i < weights.
dimension(); ++i)
70 for (
int ba = 0; ba < 16; ++ba)
72 for (
int wd = 0; wd < 16; ++wd)
74 for (
int wa = 0; wa < 16; ++wa)
76 for (
int bd = 0; bd < 16; ++bd)
78 if (ba + wd < wa + bd ||
79 (ba + wd == wa + bd &&
static CArray< int, 256 > table
static void setUp(const Weights &weights)
static void setUp(const Weights &weights)
int value(size_t index) const
ProgressN< 16 > Progress16
static int eval(Progress16 black, Progress16 white)
static CArray< int, 256 > table
static void setUp(const Weights &weights)
static int eval(Progress16 black_attack, Progress16 white_defense, Progress16 white_attack, Progress16 black_defense)
static int index(Progress16 black, Progress16 white)
static CArray< int, 65536 > table
static int eval(Progress16 black_attack, Progress16 white_defense, Progress16 white_attack, Progress16 black_defense)