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);
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);
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);
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))
Ptype capturePtype() const
bool isOpenCheck(Move move) const
bool isDirectCheck(Move move) const
bool hasEffectAt(Square target) const
対象とするマスにあるプレイヤーの利きがあるかどうか.
bool hasLastMove(size_t last=1) const
const Move lastMove(size_t last=1) const
static bool basicMatch(const NumEffectState &state, Move move, Square front)
static int count(const NumEffectState &state, Square position, Player player)
static bool openLong(const NumEffectState &state, Move move)
void showAll(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
void saveResult(const std::string &directory, const range_t &range, const std::vector< double > &weights) const
virtual int findMatch(const NumEffectState &state, Move m, const RatingEnv &env) const
bool load(const std::string &directory, const range_t &range, std::vector< double > &weights) const
void showTopN(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights, int n) const
void showMinMax(std::ostream &os, int name_width, const range_t &range, const std::vector< double > &weights) const
virtual bool effectiveInCheck() const
virtual void show(std::ostream &, int name_width, const range_t &range, const std::vector< double > &weights) const
Group(const std::string &name)
static int index(const NumEffectState &state, Move move)
void show(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
std::pair< int, int > range_t
const BoardTable Board_Table
constexpr Player alt(Player player)
bool isMember(Square position) 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
int findMatch(const NumEffectState &state, Move move, const RatingEnv &) const
bool effectiveInCheck() 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
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
bool effectiveInCheck() 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
bool effectiveInCheck() 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
int findMatch(const NumEffectState &state, Move move, const RatingEnv &env) const
bool effectiveInCheck() 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