gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] bug report


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] bug report
Date: Sun, 07 Mar 2010 23:54:22 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109)

I wrote:
> Looking back at move 2, --monte-carlo can help but only if the position
> is considered as non-final, which it only was due to the
> owl_node_limit bug for level > 45. Here it makes sense to check the
> semeai reading for the lower left corner.
>
> ...[semeai reading mistake which can be solved by tuning]...
>
> Unfortunately this isn't quite enough to solve the whole problem since
> white still passes if asked to generate a move. But investigating that
> will have to wait until I have more time.

It turns out that the A2 dragon is classified as insubstantial,
causing it to be ignored by the semeai analysis. The substantiality
heuristics are a bit dubious and some kind of revision is needed to
handle this case. One possibility is the patch below, but only if it
doesn't cause other mistakes instead.

For the progress of this issue, see
http://trac.gnugo.org/gnugo/ticket/213

/Gunnar

diff --git a/engine/semeai.c b/engine/semeai.c
index 3d25f46..c88adc6 100644
--- a/engine/semeai.c
+++ b/engine/semeai.c
@@ -87,13 +87,24 @@ semeai()
        continue;


-      /* Ignore inessential worms or dragons */
-
-      if (worm[apos].inessential
-         || DRAGON2(apos).safety == INESSENTIAL
-         || worm[bpos].inessential
-         || DRAGON2(bpos).safety == INESSENTIAL)
-       continue;
+      /* Ignore inessential worms or dragons. In the case of two dead
+       * dragons, require both worm and dragon inessentiality. See
+       * semeai:155 for an example where this matters.
+       */
+      if (dragon[apos].status == DEAD && dragon[bpos].status == DEAD) {
+       if ((worm[apos].inessential
+            && DRAGON2(apos).safety == INESSENTIAL)
+           || (worm[bpos].inessential
+               && DRAGON2(bpos).safety == INESSENTIAL))
+         continue;
+      }
+      else {
+       if (worm[apos].inessential
+           || DRAGON2(apos).safety == INESSENTIAL
+           || worm[bpos].inessential
+           || DRAGON2(bpos).safety == INESSENTIAL)
+         continue;
+      }

       /* Sometimes the dragons are considered neighbors but are too
        * distant to constitute a proper semeai, e.g. in nngs4:650, P2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]