UCB1AMAF crit_*: New defaults based on very rough tuning
[pachi/t.git] / fbook.h
blobb571e78c22f5d23c44b129089d7b7ed7d10b1ade
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 #define fbook_hash_bits 16 // 1M w/ 32-bit coord_t
16 #define fbook_hash_mask ((1 << fbook_hash_bits) - 1)
17 /* pass == no move in this position */
18 coord_t moves[1<<fbook_hash_bits];
19 hash_t hashes[1<<fbook_hash_bits];
22 coord_t fbook_check(struct board *board);
23 struct fbook *fbook_init(char *filename, struct board *b);
24 void fbook_done(struct fbook *fbook);
26 #endif