My Project
bigramGroup.cc
Go to the documentation of this file.
1/* bigramGroup.cc
2 */
4#include <sstream>
5
6std::string osl::rating::BigramAttackGroup::name(bool same, bool focus_x)
7{
8 std::ostringstream ss;
9 ss << "BigramA" << (same ? '=' : '!') << (focus_x ? 'X' : 'Y');
10 return ss.str();
11}
12
14 : Group(name(s, f)), same(s), focus_x(f)
15{
16 for (int x=-2; x<=2; ++x) {
17 for (int y=-2; y<=2; ++y) {
18 for (int x2=-2; x2<=2; ++x2) {
19 for (int y2=-2; y2<=2; ++y2) {
20 for (int king=0; king<5; ++king) {
21 push_back(new BigramAttack(x, y, x2, y2, king, same, focus_x));
22 }
23 }
24 }
25 }
26 }
27}
28
30{
31 const int index = BigramAttack::index(state, move, env, same, focus_x);
32 return index;
33}
34
35/* ------------------------------------------------------------------------- */
36// ;;; Local Variables:
37// ;;; mode:c++
38// ;;; c-basic-offset:2
39// ;;; End:
圧縮していない moveの表現 .
利きを持つ局面
int findMatch(const NumEffectState &state, Move m, const RatingEnv &env) const
BigramAttackGroup(bool same, bool focus_x)
static std::string name(bool same, bool focus_x)
Definition bigramGroup.cc:6
static int index(const NumEffectState &state, Move move, const RatingEnv &env, bool same, bool focus_x)
mutually exclusive set of features
Definition group.h:17