gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Re: [computer-go] Competition of the GO-algorithms


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] Re: [computer-go] Competition of the GO-algorithms
Date: Wed, 08 Dec 2004 04:35:59 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

I wrote:
> 015.sgf:
>    A B C D E F G H J K L M N O P Q R S T
> 19 . X O O . . O . . . . . O O X X . . . 19
> 18 . . X O O . X O . . . O . O O X . . . 18
> 17 X X X X O O O X O O . . O X X . . . . 17
> 16 O X X X X O X X X O . O O . X X X X O 16
> 15 O O X O X . X . X O O X O O O O O O X 15
> 14 . O O O X . X O X X X X X X X X X X X 14
> 13 . . . . O O O O X . O . O X . . . . . 13
> 12 . . O O X . O X X X O O O X X . O O . 12
> 11 O O O X X . O X O O . . O . X X O X . 11
> 10 X O X + X O O O . O . O X X . O X . . 10
>  9 X X . X X X O O . O O O O O O O X . . 9
>  8 . . X X X O O O O . O X X O O X X X . 8
>  7 X X O O X O X O X O O O X X X O X . . 7
>  6 X O O O O O X X X X O X . X O O O X . 6
>  5 . O X X X X O X X X X X . X X . . X . 5
>  4 O . O O X O O X O X O O X X O + O . . 4
>  3 . O X . X X O O O X O O X . X X . . . 3
>  2 . . X . X O . O O O O O X . . . . . . 2
>  1 . . . . O . O . O . X O X . . . . . . 1
>    A B C D E F G H J K L M N O P Q R S T
> 
> White plays a gote move inside black's territory at S10. The problem
> is a rather bogus ATTACK_EITHER move reason and that it is taken for
> granted that attack_either moves are safe. There's already a FIXME on
> line 1097 of value_moves.c regarding the latter. This would be nice to
> solve.

The patch below solves this mistake by requiring an attack_either move
not to be a regular attack on either string already in the
test_attack_either() helper. The FIXME is still relevant but not
addressed by this patch.

Regression delta:
nngs4:390       PASS A11 [A11]
1 PASS
Total nodes: 1668577057 3074959 13281024 (-0.0023% 0% -0.00062%)

- test_attack_either() revised

/Gunnar

Index: patterns/helpers.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/helpers.c,v
retrieving revision 1.65
diff -u -r1.65 helpers.c
--- patterns/helpers.c  13 Nov 2004 04:46:45 -0000      1.65
+++ patterns/helpers.c  7 Dec 2004 05:01:12 -0000
@@ -672,7 +672,12 @@
   if (trymove(move, color, "test_attack_either_move", worma)) {
     if (board[worma] == OTHER_COLOR(color)
        && board[wormb] == OTHER_COLOR(color)) {
-      if (!defend_both(worma, wormb))
+      if (!find_defense(worma, NULL) || !find_defense(wormb, NULL)) {
+       if (0)
+         gprintf("%1m: Rej. attack_either_move for %1m & %1m (regular 
attack)\n",
+                 move, worma, wormb);
+      }
+      else if (!defend_both(worma, wormb))
         add_either_move(move, ATTACK_STRING, worma, ATTACK_STRING, wormb);
       else {
        if (0)




reply via email to

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