9 #include <boost/ptr_container/ptr_vector.hpp> 16 class Group :
public boost::ptr_vector<Feature>
21 Group(
const std::string& name);
24 virtual void show(std::ostream&,
int name_width,
const range_t& range,
25 const std::vector<double>& weights)
const;
30 const std::vector<double>& weights)
const;
31 void showAll(std::ostream& os,
int name_width,
const range_t& range,
32 const std::vector<double>& weights)
const;
34 const std::vector<double>& weights,
int n)
const;
36 const std::vector<double>& weights)
const;
37 bool load(
const std::string& directory,
const range_t& range,
38 std::vector<double>& weights)
const;
50 void show(std::ostream& os,
int name_width,
const range_t& range,
51 const std::vector<double>& weights)
const 53 showAll(os, name_width, range, weights);
72 for (
int i=0; i<4; ++i)
73 for (
int p=0; p<8; ++p)
74 push_back(
new Check(i));
76 void show(std::ostream& os,
int name_width,
const range_t& range,
77 const std::vector<double>& weights)
const 79 showAll(os, name_width, range, weights);
90 const int progress8 = env.
progress.value()/2;
91 return index*8 + progress8;
101 for (
int p=0; p<8; ++p)
103 for (
int p=0; p<8; ++p)
107 const std::vector<double>& weights)
const 109 showAll(os, name_width, range, weights);
115 const int progress8 = env.
progress.value()/2;
124 for (
int s=0; s<=3; ++s) {
125 for (
int o=0; o<=3; ++o) {
126 push_back(
new Block(s, o));
131 const std::vector<double>& weights)
const 133 showAll(os, name_width, range, weights);
148 for (
int i=0; i<16; ++i)
149 push_back(
new Open(i));
152 const std::vector<double>& weights)
const 154 showTopN(os, name_width, range, weights, 3);
168 const std::vector<double>& weights)
const 170 showTopN(os, name_width, range, weights, 3);
179 const std::vector<double>& weights)
const 181 showAll(os, name_width, range, weights);
190 const std::vector<double>& weights)
const 192 showTopN(os, name_width, range, weights, 3);
199 const int progress8 = env.
progress.value()/2;
200 return index*8 + progress8;
212 const std::vector<double>& weights)
const 214 showAll(os, name_width, range, weights);
230 for (
int p=0; p<8; ++p)
234 const std::vector<double>& weights)
const 236 showAll(os, name_width, range, weights);
240 if (! (*
this)[0].match(state, move, env))
242 const int progress8 = env.
progress.value()/2;
const Move lastMove(size_t last=1) const
bool hasEffectAt(Square target) const
対象とするマスにあるプレイヤーの利きがあるかどうか.
constexpr Player alt(Player player)
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
int findMatch(const NumEffectState &state, Move move, const RatingEnv &env) const
mutually exclusive set of features
virtual int findMatch(const NumEffectState &state, Move m, const RatingEnv &env) const
std::pair< int, int > range_t
bool isOpenCheck(Move move) const
int findMatch(const NumEffectState &, Move move, const RatingEnv &env) const
virtual bool effectiveInCheck() const
bool hasLastMove(size_t last=1) const
bool isMember(Square position) const
bool effectiveInCheck() const
bool load(const std::string &directory, const range_t &range, std::vector< double > &weights) const
bool isDirectCheck(Move move) const
static int index(const NumEffectState &state, Move move)
void saveResult(const std::string &directory, const range_t &range, const std::vector< double > &weights) const
bool effectiveInCheck() const
void showTopN(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights, int n) const
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
bool effectiveInCheck() const
static bool basicMatch(const NumEffectState &state, Move move, Square front)
virtual void show(std::ostream &, int name_width, const range_t &range, const std::vector< double > &weights) const
int findMatch(const NumEffectState &state, Move move, const RatingEnv &) const
void showMinMax(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
Ptype capturePtype() const
int findMatch(const NumEffectState &state, Move move, const RatingEnv &env) const
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
const Square nextSquare(Player P, Square pos, Direction dr) const
next position from pos for player P.
Group(const std::string &name)
void showAll(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
int findMatch(const NumEffectState &, Move move, const RatingEnv &env) const
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
int findMatch(const NumEffectState &state, Move move, const RatingEnv &) const
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
void show(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
int findMatch(const NumEffectState &state, Move move, const RatingEnv &) const
static int count(const NumEffectState &state, Square position, Player player)
bool effectiveInCheck() const
static bool openLong(const NumEffectState &state, Move move)
const BoardTable Board_Table