UCT: Remove sharepos support
[pachi.git] / uct / internal.h
blobe20211e9e1913f4beca4016eb4cc6ccefaa9481b
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 #include "montecarlo/internal.h"
10 struct tree;
11 struct tree_node;
12 struct uct_policy;
14 /* Internal UCT structures */
17 /* Internal engine state. */
18 struct uct {
19 int debug_level;
20 int games, gamelen;
21 float resign_ratio;
22 float loss_threshold;
23 int expand_p;
24 int radar_d;
25 bool playout_amaf;
27 struct montecarlo mc;
28 struct uct_policy *policy;
29 struct tree *t;
30 playout_policeman playout;
33 #define UDEBUGL(n) DEBUGL_(u->debug_level, n)
36 typedef struct tree_node *(*uctp_choose)(struct uct_policy *p, struct tree_node *node, struct board *b, enum stone color);
37 typedef struct tree_node *(*uctp_descend)(struct uct_policy *p, struct tree *tree, struct tree_node *node, int parity, bool allow_pass);
38 typedef void (*uctp_update)(struct uct_policy *p, struct tree_node *node, struct playout_amafmap *amaf, int result);
40 struct uct_policy {
41 struct uct *uct;
42 uctp_choose choose;
43 uctp_descend descend;
44 uctp_update update;
45 bool wants_amaf;
46 void *data;
49 #endif