gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Semeai stuff


From: Gunnar Farneback
Subject: Re: [gnugo-devel] Semeai stuff
Date: Wed, 30 Jan 2002 18:51:25 +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:
> The owl defense codes are changed through
> change_defense, not directly as in the
> previous version.

I think you mean *worm* defense codes.

> Other mysterious results are the 2 unexpected
> PASS in connection.c and a FAIL in optics.c

The two passed connection tests are of the "same_dragon" variety, i.e.
testing the amalgamations. I wouldn't exactly call those results
mysterious, although it's not obvious to me why at least 78 ever
managed to fail.

The optics failure probably has something with inessentiality to do.
This may be worth taking a look at because it's not entirely clear (at
least to me) what result small_semeai would be expected to give.

Finally there's a small problem with the patch:
> --- engine/cache.h      29 Jan 2002 18:20:00 -0000      1.8
> +++ engine/cache.h      30 Jan 2002 05:11:23 -0000
> @@ -279,7 +279,7 @@
>  #define READ_RETURN_SEMEAI(read_result, point, move, value_a, value_b) \
>    do { \
>      if ((value_a) != 0 && (point) != 0) *(point) = (move); \
> -    if (read_result) { \
> +    if (read_result && !pass && owl_phase) { \
>        rr_set_result_move2(*(read_result), (value_a), (value_b), (move)); \
>      } \
>      return; \

This is totally out of place for the pass and owl_phase conditions. If
they should be tested in the macro they must be provided through an
argument. As written here the READ_RETURN_SEMEAI macro can't be reused
elsewhere and if we ever want to change the pass and owl_phase logic
we are extremely unlikely to remember to look in cache.h until we have
spent several hours on debugging.

Luckily there's no need for this in the first place because this code

> +  if ((stackp <= owl_branch_depth) && (hashflags & HASH_SEMEAI)
> +      && (!pass) && owl_phase) {
> +    found_read_result = get_read_result2(SEMEAI, EMPTY, 0,
> +                                       &apos, &bpos, &read_result);
> [...]
> +  }
> +  else
> +    read_result = NULL;

guarantees that read_result==NULL whenever pass==1 or owl_phase==0, or
more general, anytime we don't want to use the cache.

/Gunnar



reply via email to

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