34 #include <boost/unordered_map.hpp> 41 typedef int64_t hashtype;
42 #if (defined(__BORLANDC__) || defined(_MSC_VER)) 43 const hashtype NOT_HASHABLE = 9223372036854775807i64;
45 const hashtype NOT_HASHABLE = 9223372036854775807LL;
48 const char NO_CONT = 255;
50 const int CORNER_NW_PATTERN = 0;
51 const int CORNER_NE_PATTERN = 1;
52 const int CORNER_SW_PATTERN = 2;
53 const int CORNER_SE_PATTERN = 3;
54 const int SIDE_N_PATTERN = 4;
55 const int SIDE_W_PATTERN = 5;
56 const int SIDE_E_PATTERN = 6;
57 const int SIDE_S_PATTERN = 7;
58 const int CENTER_PATTERN = 8;
59 const int FULLBOARD_PATTERN = 9;
61 const int ALGO_FINALPOS = 1;
62 const int ALGO_MOVELIST = 2;
63 const int ALGO_HASH_FULL = 4;
64 const int ALGO_HASH_CORNER = 8;
66 const int ALGO_HASH_CENTER = 32;
67 const int ALGO_HASH_SIDE = 64;
69 const int algo_finalpos = 1;
70 const int algo_movelist = 2;
71 const int algo_hash_full = 3;
72 const int algo_hash_corner = 4;
73 const int algo_intervals = 5;
74 const int algo_hash_center = 6;
75 const int algo_hash_side = 7;
79 const int DATE_PROFILE_START = 1600;
80 const int DATE_PROFILE_END = 2020;
83 char* flipped_sig(
int f,
char* sig,
int boardsize);
84 char* symmetrize(
char* sig,
int boardsize);
92 void pb_hashtype(hashtype d);
93 void pb_int64(int64_t d);
94 void pb_charp(
const char* c,
int size);
96 void pb_string(std::string s);
97 void pb_intp(
int* p,
int size);
100 hashtype retrieve_hashtype();
101 int64_t retrieve_int64();
102 int* retrieve_intp();
103 char retrieve_char();
104 char* retrieve_charp();
105 std::string retrieve_string();
110 SnapshotVector::iterator current;
135 void set(
char i,
char j,
char k,
char l,
char cs)
throw(
PatternError);
205 std::vector<MoveNC> contList;
216 Pattern(
int le,
int ri,
int to,
int bo,
int BOARDSIZE,
int sX,
int sY,
const char* iPos,
const std::vector<MoveNC>& CONTLIST,
const char* CONTLABELS = 0)
throw(
PatternError);
217 Pattern(
int le,
int ri,
int to,
int bo,
int BOARDSIZE,
int sX,
int sY,
const char* iPos)
throw(
PatternError);
218 Pattern(
int type,
int BOARDSIZE,
int sX,
int sY,
const char* iPos,
const std::vector<MoveNC>& CONTLIST,
const char* CONTLABELS = 0);
219 Pattern(
int type,
int BOARDSIZE,
int sX,
int sY,
const char* iPos,
const char* CONTLABELS = 0);
226 char getInitial(
int i,
int j);
227 char getFinal(
int i,
int j);
230 int operator==(
const Pattern& p);
231 std::string printPattern();
234 static int flipsX(
int i,
int x,
int y,
int XX,
int YY);
235 static int flipsY(
int i,
int x,
int y,
int XX,
int YY);
236 static int PatternInvFlip(
int i);
237 static int compose_flips(
int i,
int j);
271 float average_date();
272 float average_date_B();
273 float average_date_W();
274 int became_popular();
275 int became_popular_B();
276 int became_popular_W();
277 int became_unpopular();
278 int became_unpopular_B();
279 int became_unpopular_W();
298 std::vector<Pattern> data;
299 std::vector<Symmetries> symmetries;
300 vector<Continuation* > continuations;
316 char* updateContinuations(
int orientation,
int x,
int y,
char co,
bool tenuki,
char winner,
int date);
317 char* sortContinuations();
318 char invertColor(
char co);
327 Candidate(
char X,
char Y,
char ORIENTATION);
337 static bool cmp_pts(
Hit* a,
Hit* b);
Definition: pattern.h:114
Definition: pattern.h:119
int W
number of all white continuations
Definition: pattern.h:247
Definition: pattern.h:189
Definition: pattern.h:242
int tB
number of black tenuki plays
Definition: pattern.h:248
Definition: pattern.h:293
int lB
black losses (where next play is B)
Definition: pattern.h:251
Definition: sgfparser.h:42
The GameList class is the main interface to the libkombilo functionality.
Definition: search.h:187
Definition: pattern.h:330
int lW
black losses (where next play is W)
Definition: pattern.h:253
int wW
black wins (where next play is W)
Definition: pattern.h:252
Definition: pattern.h:321
int B
number of all black continuations
Definition: pattern.h:246
int y
y coordinate of corresp. label on board
Definition: pattern.h:245
int special
== -1, unless there exists a symmetry which yields the color-switched pattern
Definition: pattern.h:302
int tW
number of white tenuki plays
Definition: pattern.h:249
Definition: pattern.h:124
int x
x coordinate of corresp. label on board
Definition: pattern.h:244
Hashing for full board patterns.
Definition: algos.h:369
int wB
black wins (where next play is B)
Definition: pattern.h:250
int nextMove
1: next must be black, 2: next must be white, 0: no restriction
Definition: pattern.h:297
int fixedColor
search for pattern with exchanged colors as well?
Definition: pattern.h:296