gochatai/pachi_py/pachi/uct/uct.c
/* Start pondering background with @color to play. */
Start pondering background with @color to play.
Start pondering background with @color to play .
static void
uct_pondering_start(struct uct *u, struct board *b0, struct tree *t, enum stone color)
{
	if (UDEBUGL(1))
		fprintf(stderr, "Starting to ponder with color %s\n", stone2str(stone_other(color)));
	u->pondering = true;
	struct board *b = malloc2(sizeof(*b)); board_copy(b, b0);
	struct move m = { node_coord(t->root), t->root_color };
	int res = board_play(b, &m);
	assert(res >= 0);
	setup_dynkomi(u, b, stone_other(m.color));
	static struct uct_search_state s;
	uct_search_start(u, b, color, t, NULL, &s);
}
static void uct_pondering_start ( struct uct * u , struct board * b0 , struct tree * t , enum stone color ) { if ( UDEBUGL ( 1 ) ) fprintf ( stderr , " \n " , stone2str ( stone_other ( color ) ) ) ; u -> pondering = true ; struct board * b = malloc2 ( sizeof ( * b ) ) ; board_copy ( b , b0 ) ; struct move m = { node_coord ( t -> root ) , t -> root_color } ; int res = board_play ( b , & m ) ; assert ( res >= 0 ) ; setup_dynkomi ( u , b , stone_other ( m . color ) ) ; static struct uct_search_state s ; uct_search_start ( u , b , color , t , NULL , & s ) ; }
Start pondering background with @color to play.
Start pondering background with @color to play .
/* We need a local board copy to ponder upon. */ /* *b0 did not have the genmove'd move played yet. */ /* Start MCTS manager thread "headless". */