UCT pondering: Enable by default
[pachi/nmclean.git] / fbook.h
blob9e3db4ddbf8e2b7163d6ea6486c3e8d3c9582965
1 #ifndef PACHI_FBOOK_H
2 #define PACHI_FBOOK_H
4 #include "move.h"
6 struct board;
8 /* Opening book (fbook as in "forcing book" since the move is just
9 * played unconditionally if found, or possibly "fuseki book"). */
11 struct fbook {
12 int bsize;
13 int handicap;
15 int movecnt;
17 #define fbook_hash_bits 20 // 12M w/ 32-bit coord_t
18 #define fbook_hash_mask ((1 << fbook_hash_bits) - 1)
19 /* pass == no move in this position */
20 coord_t moves[1<<fbook_hash_bits];
21 hash_t hashes[1<<fbook_hash_bits];
24 coord_t fbook_check(struct board *board);
25 struct fbook *fbook_init(char *filename, struct board *b);
26 void fbook_done(struct fbook *fbook);
28 #endif