10 typedef coord_t (*playoutp_choose
)(struct playout_policy
*playout_policy
, struct board
*b
, enum stone my_color
);
11 /* 0.0 - 1.0; can return NAN is policy has no opinion */
12 typedef float (*playoutp_assess
)(struct playout_policy
*playout_policy
, struct board
*b
, struct move
*m
);
14 struct playout_policy
{
16 /* We call choose when we ask policy about next move.
17 * We call assess when we ask policy about how good given move is. */
18 playoutp_choose choose
;
19 playoutp_assess assess
;
24 /* Record of the random playout - for each intersection:
25 * S_NONE: This move was never played
26 * S_BLACK: This move was played by black first
27 * S_WHITE: This move was played by white first
29 struct playout_amafmap
{
30 enum stone
*map
; // [board_size2(b)]
34 /* 1: starting_color wins, 0: starting_color loses
35 * -1: superko inside the game tree */
36 int play_random_game(struct board
*b
, enum stone starting_color
, int gamelen
, struct playout_amafmap
*amafmap
, struct playout_policy
*policy
);