From 29a244a9755d4f6e35224cd10de202020c1490e7 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 31 Dec 2013 01:47:26 +0100 Subject: [PATCH] Moggy nakade_check(): Call _after_ x-lib checks, not before After 3000-games test, there is still no statistically significant information about it being better or worse than previously, but it sure makes more sense so let's do it. --- playout/moggy.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/playout/moggy.c b/playout/moggy.c index 1f960de..c788480 100644 --- a/playout/moggy.c +++ b/playout/moggy.c @@ -572,14 +572,6 @@ playout_moggy_seqchoose(struct playout_policy *p, struct playout_setup *s, struc /* Local checks */ if (!is_pass(b->last_move.coord)) { - /* Nakade check */ - if (pp->nakaderate > fast_random(100) - && immediate_liberty_count(b, b->last_move.coord) > 0) { - coord_t nakade = nakade_check(p, b, &b->last_move, to_play); - if (!is_pass(nakade)) - return nakade; - } - /* Local group in atari? */ if (pp->lcapturerate > fast_random(100)) { struct move_queue q; q.moves = 0; @@ -620,6 +612,14 @@ playout_moggy_seqchoose(struct playout_policy *p, struct playout_setup *s, struc return mq_pick(&q); } + /* Nakade check */ + if (pp->nakaderate > fast_random(100) + && immediate_liberty_count(b, b->last_move.coord) > 0) { + coord_t nakade = nakade_check(p, b, &b->last_move, to_play); + if (!is_pass(nakade)) + return nakade; + } + /* Check for patterns we know */ if (pp->patternrate > fast_random(100)) { struct move_queue q; q.moves = 0; @@ -737,13 +737,6 @@ playout_moggy_fullchoose(struct playout_policy *p, struct playout_setup *s, stru /* Local checks */ if (!is_pass(b->last_move.coord)) { - /* Nakade check */ - if (pp->nakaderate > 0 && immediate_liberty_count(b, b->last_move.coord) > 0) { - coord_t nakade = nakade_check(p, b, &b->last_move, to_play); - if (!is_pass(nakade)) - mq_add(&q, nakade, 1<lcapturerate > 0) local_atari_check(p, b, &b->last_move, &q); @@ -764,6 +757,13 @@ playout_moggy_fullchoose(struct playout_policy *p, struct playout_setup *s, stru if (pp->eyefixrate > 0) eye_fix_check(p, b, &b->last_move, to_play, &q); + /* Nakade check */ + if (pp->nakaderate > 0 && immediate_liberty_count(b, b->last_move.coord) > 0) { + coord_t nakade = nakade_check(p, b, &b->last_move, to_play); + if (!is_pass(nakade)) + mq_add(&q, nakade, 1<patternrate > 0) { fixp_t gammas[MQL]; -- 2.11.4.GIT