board_group_rmlib(): Zero out emptied spots in lib[]
[pachi.git] / uct / internal.h
blobb7129410c086e8344636262d8c30c645ce14b7e8
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;
26 struct uct_policy *policy;
27 struct tree *t;
28 struct playout_policy *playout;
31 #define UDEBUGL(n) DEBUGL_(u->debug_level, n)
34 typedef struct tree_node *(*uctp_choose)(struct uct_policy *p, struct tree_node *node, struct board *b, enum stone color);
35 typedef struct tree_node *(*uctp_descend)(struct uct_policy *p, struct tree *tree, struct tree_node *node, int parity, bool allow_pass);
36 typedef void (*uctp_prior)(struct uct_policy *p, struct tree *tree, struct tree_node *node, struct board *b, enum stone color, int parity);
37 typedef void (*uctp_update)(struct uct_policy *p, struct tree_node *node, enum stone color, struct playout_amafmap *amaf, int result);
39 struct uct_policy {
40 struct uct *uct;
41 uctp_choose choose;
42 uctp_descend descend;
43 uctp_update update;
44 uctp_prior prior;
45 bool wants_amaf;
46 void *data;
49 #endif