From 4b35442310dc7990157061c32d92894423ba8e18 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 9 Feb 2010 03:23:54 +0100 Subject: [PATCH] Moggy Pattern3: Do not match pattern3 moves if they play out ladders --- playout/moggy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playout/moggy.c b/playout/moggy.c index ab87bc8..04901e5 100644 --- a/playout/moggy.c +++ b/playout/moggy.c @@ -230,6 +230,10 @@ test_pattern3_here(struct playout_policy *p, struct board *b, struct move *m) /* ...and the move is not obviously stupid. */ if (!is_bad_selfatari(b, m->color, m->coord)) return false; + /* Ladder moves are stupid. */ + group_t atari_neighbor = board_get_atari_neighbor(b, m->coord, m->color); + if (atari_neighbor && is_ladder(b, m->coord, atari_neighbor, pp->borderladders, pp->ladders)) + return false; return true; } -- 2.11.4.GIT