1 #ifndef ZZGO_DISTRIBUTED_DISTRIBUTED_H
2 #define ZZGO_DISTRIBUTED_DISTRIBUTED_H
9 /* A coord path encodes coordinates from root child to a given node:
10 * A1->B2->C3 is encoded as coord(A1)<<18 + coord(B2)<<9 + coord(C3)
11 * for 19x19. In this version the table is not a transposition table
12 * so A1->B2->C3 and C3->B2->A1 are different.
13 * The depth is limited to 7 for 19x19 (9 for 9x9) to fit in 64 bits.
14 * path_t is signed to include pass and resign. */
15 typedef int64_t path_t
;
16 #define PRIpath PRIx64
17 #define PATH_T_MAX INT64_MAX
19 /* Stats exchanged between master and slave. They are always
20 * incremental values to be added to what was last sent. */
23 struct move_stats incr
;
26 #define DIST_GAMELEN 1000
28 #define force_reply(id) ((id) + DIST_GAMELEN)
29 #define prevent_reply(id) ((id) % DIST_GAMELEN)
30 #define move_number(id) ((id) % DIST_GAMELEN)
31 #define reply_disabled(id) ((id) < DIST_GAMELEN)
35 struct move_stats amaf
;
38 struct engine
*engine_distributed_init(char *arg
, struct board
*b
);