gochatai/pachi_py/pachi/playout/moggy.c
/* Check if we match any pattern around given move (with the other color to play). */
Check if we match any pattern around given move (with the other color to play).
Check if we match any pattern around given move ( with the other color to play ) .
static void
apply_pattern(struct playout_policy *p, struct board *b, struct move *m, struct move *mm, struct move_queue *q, fixp_t *gammas)
{
	if (board_at(b, m->coord) == S_NONE || board_at(b, m->coord) == S_OFFBOARD)
		return;
	foreach_8neighbor(b, m->coord) {
		apply_pattern_here(p, b, c, stone_other(m->color), q, gammas);
	} foreach_8neighbor_end;
	if (mm) { 
		foreach_8neighbor(b, mm->coord) {
			if (coord_is_8adjecent(m->coord, c, b))
				continue;
			apply_pattern_here(p, b, c, stone_other(m->color), q, gammas);
		} foreach_8neighbor_end;
	}
	if (PLDEBUGL(5))
		mq_gamma_print(q, gammas, b, "Pattern");
}
static void apply_pattern ( struct playout_policy * p , struct board * b , struct move * m , struct move * mm , struct move_queue * q , fixp_t * gammas ) { if ( board_at ( b , m -> coord ) == S_NONE || board_at ( b , m -> coord ) == S_OFFBOARD ) return ; foreach_8neighbor ( b , m -> coord ) { apply_pattern_here ( p , b , c , stone_other ( m -> color ) , q , gammas ) ; } foreach_8neighbor_end ; if ( mm ) { foreach_8neighbor ( b , mm -> coord ) { if ( coord_is_8adjecent ( m -> coord , c , b ) ) continue ; apply_pattern_here ( p , b , c , stone_other ( m -> color ) , q , gammas ) ; } foreach_8neighbor_end ; } if ( PLDEBUGL ( 5 ) ) mq_gamma_print ( q , gammas , b , " " ) ; }
Check if we match any pattern around given move (with the other color to play).
Check if we match any pattern around given move ( with the other color to play ) .
/* Suicides do not make any patterns and confuse us. */ /* Second move for pattern searching */