From 883405cbc6764cdede3e6b0be7e6a183508f7d4b Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Mon, 21 Sep 2009 16:28:13 +0200 Subject: [PATCH] Moggy 3x3: Don't use self-atari patterns --- playout/moggy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/playout/moggy.c b/playout/moggy.c index 29eb628..6935a78 100644 --- a/playout/moggy.c +++ b/playout/moggy.c @@ -238,7 +238,8 @@ static void apply_pattern_here(struct playout_policy *p, char *hashtable, struct board *b, struct move *m, struct move_queue *q) { - if (test_pattern_here(p, hashtable, b, m)) + if (test_pattern_here(p, hashtable, b, m) + && !is_selfatari(b, m->color, m->coord)) q->move[q->moves++] = m->coord; } @@ -257,12 +258,12 @@ apply_pattern(struct playout_policy *p, struct board *b, struct move *m, struct // FIXME: Fix assess callers foreach_neighbor(b, m->coord, { struct move m2; m2.coord = c; m2.color = stone_other(m->color); - if (board_at(b, c) == S_NONE && !board_is_eyelike(b, &c, m->color)) + if (board_at(b, c) == S_NONE) apply_pattern_here(p, moggy_patterns, b, &m2, &q); }); foreach_diag_neighbor(b, m->coord) { struct move m2; m2.coord = c; m2.color = stone_other(m->color); - if (board_at(b, c) == S_NONE && !board_is_eyelike(b, &c, m->color)) + if (board_at(b, c) == S_NONE) apply_pattern_here(p, moggy_patterns, b, &m2, &q); } foreach_diag_neighbor_end; -- 2.11.4.GIT