TESTS: Few historical 19x19 results
[pachi.git] / uct / internal.h
blobda93141731c475a29299927015af6a518ad10122
1 #ifndef ZZGO_UCT_INTERNAL_H
2 #define ZZGO_UCT_INTERNAL_H
4 #include "debug.h"
5 #include "move.h"
6 #include "playout.h"
8 struct tree;
9 struct tree_node;
10 struct uct_policy;
11 struct uct_prior;
13 /* Internal UCT structures */
16 /* Internal engine state. */
17 struct uct {
18 int debug_level;
19 int games, gamelen;
20 float resign_ratio;
21 float loss_threshold;
22 int expand_p;
23 int radar_d;
24 bool playout_amaf, playout_amaf_nakade;
25 bool amaf_prior;
26 int playout_amaf_cutoff;
27 int dumpthres;
28 int threads;
29 int force_seed;
30 bool no_book;
31 int dynkomi;
33 float val_scale;
34 int val_points;
36 struct uct_policy *policy;
37 struct tree *t;
38 struct playout_policy *playout;
39 struct uct_prior *prior;
42 #define UDEBUGL(n) DEBUGL_(u->debug_level, n)
45 typedef struct tree_node *(*uctp_choose)(struct uct_policy *p, struct tree_node *node, struct board *b, enum stone color);
46 typedef struct tree_node *(*uctp_descend)(struct uct_policy *p, struct tree *tree, struct tree_node *node, int parity, bool allow_pass);
47 typedef void (*uctp_prior)(struct uct_policy *p, struct tree *tree, struct tree_node *node, struct board *b, enum stone color, int parity);
48 typedef void (*uctp_update)(struct uct_policy *p, struct tree *tree, struct tree_node *node, enum stone node_color, enum stone player_color, struct playout_amafmap *amaf, float result);
50 struct uct_policy {
51 struct uct *uct;
52 uctp_choose choose;
53 uctp_descend descend;
54 uctp_update update;
55 uctp_prior prior;
56 bool wants_amaf;
57 void *data;
60 #endif