gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] guess_eye_space()


From: Gunnar Farneback
Subject: Re: [gnugo-devel] guess_eye_space()
Date: Sun, 02 Dec 2001 08:41:01 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Dan wrote:
> 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.

Until a recent change guess_eye_space() would always return the same
min and max values. I happened to break this because I had forgot the
importance of it and as you write it's no problem for
owl_attack/owl_defend. The simplest solution to the whole problem is
to revise guess_eye_space() to retain this behavior.

> 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.

The purpose of this piece of code is to find a reinforcing or
destroying move which would maybe change the real number of eyes and
hopefully reduce the uncertainty, so *pessmistic min is highly
relevant. In fact the *max == *min condition is assumed to be
equivalent with an attack/defense point not having been generated.

> 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.

> -  if (*max == *min && *max != *pessimistic_min) {
> +  if (*max != *min) {

This will most likely break the optics badly. After this change, if a
vital point for an eye space with at least one margin has been found
by recognize_eye(), it will be thrown away and replaced by an
arbitrary margin. This is obviously bad.

There are two correct fixes to the problem:
1. Revise guess_eye_space() to always return *max == *min.
2. Modify the proposed patch to something like

  if (attack_point
      && *attack_point == NO_MOVE
      && *max != *pessimistic_min)

This involves two assumptions. First that never only one of
attack_point and defense_point is NULL or NO_MOVE, second that *min >=
*pessimistic_min. 

/Gunnar



reply via email to

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