ucb1srave_descend: In case of urgency tie, don't pass
[pachi.git] / uct / internal.h
blob8c8614311cbf4dcd0947a0e83cf15de7051ed132
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;
12 /* Internal UCT structures */
15 /* Internal engine state. */
16 struct uct {
17 int debug_level;
18 int games, gamelen;
19 float resign_ratio;
20 float loss_threshold;
21 int expand_p;
22 int radar_d;
23 bool playout_amaf;
24 int dumpthres;
25 int threads;
27 struct uct_policy *policy;
28 struct tree *t;
29 struct playout_policy *playout;
32 #define UDEBUGL(n) DEBUGL_(u->debug_level, n)
35 typedef struct tree_node *(*uctp_choose)(struct uct_policy *p, struct tree_node *node, struct board *b, enum stone color);
36 typedef struct tree_node *(*uctp_descend)(struct uct_policy *p, struct tree *tree, struct tree_node *node, int parity, bool allow_pass);
37 typedef void (*uctp_prior)(struct uct_policy *p, struct tree *tree, struct tree_node *node, struct board *b, enum stone color, int parity);
38 typedef void (*uctp_update)(struct uct_policy *p, struct tree *tree, struct tree_node *node, enum stone color, 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 uctp_prior prior;
46 bool wants_amaf;
47 void *data;
50 #endif