root/06/libkombilo-branches/hash_center_makedb/search.h

Revision 233, 21.9 kB (checked in by ug, 2 years ago)

Basic functions for hashing of center patterns (no search capability yet).

Line 
1 // File: search.h
2 // part of libkombilo, http://www.u-go.net/kombilo/
3
4 // Copyright (c) 2006 Ulrich Goertz <u@g0ertz.de>
5
6 // Permission is hereby granted, free of charge, to any person obtaining a copy of
7 // this software and associated documentation files (the "Software"), to deal in
8 // the Software without restriction, including without limitation the rights to
9 // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 // of the Software, and to permit persons to whom the Software is furnished to do
11 // so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in all
14 // copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 // SOFTWARE.
23
24 #ifndef _SEARCH_H_
25 #define _SEARCH_H_
26
27 #include <vector>
28 #include <utility>
29 #include <stack>
30 #include <sqlite3.h>
31 #include "abstractboard.h"
32 #include "sgfparser.h"
33 typedef char* char_p;
34
35 #if (defined(__BORLANDC__) || defined(_MSC_VER))
36 typedef __int64 hashtype;
37 const hashtype NOT_HASHABLE = 9223372036854775807i64;
38 #else
39 typedef long long hashtype;
40 const hashtype NOT_HASHABLE = 9223372036854775807LL;
41 #endif
42
43 const char NO_CONT = 255;
44
45 class PatternError {
46   public:
47     PatternError();
48 };
49
50 class DBError {
51   public:
52     DBError();
53 };
54
55 class Symmetries {
56   public:
57     char* dataX;
58     char* dataY;
59     char* dataCS;
60     char sizeX;
61     char sizeY;
62     Symmetries(char sX=0, char sY=0);
63     ~Symmetries();
64     Symmetries(const Symmetries& s);
65     Symmetries& operator=(const Symmetries& s);
66     void set(char i, char j, char k, char l, char cs) throw(PatternError);
67     char getX(char i, char j) throw(PatternError);
68     char getY(char i, char j) throw(PatternError);
69     char getCS(char i, char j) throw(PatternError);
70     char has_key(char i, char j) throw(PatternError);
71 };
72
73 const int CORNER_NW_PATTERN = 0;
74 const int CORNER_NE_PATTERN = 1;
75 const int CORNER_SW_PATTERN = 2;
76 const int CORNER_SE_PATTERN = 3;
77 const int SIDE_N_PATTERN = 4;
78 const int SIDE_W_PATTERN = 5;
79 const int SIDE_E_PATTERN = 6;
80 const int SIDE_S_PATTERN = 7;
81 const int CENTER_PATTERN = 8;
82 const int FULLBOARD_PATTERN = 9;
83
84 class Pattern {
85   public:
86     int left; // left, right, top, bottom "==" anchors
87     int right;
88     int bottom;
89     int top;
90     int boardsize;
91
92     int sizeX;
93     int sizeY;
94
95     int flip;                  // used for elements of a patternList
96     int colorSwitch;           // dito
97     char* initialPos;
98     char* finalPos;
99     char* contLabels;
100     std::vector<MoveNC> contList;
101
102     // Pattern constructors
103     //
104     // the char* contLabels, if != 0, should have the same size as the pattern, and should
105     // contain pre-fixed label (which should be re-used when presenting the search results)
106     // Positions without a given label should contain '.'
107     //
108     // Note: the char*'s iPos and CONTLABELS will NOT be free'ed by the Pattern class.
109
110     Pattern();
111     Pattern(int le, int ri, int to, int bo, int BOARDSIZE, int sX, int sY, char* iPos, const std::vector<MoveNC>& CONTLIST, char* CONTLABELS = 0) throw(PatternError);
112     Pattern(int type, int BOARDSIZE, int sX, int sY, char* iPos, std::vector<MoveNC> CONTLIST, char* CONTLABELS = 0);
113     Pattern(int type, int BOARDSIZE, int sX, int sY, char* iPos, char* CONTLABELS = 0);
114     Pattern(const Pattern& p);
115     ~Pattern();
116     Pattern& operator=(const Pattern& p);
117     Pattern& copy(const Pattern& p);
118
119     char getInitial(int i, int j);
120     char getFinal(int i, int j);
121
122     char BW2XO(char c);
123     int operator==(const Pattern& p);
124     std::string printPattern();
125
126     static int flipsX(int i, int x, int y, int XX, int YY);
127     static int flipsY(int i, int x, int y, int XX, int YY);
128     static int PatternInvFlip(int i);
129     static int compose_flips(int i, int j); // returns index of flip "first j, then i"
130 };
131
132 class Continuation {
133   public:
134     int B ; // number of all black continuations
135     int W ;
136     int tB; // black tenuki
137     int tW;
138     int wB; // black wins (where cont. is B)
139     int lB; // black loses (where cont. is B)
140     int wW; // black wins (where cont. is W)
141     int lW; // black loses (where cont. is W)
142     Continuation();
143 };
144
145 class PatternList {
146   public:
147     Pattern pattern;
148     int fixedColor;                      // allow switching colors
149     int nextMove;                        // 1: next must be black, 2: next must be white
150     std::vector<Pattern> data;
151     std::vector<Symmetries> symmetries;
152     Continuation* continuations;
153     int* flipTable;
154     int special;
155
156     PatternList(Pattern& p, int fColor, int nMove) throw (PatternError);
157     ~PatternList();
158
159     char invertColor(char co);
160     void patternList();
161     Pattern get(int i);
162     int size();
163     char* updateContinuations(int orientation, int x, int y, char co, bool tenuki, char winner);
164     char* sortContinuations(); // and give them names to be used as labels
165 };
166
167 class Candidate {
168   public:
169     char x;
170     char y;
171     char orientation; // == index in corresp patternList
172
173     Candidate(char X, char Y, char ORIENTATION);
174 };
175
176 class Hit {
177   public:
178     ExtendedMoveNumber* pos;
179     char* label; // this does not really contain the label, but rather the position of the continuation move
180     Hit(ExtendedMoveNumber* POS, char* LABEL);
181     ~Hit();
182     static bool cmp_pts(Hit* a, Hit* b);
183 };
184
185 class GameList;
186 class SearchOptions;
187
188 class Algorithm {
189   public:
190     Algorithm(int bsize);
191     virtual ~Algorithm();
192
193     virtual void initialize_process(sqlite3* DB);
194     virtual void newgame_process(int game_id);
195     virtual void AB_process(int x, int y);
196     virtual void AW_process(int x, int y);
197     virtual void AE_process(int x, int y, char removed);
198     virtual void endOfNode_process();
199     virtual void move_process(Move m);
200     virtual void pass_process();
201     virtual void branchpoint_process();
202     virtual void endOfVariation_process();
203     virtual void endgame_process();
204     virtual void finalize_process();
205     virtual int readDB(sqlite3* DB);
206     virtual int search(PatternList& patternList, GameList& gl, SearchOptions& options);
207
208     int gid;
209     int boardsize;
210     sqlite3* db;
211 };
212
213 class Algo_signature : public Algorithm {
214   public:
215     Algo_signature(int bsize);
216     ~Algo_signature();
217     void initialize_process(sqlite3* DB) throw(DBError);
218     void newgame_process(int game_id);
219     void AB_process(int x, int y);
220     void AW_process(int x, int y);
221     void AE_process(int x, int y, char removed);
222     void endOfNode_process();
223     void move_process(Move m);
224     void pass_process();
225     void branchpoint_process();
226     void endOfVariation_process();
227     void endgame_process() throw(DBError);
228     void finalize_process();
229
230     int counter;
231     char* signature;
232   private:
233     bool main_variation;
234 };
235
236 class Algo_finalpos : public Algorithm {
237   public:
238     Algo_finalpos(int bsize);
239     ~Algo_finalpos();
240     void initialize_process(sqlite3* DB) throw(DBError);
241     void newgame_process(int game_id);
242     void AB_process(int x, int y);
243     void AW_process(int x, int y);
244     void AE_process(int x, int y, char removed);
245     void endOfNode_process();
246     void move_process(Move m);
247     void pass_process();
248     void branchpoint_process();
249     void endOfVariation_process();
250     void endgame_process() throw(DBError);
251     void finalize_process();
252
253     char* fp;
254     int fpIndex;
255     std::map<int, char* > *data;
256     int readDB(sqlite3* DB);
257     int search(PatternList& patternList, GameList& gl, SearchOptions& options);
258 };
259
260 // in x-coord:
261 const int ENDOFNODE = 128;
262 const int BRANCHPOINT = 64;
263 const int ENDOFVARIATION = 32;
264
265 // in y-coord
266 const int REMOVE = 128;
267 const int BLACK = 64;
268 const int WHITE = 32;
269
270
271 class MovelistCand {
272   public:
273     int orientation;
274     Pattern* p;
275     char* dicts;
276     ExtendedMoveNumber dictsF;
277     bool dictsFound;
278     ExtendedMoveNumber dictsFI;
279     bool dictsFoundInitial;
280     bool dictsDR;
281     int dictsNO;
282     std::vector<MoveNC> contList;
283     int contListIndex;
284     p_cc Xinterv;
285     p_cc Yinterv;
286     char mx;
287     char my;
288
289     MovelistCand(Pattern* P, int ORIENTATION, char* DICTS, int NO, char X, char Y);
290     ~MovelistCand();
291     char dictsget(char x, char y);
292     void dictsset(char x, char y, char d);
293     bool in_relevant_region(char x, char y);
294 };
295
296 class VecMC : public std::vector<MovelistCand* > {
297   public:
298     VecMC();
299     ~VecMC();
300     VecMC* deepcopy(ExtendedMoveNumber& COUNTER, int CANDSSIZE);
301     ExtendedMoveNumber counter;
302     int candssize;
303 };
304
305 class Algo_movelist : public Algorithm {
306   public:
307     Algo_movelist(int bsize);
308     ~Algo_movelist();
309     void initialize_process(sqlite3* DB) throw(DBError);
310     void newgame_process(int game_id);
311     void AB_process(int x, int y);
312     void AW_process(int x, int y);
313     void AE_process(int x, int y, char removed);
314     void endOfNode_process();
315     void move_process(Move m);
316     void pass_process();
317     void branchpoint_process();
318     void endOfVariation_process();
319     void endgame_process() throw(DBError);
320     void finalize_process();
321     int readDB(sqlite3* DB);
322     int search(PatternList& patternList, GameList& gl, SearchOptions& options);
323
324     std::vector<char> movelist;
325     char* fpC;
326     std::map<int, char* > *data1;
327     std::map<int, char* > *data2;
328     std::map<int, int> *data1l;
329 };
330
331
332 class HashhitF { // hashing hit for full board search
333   public:
334     int gameid;
335     char orientation;
336     MoveNC* cont;
337     ExtendedMoveNumber* emn;
338
339     HashhitF();
340     HashhitF(int GAMEID, char ORIENTATION, char* blob);
341     ~HashhitF();
342 };
343
344 class HashhitCS { // hasihing hit for corner/side pattern search
345   public:
346     int gameid;
347     int position;
348     bool cs;
349     HashhitCS(int GAMEID, int POSITION, bool CS);
350 };
351
352 class HashVarInfo {
353   public:
354     hashtype chc;
355     std::vector<std::pair<hashtype, ExtendedMoveNumber>* > * lfc;
356     ExtendedMoveNumber* moveNumber;
357     int numStones;
358
359     HashVarInfo(hashtype CHC, std::vector<std::pair<hashtype, ExtendedMoveNumber>* > * LFC, ExtendedMoveNumber* MOVENUMBER, int NUMSTONES);
360 };
361
362 class Algo_hash_full : public Algorithm {
363   public:
364     Algo_hash_full(int bsize, int MAXNUMSTONES = 50);
365     ~Algo_hash_full();
366     void initialize_process(sqlite3* DB) throw(DBError);
367     void newgame_process(int game_id);
368     void AB_process(int x, int y);
369     void AW_process(int x, int y);
370     void AE_process(int x, int y, char removed);
371     void endOfNode_process();
372     void move_process(Move m) throw(DBError);
373     void pass_process();
374     void branchpoint_process();
375     void endOfVariation_process() throw(DBError);
376     void endgame_process() throw(DBError);
377     void finalize_process();
378     int search(PatternList& patternList, GameList& gl, SearchOptions& options, sqlite3* db);
379
380     int insert_hash(hashtype hashCode, ExtendedMoveNumber& mn, Move* continuation);
381     hashtype compute_hashkey(Pattern& pattern);
382
383     hashtype currentHashCode;
384     ExtendedMoveNumber* moveNumber;
385     std::vector<std::pair<hashtype, ExtendedMoveNumber>* > *lfc; // hash code + move number, still looking for continuation
386     std::stack<HashVarInfo>* branchpoints;
387     int maxNumStones;
388     int numStones;
389 };
390
391 class HashInstance {
392   // When processing sgf games, Algo_hash maintains a list of HashInstance's -
393   // those are regions on the board for which hash codes are put into the
394   // database
395
396   public:
397     HashInstance(char X, char Y, char SIZEX, char SIZEY, int BOARDSIZE);
398     virtual ~HashInstance();
399     bool inRelevantRegion(char X, char Y);
400
401     char xx; // position on the board
402     char yy;
403     int pos;
404     int boardsize;
405     char sizeX; // size of the pattern
406     char sizeY;
407     bool changed;
408
409     virtual void initialize();
410     virtual void finalize();
411     virtual void addB(char x, char y);
412     virtual void removeB(char x, char y);
413     virtual void addW(char x, char y);
414     virtual void removeW(char x, char y);
415     virtual void bppush();
416     virtual void bppop();
417     virtual std::pair<hashtype,int> cHC();  // returns current hash code and corresp. index
418     hashtype* currentHashCode; // array of 8 hashtype values (to automatically symmetrize hash codes)
419     std::stack<std::pair<hashtype*,int> >* branchpoints;
420     int numStones;
421 };
422
423 class HashInstanceCO : public HashInstance {
424   public:
425     HashInstanceCO(char X, char Y, char SIZEX, char SIZEY, int BOARDSIZE);
426     virtual ~HashInstanceCO();
427
428     void addB(char x, char y);
429     void removeB(char x, char y);
430     void addW(char x, char y);
431     void removeW(char x, char y);
432 };
433
434 class HashInstanceCTR : public HashInstance {
435   public:
436     HashInstanceCTR(char X, char Y, char SIZEX, char SIZEY, int BOARDSIZE);
437     virtual ~HashInstanceCTR();
438
439     void addB(char x, char y);
440     void removeB(char x, char y);
441     void addW(char x, char y);
442     void removeW(char x, char y);
443 };
444
445
446 class Algo_hash : public Algorithm {
447   // This class should not be used by the "end-user" (see Algo_hash_corner and
448   // Algo_hash_sides instead)
449
450   public:
451     Algo_hash(int bsize, const std::string& DBNAMEEXT, int MAXNUMSTONES);
452     virtual ~Algo_hash();
453     virtual void initialize_process(sqlite3* DB) throw(DBError);
454     virtual void newgame_process(int game_id);
455     virtual void AB_process(int x, int y);
456     virtual void AW_process(int x, int y);
457     virtual void AE_process(int x, int y, char removed);
458     virtual void endOfNode_process();
459     virtual void move_process(Move m) throw(DBError);
460     virtual void pass_process();
461     virtual void branchpoint_process();
462     virtual void endOfVariation_process();
463     virtual void endgame_process();
464     virtual void finalize_process();
465     virtual int search(PatternList& patternList, GameList& gl, SearchOptions& options, sqlite3* db);
466
467     virtual int insert_hash(hashtype hashCod, int pos);
468     virtual std::pair<hashtype,int> compute_hashkey(PatternList& pl, int CS);
469     std::vector<HashInstance* >* hi;
470     std::string dbnameext;
471     int maxNumStones;
472
473     static const hashtype hashCodes[];
474 };
475
476 class Algo_hash_corner : public Algo_hash {
477   public:
478     Algo_hash_corner(int bsize, int SIZE=7, int MAXNUMSTONES = 20);
479     std::pair<hashtype,int> compute_hashkey(PatternList& pl, int CS);
480     int size;
481 };
482
483 // class Algo_hash_side : public Algo_hash {
484 //   public:
485 //     Algo_hash_side(int bsize, int SIZEX=6, int SIZEY=4);
486 //     int sizeX;
487 //     int sizeY;
488 // };
489
490 class Algo_hash_center : public Algo_hash {
491   public:
492     Algo_hash_center(int bsize);
493     void initialize_process(sqlite3* DB) throw(DBError);
494     void endOfNode_process();
495     void finalize_process();
496     std::pair<hashtype,int> compute_hashkey(PatternList& pl, int CS);
497
498     std::map<hashtype, int> data;
499 };
500
501 // class UIntervals {
502 //  public:
503 //   UIntervals();
504 //
505 //   int first();
506 //   void append(UIntervals interv);
507 //   void inters(UIntervals uinterv);
508 //   int isEmpty();
509 //
510 //   std::vector<pair<int,int>> data;
511 //
512 // };
513 //
514 //
515 // class Algo_intervals : public Algorithm {
516 //  public:
517 //   Algo_intervals(int bsize);
518 //   ~Algo_intervals();
519 //
520 //   std::vector<long> movesArr;
521 //   std::vector<long> moveIntsArr;
522 //
523 //   std::vector<vector<int>*> moves;
524 //
525 //   int counter;
526 //   int ignore;
527 // };
528 //
529 // const int MAXNOMOVES = 16777215;
530 // const int FLAG_POINTER = 16777216;
531 // const int FLAG_BLACK = 33554432;
532 // const int FLAG_WHITE = 67108864;
533
534 const int ALGO_FINALPOS = 1;
535 const int ALGO_MOVELIST = 2;
536 const int ALGO_HASH_FULL = 4;
537 const int ALGO_HASH_CORNER = 8;
538 const int ALGO_INTERVALS = 16;
539 const int ALGO_HASH_CENTER = 32;
540 const int ALGO_HASH_SIDE = 64;
541
542 const int algo_finalpos = 1;
543 const int algo_movelist = 2;
544 const int algo_hash_full = 3;
545 const int algo_hash_corner = 4;
546 const int algo_intervals = 5;
547 const int algo_hash_center = 6;
548 const int algo_hash_side = 7;
549
550 typedef Algorithm* algo_p;
551
552 class ProcessOptions {
553   public:
554     bool processVariations;
555     bool sgfInDB;
556     std::string rootNodeTags; // a comma-separated list of those SGF tags which should be written to the database
557     int algos;           // algorithms to be used
558     int algo_hash_full_maxNumStones;
559     int algo_hash_corner_maxNumStones;
560
561     std::string asString();
562     void validate();
563     std::vector<std::string>* SGFTagsAsStrings();
564
565     ProcessOptions(); // sets default values which have to be overwritten
566     ProcessOptions(std::string s);
567 };
568
569 class SearchOptions {
570   public:
571     int fixedColor;
572     int nextMove; // 0 undetermined, 1 = next move must be black, 2 = next move must be white
573     int moveLimit;
574     bool trustHashFull;
575     bool searchInVariations;
576     int algos;
577
578     SearchOptions();
579     SearchOptions(int FIXEDCOLOR, int NEXTMOVE, int MOVELIMIT=10000);
580 };
581
582 class GameListEntry {
583   public:
584     int id; // id within the concerning database
585     std::string gameInfoStr;
586     char winner;
587     std::vector<Hit* > * hits; // used for hits
588     std::vector<Candidate* > * candidates; // used for candidates
589
590     GameListEntry(int ID, char WINNER, std::string GAMEINFOSTR);
591     ~GameListEntry();
592 };
593
594 class VarInfo {
595   public:
596     Node* n;
597     abstractBoard* b;
598     int i;
599
600     VarInfo(Node* N, abstractBoard* B, int I);
601     VarInfo(const VarInfo& v);
602     ~VarInfo();
603 };
604
605 class GameList {
606   public:
607     char* dbname;
608     std::string orderby;
609                     // constructor receives a FORMAT string; see trac wiki for the syntax to be used
610     std::string format1; // extracted from FORMAT; the column list of the sql query to retrieve the games
611     std::string format2; // extracted from FORMAT, used as template when inserting the query results into the game list
612     int numColumns;
613     int processVariations;
614
615     std::vector<int> boardsizes;
616     std::vector<algo_p> algo_ps;
617     std::vector<sqlite3*> algo_dbs;
618     std::vector<GameListEntry* > * all;
619     std::vector<std::pair<int,int> > * currentList; // pair of game id and position within all
620                                                     // (usually sorted w.r.t. second component)
621     std::vector<std::pair<int,int> > * oldList;
622     int current;
623     sqlite3* db;
624     int readDBs;
625     char* labels;
626     Continuation* continuations;
627     int num_hits;
628     int num_switched;
629     int Bwins;
630     int Wwins;
631
632     // ----------------------------------------------------------------------------
633     // the following methods provide the user interface
634
635     // ------- constructor --------------------------------------------------------
636     // p_options will be copied by GameList, so the caller has to free the pointer
637     GameList(char* DBNAME, std::string ORDERBY="", std::string FORMAT="", ProcessOptions* p_options=0, int cache=100) throw(DBError);
638
639     // ------- processing SGF games (to populate the db) --------------------------
640     void start_processing(int PROCESSVARIATIONS=-1) throw(DBError);
641     int process(const char* sgf, const char* path, const char* fn, const char* DBTREE = 0) throw(SGFError,DBError);
642     void finalize_processing() throw(DBError);
643    
644     // ------- pattern search -----------------------------------------------------
645     // options is copied in the search method (if != 0), so the caller has to free the pointer
646     void search(Pattern& pattern, SearchOptions* options = 0) throw(DBError);
647     char lookupLabel(char x, char y);
648     Continuation lookupContinuation(char x, char y);
649
650     // ------- signature search ---------------------------------------------------
651     // if boardsize != 0 in sigsearch, then the signature is "symmetrized" with respect
652     // to boardsize
653     void sigsearch(char* sig, int boardsize) throw(DBError);
654     std::string getSignature(int i) throw(DBError);
655
656     // ------- game info search ---------------------------------------------------
657     void gisearch(char* sql, int complete=0) throw(DBError);
658
659     // ------- tagging ------------------------------------------------------------
660     void tagsearch(int tag) throw(DBError);
661     void setTag(int tag, int start=0, int end=0) throw(DBError);
662     void deleteTag(int tag, int i = -1) throw(DBError);
663     std::vector<int> getTags(int i, int tag=0) throw(DBError); // note the order of arguments!
664
665     // ------- misc ---------------------------------------------------------------
666     void reset(); // reset currentList to all
667     void resetFormat(std::string ORDERBY="", std::string FORMAT="");
668     int size();
669     int numHits();
670     std::string resultsStr(GameListEntry* gle);
671     std::string currentEntryAsString(int i);
672     std::vector<std::string> currentEntriesAsStrings(int start=0, int end=0);
673     std::string getSGF(int i) throw(DBError);
674     std::string getCurrentProperty(int i, std::string tag) throw (DBError);
675
676     // ------- list of all players -------------------------------------------------
677     int plSize();
678     std::string plEntry(int i);
679
680     // -----------------------------------------------------------------------------
681     // internal methods (called from the algorithm classes)
682     ~GameList();
683     int start();
684     int next();
685     int start_sorted();
686     int end_sorted();
687     char getCurrentWinner();
688     std::vector<Candidate* > *getCurrentCandidateList();
689     void makeCurrentCandidate(std::vector<Candidate* > *candidates);
690     void makeCurrentHit(std::vector<Hit* > *hits);
691     void makeIndexCandidate(int index, std::vector<Candidate* > *candidates);
692     void makeIndexHit(int index, std::vector<Hit* > *hits);
693     void setCurrentFromIndex(int index);
694
695   private:
696     void createGamesDB() throw(DBError);
697     void readDB() throw(DBError);
698     void addAlgos(int bs);
699     int posDT; // used when parsing the DT, SZ, BR, WR, HA fields during processing
700     int posSZ;
701     int posBR;
702     int posWR;
703     int posHA;
704     int SGFtagsSize;
705     int sizeX; // keeps track of width of search pattern during search
706     sqlite3* algo_db1;
707     sqlite3* algo_db2;
708     ProcessOptions* p_op;
709     std::vector<std::string>* SGFtags;
710     std::string sql_ins_rnp; // sql string to insert root node properties
711     std::vector<std::string> pl; // list of all players
712     void readPlayersList() throw(DBError);
713 };
714
715 const int HANDI_TAG = 1;
716 const int PROFESSIONAL_TAG = 2;
717
718 #endif
719
Note: See TracBrowser for help on using the browser.