| 93 | | const int NOT_HASHABLE = MAXINT-1; |
|---|
| 94 | | |
|---|
| 95 | | class Algo_hash : public Algorithm { |
|---|
| 96 | | public: |
|---|
| 97 | | Algo_hash(int bsize, plist, char* fname); |
|---|
| 98 | | ~Algo_hash(); |
|---|
| 99 | | |
|---|
| 100 | | long compute_hashkey(Pattern pattern, type); |
|---|
| 101 | | |
|---|
| 102 | | hash_global; |
|---|
| 103 | | int gameCtr; |
|---|
| 104 | | branchpoints; |
|---|
| 105 | | poslist; |
|---|
| 106 | | char* filename; |
|---|
| 107 | | }; |
|---|
| 108 | | |
|---|
| 109 | | |
|---|
| 110 | | |
|---|
| 111 | | class UIntervals { |
|---|
| 112 | | public: |
|---|
| 113 | | UIntervals(); |
|---|
| 114 | | |
|---|
| 115 | | int first(); |
|---|
| 116 | | void append(UIntervals interv); |
|---|
| 117 | | void inters(UIntervals uinterv); |
|---|
| 118 | | int isEmpty(); |
|---|
| 119 | | |
|---|
| 120 | | vector<pair<int,int>> data; |
|---|
| 121 | | |
|---|
| 122 | | }; |
|---|
| 123 | | |
|---|
| 124 | | |
|---|
| 125 | | class Algo_intervals : public Algorithm { |
|---|
| 126 | | public: |
|---|
| 127 | | Algo_intervals(int bsize); |
|---|
| 128 | | ~Algo_intervals(); |
|---|
| 129 | | |
|---|
| 130 | | vector<long> movesArr; |
|---|
| 131 | | vector<long> moveIntsArr; |
|---|
| 132 | | |
|---|
| 133 | | vector<vector<int>*> moves; |
|---|
| 134 | | |
|---|
| 135 | | int counter; |
|---|
| 136 | | int ignore; |
|---|
| 137 | | }; |
|---|
| 138 | | |
|---|
| 139 | | |
|---|
| 140 | | const int MAXNOMOVES = 16777215; |
|---|
| 141 | | const int FLAG_POINTER = 16777216; |
|---|
| 142 | | const int FLAG_BLACK = 33554432; |
|---|
| 143 | | const int FLAG_WHITE = 67108864; |
|---|
| 144 | | |
|---|
| 145 | | |
|---|
| 146 | | |
|---|
| 147 | | |
|---|
| 148 | | const int ALGO_FINALPOS = 1; |
|---|
| 149 | | const int ALGO_MOVELIST = 2; |
|---|
| 150 | | const int ALGO_HASH_FULL_CORNERS = 4; |
|---|
| 151 | | const int ALGO_INTERVALS = 8; |
|---|
| 152 | | const int ALGO_HASH_CENTER = 16; |
|---|
| 153 | | const int ALGO_HASH_SIDES = 3; |
|---|
| 154 | | |
|---|
| 155 | | // list of implemented algorithms |
|---|
| 156 | | |
|---|
| 157 | | ALL_ALGOS = { ALGO_FINALPOS: Algo_finalpos, |
|---|
| 158 | | ALGO_MOVELIST: Algo_movelist, |
|---|
| 159 | | ALGO_HASH_FULL_CORNERS: Algo_hash_full_corners, |
|---|
| 160 | | ALGO_INTERVALS: Algo_intervals} |
|---|
| 161 | | |
|---|
| 162 | | |
|---|
| | 93 | // const int NOT_HASHABLE = MAXINT-1; |
|---|
| | 94 | // |
|---|
| | 95 | // class Algo_hash : public Algorithm { |
|---|
| | 96 | // public: |
|---|
| | 97 | // Algo_hash(int bsize, plist, char* fname); |
|---|
| | 98 | // ~Algo_hash(); |
|---|
| | 99 | // |
|---|
| | 100 | // long compute_hashkey(Pattern pattern, type); |
|---|
| | 101 | // |
|---|
| | 102 | // hash_global; |
|---|
| | 103 | // int gameCtr; |
|---|
| | 104 | // branchpoints; |
|---|
| | 105 | // poslist; |
|---|
| | 106 | // char* filename; |
|---|
| | 107 | // }; |
|---|
| | 108 | // |
|---|
| | 109 | // |
|---|
| | 110 | // |
|---|
| | 111 | // class UIntervals { |
|---|
| | 112 | // public: |
|---|
| | 113 | // UIntervals(); |
|---|
| | 114 | // |
|---|
| | 115 | // int first(); |
|---|
| | 116 | // void append(UIntervals interv); |
|---|
| | 117 | // void inters(UIntervals uinterv); |
|---|
| | 118 | // int isEmpty(); |
|---|
| | 119 | // |
|---|
| | 120 | // vector<pair<int,int>> data; |
|---|
| | 121 | // |
|---|
| | 122 | // }; |
|---|
| | 123 | // |
|---|
| | 124 | // |
|---|
| | 125 | // class Algo_intervals : public Algorithm { |
|---|
| | 126 | // public: |
|---|
| | 127 | // Algo_intervals(int bsize); |
|---|
| | 128 | // ~Algo_intervals(); |
|---|
| | 129 | // |
|---|
| | 130 | // vector<long> movesArr; |
|---|
| | 131 | // vector<long> moveIntsArr; |
|---|
| | 132 | // |
|---|
| | 133 | // vector<vector<int>*> moves; |
|---|
| | 134 | // |
|---|
| | 135 | // int counter; |
|---|
| | 136 | // int ignore; |
|---|
| | 137 | // }; |
|---|
| | 138 | // |
|---|
| | 139 | // |
|---|
| | 140 | // const int MAXNOMOVES = 16777215; |
|---|
| | 141 | // const int FLAG_POINTER = 16777216; |
|---|
| | 142 | // const int FLAG_BLACK = 33554432; |
|---|
| | 143 | // const int FLAG_WHITE = 67108864; |
|---|
| | 144 | // |
|---|
| | 145 | // |
|---|
| | 146 | // |
|---|
| | 147 | // |
|---|
| | 148 | // const int ALGO_FINALPOS = 1; |
|---|
| | 149 | // const int ALGO_MOVELIST = 2; |
|---|
| | 150 | // const int ALGO_HASH_FULL_CORNERS = 4; |
|---|
| | 151 | // const int ALGO_INTERVALS = 8; |
|---|
| | 152 | // const int ALGO_HASH_CENTER = 16; |
|---|
| | 153 | // const int ALGO_HASH_SIDES = 3; |
|---|
| | 154 | // |
|---|
| | 155 | // // list of implemented algorithms |
|---|
| | 156 | // |
|---|
| | 157 | // ALL_ALGOS = { ALGO_FINALPOS: Algo_finalpos, |
|---|
| | 158 | // ALGO_MOVELIST: Algo_movelist, |
|---|
| | 159 | // ALGO_HASH_FULL_CORNERS: Algo_hash_full_corners, |
|---|
| | 160 | // ALGO_INTERVALS: Algo_intervals} |
|---|
| | 161 | // |
|---|