gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] guess_eye_space()


From: Daniel Bump
Subject: [gnugo-devel] guess_eye_space()
Date: Sat, 1 Dec 2001 20:53:47 -0800

I added a patch, semeai_1_16.3 to the CVS that fixes most,
but not all of the crashes you get when you compile
GNU Go with 'configure --enable-experimental-semeai'. 

Even after this patch strategy2 test 55 crashes:

loadsgf games/strategy14.sgf 125
55 gg_genmove white

What happens is that an eyespace arises which isn't
recognized so compute_eyes_pessimistic() ends up relying on
guess_eye_space(). It returns a different max and min
value without recommending a defense point. And as a
consequence owl_determine_life returns different
probable min and probable max without actually
proposing any moves.

If you want to see this compile the latest owl.c without -O2
and run the following script in gdb:

set args -l strategy14.sgf --quiet -t -L125 -d0x040 --experimental_semeai
del
b do_owl_analyze_semeai
run
c 256+64+32+24+1
tb owl_determine_life
c
b 2077
c
c
set debug = 66

This should take you up to the offending call to
compute_eyes_pessimistic().

Clearly this is undesirable behavior, and though
it doesn't seem to cause any problems for owl_attack
or owl_defend it causes an assertion error in the
semeai code.

My thought is that we should require compute_eyes_pessimistic()
to return an on-board defense point if max and min are
different. There is code at line 967 of optics.c to
find a marginal vertex and declare it the point of
attack and defense but this code is skipped in this
case because the condition:

  if (*max == *min && *max != *pessimistic_min) {

is not met. Actually the pessimistic min is irrelevant
here since the way the function is called, *max and *min
are the quantities which need to be equal if no defense
is found.

Changing this constraint does prevent this crash. (Patch 
attached.) I'll run the regressions with and without
experimental-semeai and see what other effects it may
have.

I am interested in Gunnar's opinion.

Dan


Index: engine/optics.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/optics.c,v
retrieving revision 1.29
diff -u -r1.29 optics.c
--- engine/optics.c     2001/11/28 21:04:49     1.29
+++ engine/optics.c     2001/12/02 04:49:22
@@ -956,7 +956,7 @@
     DEBUG(DEBUG_EYES, "  pessimistic min revised to 1 (interior stones)\n");
   }
   
-  if (*max == *min && *max != *pessimistic_min) {
+  if (*max != *min) {
     /* Find one marginal vertex and set as attack and defense point.
      *
      * We make some effort to find the best marginal vertex by giving




reply via email to

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