From 4ce2d605d9abdcf59173e0cb6e5d091a381b085e Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Thu, 24 Sep 2009 05:18:18 +0200 Subject: [PATCH] Moggy assess: Do not advise against capturing laddered groups --- playout/moggy.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/playout/moggy.c b/playout/moggy.c index 4c27e7d..2bcab64 100644 --- a/playout/moggy.c +++ b/playout/moggy.c @@ -594,8 +594,15 @@ playout_moggy_assess(struct playout_policy *p, struct board *b, struct move *m) /* _Never_ play here if this move plays out * a caught ladder. (Unless it captures another * group. :-) */ - if (pp->ladderassess && ladder_catches(p, b, m->coord, g)) - ladder = true; + if (pp->ladderassess && ladder_catches(p, b, m->coord, g)) { + /* Note that the opposite is not guarded against; + * we do not advise against capturing a laddered + * group (but we don't encourage it either). Such + * a move can simplify tactical situations if we + * can afford it. */ + if (m->color == board_at(b, c)) + ladder = true; + } }); if (ladder) { -- 2.11.4.GIT