Index: engine/combination.c
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/engine/combination.c,v
retrieving revision 1.57
diff -u -p -r1.57 combination.c
--- engine/combination.c	4 Feb 2006 10:17:17 -0000	1.57
+++ engine/combination.c	30 Apr 2007 18:26:29 -0000
@@ -2,7 +2,7 @@
  * This is GNU Go, a Go program. Contact gnugo@gnu.org, or see       *
  * http://www.gnu.org/software/gnugo/ for more information.          *
  *                                                                   *
- * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 and 2006       *
+ * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 and 2007 *
  * by the Free Software Foundation.                                  *
  *                                                                   *
  * This program is free software; you can redistribute it and/or     *
@@ -144,8 +144,8 @@ find_double_threats(int color)
 		remove_attack_threat_move(ii, a_threatened_groups[l]);
 	      }
 	    }
-	    else if (!defend_both(a_threatened_groups[k],
-				  a_threatened_groups[l])) {
+	    else if (defend_both(a_threatened_groups[k],
+				 a_threatened_groups[l]) != WIN) {
 	      TRACE("Double threat at %1m, either %1m or %1m attacked.\n",
 		    ii, a_threatened_groups[k], a_threatened_groups[l]);
 	      add_either_move(ii, ATTACK_STRING, a_threatened_groups[k],
Index: engine/reading.c
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/engine/reading.c,v
retrieving revision 1.168
diff -u -p -r1.168 reading.c
--- engine/reading.c	4 Feb 2006 18:46:04 -0000	1.168
+++ engine/reading.c	30 Apr 2007 18:26:29 -0000
@@ -638,7 +638,8 @@ defend_both(int astr, int bstr)
   int a_savepos;
   int b_savepos;
   int acode = 0;
-  int dcode = 0;
+  int dcode_a;
+  int dcode_b;
   
   int color = board[astr];
   ASSERT1(IS_STONE(color) , astr);
@@ -653,25 +654,29 @@ defend_both(int astr, int bstr)
     bstr = t;
   }
 
-  attack_and_defend(astr, &acode, NULL, &dcode, &a_savepos);
-  if (acode != 0) {
+  attack_and_defend(astr, &acode, NULL, &dcode_a, &a_savepos);
+  if (acode != LOSE) {
     a_threatened = 1;
-    if (dcode != WIN)
-      return 0; /* (astr) already lost */
+    if (dcode_a == LOSE)
+      return LOSE; /* (astr) already lost */
   }
+  else
+    dcode_a = WIN;
   
-  attack_and_defend(bstr, &acode, NULL, &dcode, &b_savepos);
-  if (acode != 0) {
+  attack_and_defend(bstr, &acode, NULL, &dcode_b, &b_savepos);
+  if (acode != LOSE) {
     b_threatened = 1;
-    if (dcode != WIN)
-      return 0; /* (bstr) already lost */
+    if (dcode_b == LOSE)
+      return LOSE; /* (bstr) already lost */
   }
+  else
+    dcode_b = WIN;
 
   /* Neither string can be attacked or only one of them, in which case
    * we have time to save it.
    */
   if (!a_threatened || !b_threatened)
-    return WIN;
+    return gg_min(dcode_a, dcode_b);
   
   /* If both strings are threatened we assume that one will become lost,
    * unless find_defense() happened to return the same defense point for
@@ -682,8 +687,8 @@ defend_both(int astr, int bstr)
    */
 
   if (a_savepos == b_savepos)
-    return WIN; /* Both strings can be attacked but also defended 
-                 * by one move. */
+    return gg_min(dcode_a, dcode_b); /* Both strings can be attacked but
+					also defended by one move. */
 
   /* We also try each of the returned defense points and see whether
    * the other string can still be attacked. This still gives a
Index: engine/utils.c
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/engine/utils.c,v
retrieving revision 1.116
diff -u -p -r1.116 utils.c
--- engine/utils.c	20 Jan 2007 22:14:06 -0000	1.116
+++ engine/utils.c	30 Apr 2007 18:26:29 -0000
@@ -1381,7 +1381,7 @@ double_atari(int move, int color, float 
 	&& trymove(move, color, "double_atari", NO_MOVE)) {
       if (countlib(move) > 1
 	  && (BOARD(m, n+dn) == EMPTY || BOARD(m+dm, n) == EMPTY 
-	      || !defend_both(POS(m, n+dn), POS(m+dm, n)))) {
+	      || defend_both(POS(m, n+dn), POS(m+dm, n)) != WIN)) {
 	popgo();
 	if (value) {
 	  if (worm[POS(m, n+dn)].effective_size
Index: patterns/aa_attackpats.db
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/aa_attackpats.db,v
retrieving revision 1.25
diff -u -p -r1.25 aa_attackpats.db
--- patterns/aa_attackpats.db	23 Jan 2006 18:15:51 -0000	1.25
+++ patterns/aa_attackpats.db	30 Apr 2007 18:26:29 -0000
@@ -434,7 +434,7 @@ XOX
 ?*?
 BAC
 
-; lib(A) == 1 && lib(B) + lib(C) <= 6 && !oplay_defend_both(*,B,C)
+; lib(A) == 1 && lib(B) + lib(C) <= 6 && oplay_defend_both(*,B,C)!=WIN
 
 
 Pattern A25
Index: patterns/barriers.db
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/barriers.db,v
retrieving revision 1.74
diff -u -p -r1.74 barriers.db
--- patterns/barriers.db	27 Mar 2006 21:18:40 -0000	1.74
+++ patterns/barriers.db	30 Apr 2007 18:26:30 -0000
@@ -215,7 +215,7 @@ X,
 Oc
 ba
 
-;!safe_omove(a) || oplay_defend_both(a,b,c)
+;!safe_omove(a) || oplay_defend_both(a,b,c)==WIN
 
 
 Pattern Barrier12
@@ -406,7 +406,7 @@ O,,.
 Oab.
 .dcO
 
-;oplay_attack_either(a,b,c,d,b,d) || oplay_defend_both(a,b,c,d,a,c)
+;oplay_attack_either(a,b,c,d,b,d) || oplay_defend_both(a,b,c,d,a,c)==WIN
 
 
 Pattern Barrier24
@@ -656,7 +656,7 @@ O.XO
 OcXe
 .bad
 
-;oplay_defend_both(a,b,c,d,a,e)
+;oplay_defend_both(a,b,c,d,a,e)==WIN
 
 
 Pattern Barrier42
@@ -669,7 +669,7 @@ OX?
 cD?
 baO
 
-;oplay_attack_either(a,b,b,D) || oplay_defend_both(a,b,a,c)
+;oplay_attack_either(a,b,b,D) || oplay_defend_both(a,b,a,c)==WIN
 
 
 Pattern Barrier43
@@ -696,7 +696,7 @@ Oacd
 ..,o
 ----
 
-;oplay_attack_either(a,b,c,d,d,b) && !oplay_defend_both(a,c,b,c,E)
+;oplay_attack_either(a,b,c,d,d,b) && oplay_defend_both(a,c,b,c,E)!=WIN
 
 
 Pattern Barrier45
@@ -1198,7 +1198,7 @@ Pattern Intrusion5b
 bfE
 aDc
 
-;!oplay_defend_both(a,b,c,D,E)
+;oplay_defend_both(a,b,c,D,E)!=WIN
 >return (!xplay_attack(b,f));
 
 
@@ -1486,7 +1486,7 @@ edc
 fAb
 
 ;lib(A)==2 && !oplay_attack(b,b)
->return (!xplay_attack(c,d) && xplay_defend_both(e,d,f));
+>return (!xplay_attack(c,d) && xplay_defend_both(e,d,f)==WIN);
 
 
 Pattern Intrusion21
@@ -1894,7 +1894,7 @@ bae
 
 ;safe_omove(a)
 ;&& (o_somewhere(e) || oplay_attack(a,e,e))
-;&& !oplay_defend_both(a,b,c,b,D)
+;&& oplay_defend_both(a,b,c,b,D)!=WIN
 >return (!xplay_attack(a,f) && (o_somewhere(e) || (!xplay_attack(e,f))));
 
 
@@ -1913,7 +1913,7 @@ cab?
 
 ;safe_omove(a)
 ;&& (o_somewhere(b) || oplay_attack(a,b,b))
-;&& !oplay_defend_both(a,c,d,e,F,G)
+;&& oplay_defend_both(a,c,d,e,F,G)!=WIN
 >return (!xplay_attack(a,h));
 
 
@@ -2263,7 +2263,7 @@ bQa
 cDO
 
 ;oplay_attack(c,b,D)
->return !safe_xmove(a) && !oplay_defend_both(c,b,a,b,D);
+>return !safe_xmove(a) && oplay_defend_both(c,b,a,b,D)!=WIN;
 
 
 Pattern Intrusion63
@@ -2468,7 +2468,7 @@ Pattern Nonterritory7c
 ebaO
 ----
 
-;!oplay_defend_both(a,b,c,b,D)
+;oplay_defend_both(a,b,c,b,D)!=WIN
 
 >non_xterritory(b);
 >non_xterritory(c);
@@ -2506,7 +2506,7 @@ dEO
 bac
 ---
 
-;safe_omove(a) && !oplay_defend_both(a,b,c,?,d,b,E)
+;safe_omove(a) && oplay_defend_both(a,b,c,?,d,b,E)!=WIN
 
 >non_xterritory(d);
 
@@ -2675,7 +2675,7 @@ Pattern Nonterritory17
 |Xd
 |bX
 
-;!oplay_defend_both(a,b,?,c,a,d)
+;oplay_defend_both(a,b,?,c,a,d)!=WIN
 
 >non_oterritory(a);
 >non_oterritory(c);
@@ -2692,7 +2692,7 @@ Pattern Nonterritory17b
 |ba
 |Xc
 
-;!xplay_defend_both(a,b,c)
+;xplay_defend_both(a,b,c)!=WIN
 
 >non_oterritory(a);
 
@@ -2709,7 +2709,7 @@ dEOo
 bacO
 ----
 
-;!oplay_defend_both(a,b,c,?,d,b,E)
+;oplay_defend_both(a,b,c,?,d,b,E)!=WIN
 
 >non_xterritory(a);
 >non_xterritory(b);
@@ -2728,7 +2728,7 @@ fbXOo
 dcaeO
 -----
 
-;!oplay_defend_both(a,b,c,d,e,?,f,d,b)
+;oplay_defend_both(a,b,c,d,e,?,f,d,b)!=WIN
 
 >non_xterritory(a);
 >non_xterritory(b);
@@ -3096,7 +3096,7 @@ OX?
 .cX
 .ab
 
-;!xplay_defend_both(a,b,c)
+;xplay_defend_both(a,b,c)!=WIN
 
 >non_oterritory(a);
 
@@ -3115,7 +3115,7 @@ XaO
 .DO
 .bC
 
-;!oplay_defend_both(a,?,b,C,D)
+;oplay_defend_both(a,?,b,C,D)!=WIN
 
 >non_xterritory(b);
 
@@ -3172,7 +3172,7 @@ OX
 bX
 ac
 
-;!xplay_defend_both(a,b,c) && !adjacent_to_defendable_stone_in_atari(b)
+;xplay_defend_both(a,b,c)!=WIN && !adjacent_to_defendable_stone_in_atari(b)
 ;&& !adjacent_to_defendable_stone_in_atari(c)
 
 >non_oterritory(a);
@@ -3286,7 +3286,7 @@ O..
 Oab
 ?Xc
 
-;!oplay_defend_both(a,b,a,c)
+;oplay_defend_both(a,b,a,c)!=WIN
 
 >non_oterritory(b);
 >non_oterritory(d);
@@ -3344,7 +3344,7 @@ Pattern Nonterritory51
 bXa
 cdX
 
-;!safe_omove(a) && !oplay_defend_both(b,a,?,c,b,d)
+;!safe_omove(a) && oplay_defend_both(b,a,?,c,b,d)!=WIN
 
 >non_oterritory(c);
 
@@ -3403,7 +3403,7 @@ eab
 ...
 ---
 
-;oplay_defend_both(a,b,c,D,b) && oplay_attack(a,b,a)
+;oplay_defend_both(a,b,c,D,b)==WIN && oplay_attack(a,b,a)
 
 >non_oterritory(e);
 
Index: patterns/endgame.db
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/endgame.db,v
retrieving revision 1.71
diff -u -p -r1.71 endgame.db
--- patterns/endgame.db	11 Jan 2007 20:35:48 -0000	1.71
+++ patterns/endgame.db	30 Apr 2007 18:26:30 -0000
@@ -566,7 +566,7 @@ ba
 X*
 --
 
-;eye(*) && proper_eye(a) && oplay_defend_both(*,a,*,b)
+;eye(*) && proper_eye(a) && oplay_defend_both(*,a,*,b)==WIN
 
 
 Pattern EE303
Index: patterns/helpers.c
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/helpers.c,v
retrieving revision 1.72
diff -u -p -r1.72 helpers.c
--- patterns/helpers.c	23 Jan 2006 18:15:51 -0000	1.72
+++ patterns/helpers.c	30 Apr 2007 18:28:26 -0000
@@ -579,7 +579,7 @@ connect_and_cut_helper(int Apos, int bpo
       if (TRYMOVE(cpos, other)) {
 	if (board[bpos] == EMPTY
 	    || board[epos] == EMPTY
-	    || !defend_both(bpos, epos))
+	    || defend_both(bpos, epos) != WIN)
 	  result = 1;
 	popgo();
       }
@@ -637,7 +637,7 @@ connect_and_cut_helper2(int Apos, int bp
 	if (TRYMOVE(cpos, color)) {
 	  if (board[bpos] == EMPTY
 	      || board[epos] == EMPTY
-	      || !defend_both(bpos, epos))
+	      || defend_both(bpos, epos) != WIN)
 	    result = 1;
 	  popgo();
 	}
@@ -661,7 +661,7 @@ test_attack_either_move(int move, int co
   ASSERT1(board[worma] == OTHER_COLOR(color)
           && board[wormb] == OTHER_COLOR(color), move);
 
-  if (!defend_both(worma, wormb)) {
+  if (defend_both(worma, wormb) != WIN) {
     if (0)
       gprintf("%1m: Reject attack_either_move for %1m, %1m (can't defend both)\n",
 	      move, worma, wormb);
@@ -675,7 +675,7 @@ test_attack_either_move(int move, int co
 	  gprintf("%1m: Rej. attack_either_move for %1m & %1m (regular attack)\n",
 		  move, worma, wormb);
       }
-      else if (!defend_both(worma, wormb))
+      else if (defend_both(worma, wormb) !=  WIN)
         add_either_move(move, ATTACK_STRING, worma, ATTACK_STRING, wormb);
       else {
 	if (0)
Index: patterns/owl_attackpats.db
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/owl_attackpats.db,v
retrieving revision 1.125
diff -u -p -r1.125 owl_attackpats.db
--- patterns/owl_attackpats.db	13 Jan 2007 13:26:53 -0000	1.125
+++ patterns/owl_attackpats.db	30 Apr 2007 18:26:30 -0000
@@ -733,7 +733,7 @@ b*..
 ....
 ----
 
-;!xplay_defend_both(*,b,c,a,b)
+;xplay_defend_both(*,b,c,a,b)!=WIN
 
 
 Pattern A218
@@ -881,7 +881,7 @@ a*.X
 ...x
 ----
 
-;xplay_attack(*,a,C) || !xplay_defend_both(*,a,b,a,C)
+;xplay_attack(*,a,C) || xplay_defend_both(*,a,b,a,C)!=WIN
 
 
 Pattern A227
@@ -1280,7 +1280,7 @@ ba.?
 Y*..
 ?..?
 
-; oplay_defend_both(*,a,*,b) && !oplay_attack(*,a,b)
+; oplay_defend_both(*,a,*,b)==WIN && !oplay_attack(*,a,b)
 
 
 Pattern A401a
@@ -1298,7 +1298,7 @@ ba.?
 Y*..
 ?..?
 
-; oplay_defend_both(*,a,*,b)
+; oplay_defend_both(*,a,*,b)==WIN
 
 
 Pattern A402
@@ -1332,7 +1332,7 @@ cb*
 Aad
 OYX
 
-; oplay_defend_both(*,a,b,c,A,b) && oplay_defend_both(*,b,a,d,*,A)
+; oplay_defend_both(*,a,b,c,A,b)==WIN && oplay_defend_both(*,b,a,d,*,A)==WIN
 
 
 Pattern A403b
@@ -1351,7 +1351,7 @@ Aad
 OYX
 
 ; owl_escape_value(e)>0
-; && oplay_defend_both(*,a,b,c,A,b) && oplay_defend_both(*,b,a,d,*,A)
+; && oplay_defend_both(*,a,b,c,A,b)==WIN && oplay_defend_both(*,b,a,d,*,A)==WIN
 
 
 Pattern A404
@@ -1646,7 +1646,7 @@ o..
 .*Y
 Abc
 
-;owl_escape_value(A)>0 && oplay_defend_both(*,b,*,c)
+;owl_escape_value(A)>0 && oplay_defend_both(*,b,*,c)==WIN
 
 
 Pattern A416
@@ -1705,7 +1705,7 @@ Ycd
 .*A
 
 ;(owl_escape_value(A)>0)
-; && oplay_defend_both(*,c,*,d)
+; && oplay_defend_both(*,c,*,d)==WIN
 
 
 Pattern A419b
@@ -1720,7 +1720,7 @@ Acd
 .*Y
 
 ;(owl_escape_value(A)>0)
-; && oplay_defend_both(*,c,*,d)
+; && oplay_defend_both(*,c,*,d)==WIN
 
 
 Pattern A420
@@ -1738,7 +1738,7 @@ cYaO
 bd*.
 xexx
 
-;owl_escape_value(e)>0 && !xplay_defend_both(*,a,b,c,d)
+;owl_escape_value(e)>0 && xplay_defend_both(*,a,b,c,d)!=WIN
 
 
 Pattern A421
@@ -2476,7 +2476,7 @@ XOX
 XA*
 ---
 
-; oplay_defend_both(*,A,b,*)
+; oplay_defend_both(*,A,b,*)==WIN
 
 
 Pattern A619
@@ -2906,7 +2906,7 @@ Yd*c
 
 ;lib(A) == 3 && !obvious_false_xeye(d)
 ;&& oplay_defend(*,b,c,*) && oplay_defend(*,e,c,*)
-;&& oplay_defend_both(*,c,b,d,e,b,e)
+;&& oplay_defend_both(*,c,b,d,e,b,e)==WIN
 
 
 #########################################################
@@ -3696,8 +3696,8 @@ YAb
 X*?
 
 ; owl_escape_value(b)>0
-; && oplay_defend_both(*,A,b,c,b)
-; && oplay_defend_both(*,A,b,b,*)
+; && oplay_defend_both(*,A,b,c,b)==WIN
+; && oplay_defend_both(*,A,b,b,*)==WIN
 
 
 Pattern A1014
@@ -3727,7 +3727,7 @@ Ae*B
 AfgB
 
 ; (owl_escape_value(A) > 0 || owl_escape_value(B) > 0)
-; && oplay_defend_both(*,g,f,e,f,*)
+; && oplay_defend_both(*,g,f,e,f,*)==WIN
 
 
 Pattern A1015a
@@ -3741,7 +3741,7 @@ Ae*B
 AfgB
 
 ; (owl_escape_value(A) > 0 || owl_escape_value(B) > 0)
-; && oplay_defend_both(*,g,f,e,f,*)
+; && oplay_defend_both(*,g,f,e,f,*)==WIN
 
 
 Pattern A1016
@@ -3760,7 +3760,7 @@ oc*A
 
 ; (owl_escape_value(A) > 0 || owl_escape_value(B) > 0)
 ; && ((x_somewhere(d) && xplay_attack_either(*,c,c,e))
-;     || (!x_somewhere(d) && !xplay_defend_both(*,c,d,c,e)))
+;     || (!x_somewhere(d) && xplay_defend_both(*,c,d,c,e)!=WIN))
 
 
 Pattern A1016a
@@ -3779,7 +3779,7 @@ oc*A
 
 ; (owl_escape_value(A) > 0 || owl_escape_value(B) > 0)
 ; && ((x_somewhere(d) && xplay_attack_either(*,c,c,e))
-;     || (!x_somewhere(d) && !xplay_defend_both(*,c,d,c,e)))
+;     || (!x_somewhere(d) && xplay_defend_both(*,c,d,c,e)!=WIN))
 
 
 Pattern A1017
@@ -4012,7 +4012,7 @@ A*B
 ?Y?
 
 ; vital_chain(A) && vital_chain(B)
-; && !xplay_defend_both(*,A,B)
+; && xplay_defend_both(*,A,B)!=WIN
 
 
 Pattern A1102
@@ -4027,7 +4027,7 @@ baX
 c*O
 ?Y?
 
-;!xplay_defend_both(*,a,b,a,c)
+;xplay_defend_both(*,a,b,a,c)!=WIN
 
 
 Pattern A1104
@@ -4102,7 +4102,7 @@ a*?
 Yb?
 
 ; vital_chain(a) && vital_chain(b)
-; && !xplay_defend_both(*,a,b)
+; && xplay_defend_both(*,a,b)!=WIN
 
 
 Pattern A1107b
@@ -4122,7 +4122,7 @@ ba
 Yc
 
 ;lib(c)>2 && vital_chain(b) && vital_chain(c)
-;&& oplay_attack(*,a,a) && !xplay_defend_both(a,b,c)
+;&& oplay_attack(*,a,a) && xplay_defend_both(a,b,c)!=WIN
 
 # nn Removal candidate (3.3.13)
 #   Success rate in regressions : 0.9 % (23/2562)
@@ -4142,7 +4142,7 @@ ba
 Yc
 
 ;lib(c)>2 && vital_chain(b) && vital_chain(c)
-;&& oplay_attack(*,a,a) && !xplay_defend_both(a,b,c)
+;&& oplay_attack(*,a,a) && xplay_defend_both(a,b,c)!=WIN
 
 
 Pattern A1108
@@ -4282,7 +4282,7 @@ aDO
 *bX
 xCx
 
-;owl_escape_value(C)>0 && owl_goal_dragon(D) && !xplay_defend_both(*,a,b)
+;owl_escape_value(C)>0 && owl_goal_dragon(D) && xplay_defend_both(*,a,b)!=WIN
 
 
 Pattern A1117
@@ -4296,7 +4296,7 @@ X*O         don't let defender cut and c
 X*b
 ?aY
 
-;!xplay_defend_both(*,a,b)
+;xplay_defend_both(*,a,b)!=WIN
 
 
 Pattern A1117a
@@ -4310,7 +4310,7 @@ Y*O         don't let defender cut and c
 Y*b
 ?aX
 
-;!xplay_defend_both(*,a,b)
+;xplay_defend_both(*,a,b)!=WIN
 
 
 Pattern A1118
@@ -4472,7 +4472,7 @@ bd*
 
 ;(owl_escape_value(c) > 0
 ; || owl_escape_value(b) > 0)
-;&& oplay_defend_both(*,d,A,*)
+;&& oplay_defend_both(*,d,A,*)==WIN
 
 
 Pattern A1124a
@@ -4494,7 +4494,7 @@ cdx
 ;(owl_escape_value(d) > 0
 ; || owl_escape_value(b) > 0
 ; || owl_escape_value(c) > 0)
-;&& !oplay_defend_both(e,*,A,e)
+;&& oplay_defend_both(e,*,A,e)!=WIN
 
 
 Pattern A1124b
@@ -5041,7 +5041,7 @@ Y*X
 ?a?
 B*C
 
-;attack(a) && !oplay_attack(*,a) && !oplay_defend_both(*,B,C)
+;attack(a) && !oplay_attack(*,a) && oplay_defend_both(*,B,C)!=WIN
 
 
 #########################################################
Index: patterns/owl_defendpats.db
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/owl_defendpats.db,v
retrieving revision 1.138
diff -u -p -r1.138 owl_defendpats.db
--- patterns/owl_defendpats.db	27 Mar 2006 21:12:13 -0000	1.138
+++ patterns/owl_defendpats.db	30 Apr 2007 18:26:30 -0000
@@ -4252,7 +4252,7 @@ OX
 A*
 OB
 
-;vital_chain(A) && vital_chain(B) && !ko(*) && !oplay_defend_both(*,A,B)
+;vital_chain(A) && vital_chain(B) && !ko(*) && oplay_defend_both(*,A,B)!=WIN
 
 
 Pattern D1100b
@@ -4266,7 +4266,7 @@ OX
 A*
 OB
 
-;vital_chain(A)>1 && vital_chain(B)>1 && !oplay_defend_both(*,A,B)
+;vital_chain(A)>1 && vital_chain(B)>1 && oplay_defend_both(*,A,B)!=WIN
 
 
 Pattern D1101
@@ -4402,7 +4402,7 @@ OCC*.
 eOODf
 .....
 
-; !oplay_defend_both(*,f,a,B,C) && oplay_attack(*,D) && !safe_xmove(e)
+; oplay_defend_both(*,f,a,B,C)!=WIN && oplay_attack(*,D) && !safe_xmove(e)
 
 
 Pattern D1108b
@@ -4419,7 +4419,7 @@ OCCO.
 .aaXX
 .....
 
-;owl_goal_dragon(a) && !oplay_defend_both(*,B,C)
+;owl_goal_dragon(a) && oplay_defend_both(*,B,C)!=WIN
 
 
 Pattern D1109
@@ -4732,7 +4732,7 @@ X*?
 OAc
 B*?
 
-;lib(A)==2 && owl_escape_value(c)>0 && !oplay_defend_both(*,A,B)
+;lib(A)==2 && owl_escape_value(c)>0 && oplay_defend_both(*,A,B)!=WIN
 
 
 Pattern D1125
@@ -4957,7 +4957,7 @@ OX
 aO
 Ob
 
-; (owl_escape_value(*) > 0) && !oplay_defend_both(*,a,b)
+; (owl_escape_value(*) > 0) && oplay_defend_both(*,a,b)!=WIN
 
 
 Pattern D1140
@@ -5121,7 +5121,7 @@ AOo
 *.O
 Boo
 
-; lib(A)==2 && !oplay_defend_both(*,A,B)
+; lib(A)==2 && oplay_defend_both(*,A,B)!=WIN
 
 
 Pattern D1202
@@ -5835,7 +5835,7 @@ E*cX
 dab.
 ofoo
 
-;owl_escape_value(f)>0 && !oplay_defend_both(*,a,b,c,d,a,E)
+;owl_escape_value(f)>0 && oplay_defend_both(*,a,b,c,d,a,E)!=WIN
 
 
 Pattern D1331
@@ -5852,7 +5852,7 @@ COaX
 bD*.
 oeoo
 
-;owl_escape_value(e)>0 && !oplay_defend_both(*,a,b,C,D)
+;owl_escape_value(e)>0 && oplay_defend_both(*,a,b,C,D)!=WIN
 
 
 Pattern D1332
@@ -5887,7 +5887,7 @@ AdX
 *BO
 oco
 
-;owl_escape_value(c)>0 && owl_goal_dragon(d) && !oplay_defend_both(*,A,B)
+;owl_escape_value(c)>0 && owl_goal_dragon(d) && oplay_defend_both(*,A,B)!=WIN
 
 
 Pattern D1333b
@@ -5969,7 +5969,7 @@ EbaX
 dc*.
 ofoo
 
-;owl_escape_value(f)>0 && !oplay_defend_both(*,a,b,c,d,c,E)
+;owl_escape_value(f)>0 && oplay_defend_both(*,a,b,c,d,c,E)!=WIN
 
 
 Pattern D1338
@@ -5986,7 +5986,7 @@ C*XX
 baO.
 odoo
 
-;owl_escape_value(d)>0 && !oplay_defend_both(*,a,b,a,C)
+;owl_escape_value(d)>0 && oplay_defend_both(*,a,b,a,C)!=WIN
 
 
 Pattern D1339
@@ -6707,7 +6707,7 @@ xc*a
 
 ; (owl_escape_value(a) > 0 || owl_escape_value(b) > 0)
 ; && ((o_somewhere(d) && oplay_attack_either(*,c,c,E))
-;     || (!o_somewhere(d) && !oplay_defend_both(*,c,d,c,E)))
+;     || (!o_somewhere(d) && oplay_defend_both(*,c,d,c,E)!=WIN))
 
 
 Pattern D1377
Index: patterns/owl_vital_apats.db
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/owl_vital_apats.db,v
retrieving revision 1.51
diff -u -p -r1.51 owl_vital_apats.db
--- patterns/owl_vital_apats.db	20 Feb 2006 22:42:14 -0000	1.51
+++ patterns/owl_vital_apats.db	30 Apr 2007 18:26:30 -0000
@@ -615,7 +615,7 @@ XOX
 .OX
 *XA
 
-; oplay_defend_both(*,A,*)
+; oplay_defend_both(*,A,*)==WIN
 
 
 Pattern VA35
@@ -841,7 +841,7 @@ XO
 a*
 Xb
 
-;vital_chain(a) && vital_chain(b) && !ko(*) && !xplay_defend_both(*,a,b)
+;vital_chain(a) && vital_chain(b) && !ko(*) && xplay_defend_both(*,a,b)==LOSE
 
 
 Pattern VA47b
@@ -857,7 +857,7 @@ XO
 a*
 Xb
 
-;vital_chain(a) && vital_chain(b) && ko(*) && !xplay_defend_both(*,a,b)
+;vital_chain(a) && vital_chain(b) && ko(*) && xplay_defend_both(*,a,b)!=WIN
 
 
 Pattern VA48
Index: patterns/patterns.db
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/patterns.db,v
retrieving revision 1.144
diff -u -p -r1.144 patterns.db
--- patterns/patterns.db	27 Mar 2006 21:18:40 -0000	1.144
+++ patterns/patterns.db	30 Apr 2007 18:26:30 -0000
@@ -553,7 +553,7 @@ O*X
 O*d
 ?eb
 
-;oplay_defend_both(*,a,b,*,b) && oplay_defend_both(*,b,a,*,a)
+;oplay_defend_both(*,a,b,*,b)==WIN && oplay_defend_both(*,b,a,*,a)==WIN
 
 >add_cut_move(c,d);
 >add_cut_move(c,e);
@@ -716,7 +716,7 @@ Xb
 *a
 .X
 
-;oplay_defend_both(*,a,*,b)
+;oplay_defend_both(*,a,*,b)==WIN
 
 
 Pattern CC44
@@ -889,7 +889,7 @@ XXb
 c*a
 ??X
 
-;alive(c) && oplay_defend_both(*,a,*,b)
+;alive(c) && oplay_defend_both(*,a,*,b)==WIN
 
 
 Pattern CC54
@@ -1056,7 +1056,7 @@ O*X
 Xab
 Xcd
 
-;!oplay_attack_either(*,a,b,*,b) && oplay_defend_both(*,b,a,c,a,d)
+;!oplay_attack_either(*,a,b,*,b) && oplay_defend_both(*,b,a,c,a,d)==WIN
 
 
 Pattern CC68
@@ -1073,7 +1073,7 @@ Pattern CC68
 .Xab
 ..cd
 
-;!oplay_attack_either(*,a,b,*,b) && oplay_defend_both(*,b,a,c,a,d)
+;!oplay_attack_either(*,a,b,*,b) && oplay_defend_both(*,b,a,c,a,d)==WIN
 
 
 Pattern CC69
@@ -1098,7 +1098,7 @@ Pattern CC70
 aX*E
 ?gcd
 
-;(alive(f) || alive(g)) && !oplay_defend_both(*,a,b,c,d,c,E)
+;(alive(f) || alive(g)) && oplay_defend_both(*,a,b,c,d,c,E)!=WIN
 
 
 Pattern CC71
@@ -1116,7 +1116,7 @@ Pattern CC71
 aX*E
 ?fcd
 
-;!oplay_defend_both(*,a,b,c,d,c,E) && (dragonsize(f) <= wormsize(E))
+;oplay_defend_both(*,a,b,c,d,c,E)!=WIN && (dragonsize(f) <= wormsize(E))
 
 
 Pattern CC72
@@ -1387,7 +1387,7 @@ ca*dO
 -----
 
 ;odefend_against(*,d)
-;&& !oplay_defend_both(*,a,b,a,E)
+;&& oplay_defend_both(*,a,b,a,E)!=WIN
 ;&& oplay_attack_either(*,b,a,c,b,c)
 
 
@@ -1475,7 +1475,7 @@ X*ac
 ....
 ----
 
-;!xplay_defend_both(*,a,b,a,D) && xplay_attack_either(*,b,a,c,b,c)
+;xplay_defend_both(*,a,b,a,D)!=WIN && xplay_attack_either(*,b,a,c,b,c)
 
 
 Pattern EC8
@@ -1770,7 +1770,7 @@ cO*
 cad
 ---
 
-;!xplay_defend_both(*,a,b,a,e)
+;xplay_defend_both(*,a,b,a,e)!=WIN
 ;&& xplay_attack_either(*,b,a,d,d,b)
 ;&& oplay_attack_either(*,b,b,c)
 ;&& oplay_attack_either(*,a,d,b,b,c)
@@ -2150,8 +2150,8 @@ fe*bc
 -----
 
 ;oplay_attack_either(*,a,b,c,a,c) && oplay_attack_either(*,d,e,f,d,f)
-;&& !oplay_defend_both(*,b,a,d,e,b,d)
-;&& !oplay_defend_both(*,e,d,a,b,e,a)
+;&& oplay_defend_both(*,b,a,d,e,b,d)!=WIN
+;&& oplay_defend_both(*,e,d,a,b,e,a)!=WIN
 
 
 Pattern EC58
@@ -2170,9 +2170,9 @@ hge..
 .....
 -----
 
-;!oplay_defend_both(*,b,a,b,I) && oplay_attack_either(*,a,b,c,a,c)
+;oplay_defend_both(*,b,a,b,I)!=WIN && oplay_attack_either(*,a,b,c,a,c)
 ;&& oplay_attack_either(*,b,a,d,e,f,g,h,f,h)
-;&& !oplay_defend_both(*,b,a,d,e,g,f,g,I)
+;&& oplay_defend_both(*,b,a,d,e,g,f,g,I)!=WIN
 
 
 Pattern EC59
@@ -2229,7 +2229,7 @@ XXO*
 ....
 ----
 
-; oplay_defend_both(*,a,*,b)
+; oplay_defend_both(*,a,*,b)==WIN
 
 
 Pattern EC61
@@ -2632,7 +2632,7 @@ BO?
 a*X
 ---
 
-;(safe_xmove(*) && xplay_defend_both(*,a,*,B)) || xdefend_against(a,*)
+;(safe_xmove(*) && xplay_defend_both(*,a,*,B)==WIN) || xdefend_against(a,*)
 
 
 Pattern EC106
@@ -2704,7 +2704,7 @@ BO..
 a*.X
 ----
 
-;safe_xmove(*) && xplay_defend_both(*,a,*,B)
+;safe_xmove(*) && xplay_defend_both(*,a,*,B)==WIN
 
 
 Pattern EC202
@@ -2719,7 +2719,7 @@ BO*.
 ac.X
 ----
 
-;xplay_defend_both(c,a,c,B)
+;xplay_defend_both(c,a,c,B)==WIN
 
 
 Pattern EC203
@@ -5302,7 +5302,7 @@ ac*
 Xbd
 ---
 
-;!oplay_defend_both(b,c,a,b) && !oplay_defend_both(c,b,d,*,c,d)
+;oplay_defend_both(b,c,a,b)!=WIN && oplay_defend_both(c,b,d,*,c,d)!=WIN
 
 
 Pattern EB716
@@ -5318,7 +5318,7 @@ a*c
 Xbd
 ---
 
-;!oplay_defend_both(b,*,a,b) && oplay_defend_both(*,b,d,c,a,d)
+;oplay_defend_both(b,*,a,b)!=WIN && oplay_defend_both(*,b,d,c,a,d)==WIN
 
 
 Pattern EB717
@@ -5353,7 +5353,7 @@ ac*
 Xb.
 ---
 
-;!oplay_defend_both(b,c,a,b) && oplay_defend_both(*,c,a,*)
+;oplay_defend_both(b,c,a,b)!=WIN && oplay_defend_both(*,c,a,*)==WIN
 
 
 Pattern EB719
@@ -5370,7 +5370,7 @@ aBBd
 Cee*
 ----
 
-;alive(d) && critical(e) && !oplay_defend_both(*,?,a,B,C)
+;alive(d) && critical(e) && oplay_defend_both(*,?,a,B,C)!=WIN
 
 
 ############################################################
@@ -6337,7 +6337,7 @@ ecDO?
 ?a*bo
 -----
 
-;xmoyo(e) && !oplay_defend_both(*,a,b,?,c,a,D) && !oplay_attack(*,a,b,c,*)
+;xmoyo(e) && oplay_defend_both(*,a,b,?,c,a,D)!=WIN && !oplay_attack(*,a,b,c,*)
 
 
 #############
@@ -7706,7 +7706,7 @@ cXe*F
 
 ; lib(c)>1
 ; && !oplay_attack(*,b)
-; && oplay_defend_both(*,A,*,b)
+; && oplay_defend_both(*,A,*,b)==WIN
 ; && (oplay_attack(*,A,e) || !x_alive_somewhere(D,F))
 
 
@@ -9665,7 +9665,7 @@ Pattern ED22b
 ..A?
 ----
 
-;oplay_attack(*,A) && oplay_defend_both(*,c,*,b)
+;oplay_attack(*,A) && oplay_defend_both(*,c,*,b)==WIN
 
 
 Pattern ED23
@@ -10449,7 +10449,7 @@ O*C
 OBa
 
 ;xterri(a) && !attack(B) && !attack(C) && !oplay_attack(*,?,a,a)
-;&& !oplay_defend_both(*,?,a,B,C)
+;&& oplay_defend_both(*,?,a,B,C)!=WIN
 
 
 Pattern ED71
@@ -11185,7 +11185,7 @@ OX..
 cEa.
 ?EO.
 
-;lib(E)==2 && !oplay_attack(*,c) && !oplay_defend_both(*,a,b,E,D)
+;lib(E)==2 && !oplay_attack(*,c) && oplay_defend_both(*,a,b,E,D)!=WIN
 
 >test_attack_either_move(D,E);
 
@@ -11207,7 +11207,7 @@ cEa.
 # dX*
 # ?a?
 # 
-# ;!oplay_defend_both(*,a,b,c,d,e)
+# ;oplay_defend_both(*,a,b,c,d,e)!=WIN
 # 
 # >antisuji(*);
 
Index: patterns/patterns2.db
===================================================================
RCS file: /home/arend/Go/gnugo-rsync/gnugo/patterns/patterns2.db,v
retrieving revision 1.85
diff -u -p -r1.85 patterns2.db
--- patterns/patterns2.db	10 Dec 2006 20:39:07 -0000	1.85
+++ patterns/patterns2.db	30 Apr 2007 18:26:30 -0000
@@ -99,7 +99,7 @@ Pattern Conn104
 .OaO
 *dbc
 
-;oplay_attack_either(*,a,b,c,a,c) && !oplay_defend_both(*,a,b,d,c,a,d)
+;oplay_attack_either(*,a,b,c,a,c) && oplay_defend_both(*,a,b,d,c,a,d)!=WIN
 
 
 Pattern Conn105
@@ -280,7 +280,7 @@ Obc*
 eaf?
 
 ;oplay_attack_either(*,a,b,c,a,c) && oplay_attack_either(*,b,a,e,b,e)
-;&& oplay_defend_both(*,c,*,f)
+;&& oplay_defend_both(*,c,*,f)==WIN
 
 
 Pattern Conn304
@@ -294,8 +294,8 @@ X.O?
 Obc*
 Eaf?
 
-;oplay_attack_either(*,a,b,c,a,c) && !oplay_defend_both(*,b,a,b,E)
-;&& oplay_defend_both(*,c,*,f)
+;oplay_attack_either(*,a,b,c,a,c) && oplay_defend_both(*,b,a,b,E)!=WIN
+;&& oplay_defend_both(*,c,*,f)==WIN
 
 
 Pattern Conn305
@@ -321,7 +321,7 @@ X.O*
 Obc?
 EaO*
 
-;oplay_attack_either(*,a,b,c,a,c) && !oplay_defend_both(*,b,a,b,E)
+;oplay_attack_either(*,a,b,c,a,c) && oplay_defend_both(*,b,a,b,E)!=WIN
 
 
 Pattern Conn307
@@ -334,7 +334,7 @@ O.X?        nobi connection
 ObD?
 caO*
 
-;!oplay_defend_both(*,a,b,a,D) && oplay_attack_either(*,b,a,c,b,c)
+;oplay_defend_both(*,a,b,a,D)!=WIN && oplay_attack_either(*,b,a,c,b,c)
 
 
 Pattern Conn308
@@ -360,7 +360,7 @@ X.O
 Oa*
 EbO
 
-;!oplay_defend_both(*,a,b,a,E)
+;oplay_defend_both(*,a,b,a,E)!=WIN
 
 
 Pattern Conn310
@@ -444,7 +444,7 @@ O*X          cut through to connect 
 O*B
 .AO
 
-;!oplay_defend_both(*,A,B)
+;oplay_defend_both(*,A,B)!=WIN
 
 
 ##############################################
@@ -539,7 +539,7 @@ O..O
 OacO
 *bde
 
-;oplay_attack_either(*,a,b,c,d,e,c,e) && !oplay_defend_both(*,a,b,d,c,a,d)
+;oplay_attack_either(*,a,b,c,d,e,c,e) && oplay_defend_both(*,a,b,d,c,a,d)!=WIN
 ;&& oplay_attack(*,b,a,c,c)
 
 
@@ -583,7 +583,7 @@ OX.O
 ODbO
 *Oac
 
-;!oplay_defend_both(*,a,b,a,D) && !oplay_defend_both(*,b,a,c,b,c)
+;oplay_defend_both(*,a,b,a,D)!=WIN && oplay_defend_both(*,b,a,c,b,c)!=WIN
 
 
 Pattern Conn507
@@ -687,7 +687,7 @@ O*..          Block across large knight'
 O*ac
 ?DbO
 
-;!oplay_defend_both(*,a,b,a,D) && oplay_attack_either(*,b,a,c,b,c)
+;oplay_defend_both(*,a,b,a,D)!=WIN && oplay_attack_either(*,b,a,c,b,c)
 
 
 Pattern Conn602
@@ -700,7 +700,7 @@ O...
 Obde
 *acO
 
-;oplay_attack_either(*,a,b,c,d,e,c,e) && !oplay_defend_both(*,a,b,d,c,a,d)
+;oplay_attack_either(*,a,b,c,d,e,c,e) && oplay_defend_both(*,a,b,d,c,a,d)!=WIN
 ;&& oplay_attack(*,b,a,c,c)
 
 
@@ -745,7 +745,7 @@ O...
 Ocb.
 d*ae
 
-;!oplay_break_through(*,a,b,*,b,e) && !oplay_defend_both(*,c,d,a,b,c,a)
+;!oplay_break_through(*,a,b,*,b,e) && oplay_defend_both(*,c,d,a,b,c,a)!=WIN
 
 
 Pattern Conn605
@@ -885,7 +885,7 @@ O.*O
 ObC?
 Oa*O
 
-;!oplay_defend_both(*,a,b,a,C)
+;oplay_defend_both(*,a,b,a,C)!=WIN
 
 
 Pattern Conn703
@@ -915,8 +915,8 @@ Odbe
 OcaO
 
 # This condition is not necessary but should be sufficient.
-;oplay_attack(*,e,b,e)  && !oplay_defend_both(*,b,a,c,d,b,c)
-;&& !oplay_defend_both(*,d,c,a,b,d,a)
+;oplay_attack(*,e,b,e)  && oplay_defend_both(*,b,a,c,d,b,c)!=WIN
+;&& oplay_defend_both(*,d,c,a,b,d,a)!=WIN
 
 
 Pattern Conn705
@@ -930,8 +930,8 @@ Odb*
 OcaO
 
 # This condition is not necessary but should be sufficient.
-;!oplay_defend_both(*,b,a,c,d,b,c)
-;&& !oplay_defend_both(*,d,c,a,b,d,a)
+;oplay_defend_both(*,b,a,c,d,b,c)!=WIN
+;&& oplay_defend_both(*,d,c,a,b,d,a)!=WIN
 
 
 Pattern Conn706
@@ -979,7 +979,7 @@ OX.O
 O*ac
 ODbO
 
-;!oplay_defend_both(*,a,b,a,D) && oplay_attack_either(*,b,a,c,b,c)
+;oplay_defend_both(*,a,b,a,D)!=WIN && oplay_attack_either(*,b,a,c,b,c)
 
 
 ###########################
@@ -1099,7 +1099,7 @@ X..         cut through keima
 Dab
 ?*C
 
-;!oplay_defend_both(*,a,b,C,D) && !oplay_connect(*,C,D)
+;oplay_defend_both(*,a,b,C,D)!=WIN && !oplay_connect(*,C,D)
 
 
 #######################################
@@ -1903,7 +1903,7 @@ O.*    Avoid setting up double threat.
 ba*
 ?X?
 
-;(!attack(b) || defend(b)) && !oplay_defend_both(*,a,*,b)
+;(!attack(b) || defend(b)) && oplay_defend_both(*,a,*,b)!=WIN
 
 
 Pattern Shape30
@@ -2490,7 +2490,7 @@ Xba.
 *...
 ----
 
-;!oplay_defend_both(*,a,b,c)
+;oplay_defend_both(*,a,b,c)!=WIN
 
 
 Pattern Shape73
@@ -2673,7 +2673,7 @@ Pattern Shape83
 daX
 .cb
 
-;!oplay_defend_both(*,c,a,b) && oplay_attack(d,c,c)
+;oplay_defend_both(*,c,a,b)!=WIN && oplay_attack(d,c,c)
 
 
 Pattern Shape84
@@ -3110,7 +3110,7 @@ eOC
 fg*
 
 ;lib(a)>1 && o_alive_somewhere(e,f,g) && !attack(B) && !attack(C)
-;&& !oplay_defend_both(*,?,d,B,C)
+;&& oplay_defend_both(*,?,d,B,C)!=WIN
 
 
 Pattern Sente16
@@ -3128,7 +3128,7 @@ bO?
 a*X
 ---
 
-;xplay_attack(*,a,b,*) && xplay_defend_both(*,a,b,*,b)
+;xplay_attack(*,a,b,*) && xplay_defend_both(*,a,b,*,b)==WIN
 
 
 Pattern Sente17
@@ -3144,7 +3144,7 @@ cdXx
 a*bX
 ----
 
-;alive(d) && !xplay_defend_both(*,a,b,?,c,a,d)
+;alive(d) && xplay_defend_both(*,a,b,?,c,a,d)!=WIN
 
 
 Pattern Sente18
@@ -3307,7 +3307,7 @@ OX
 *a
 bX
 
-;!xplay_defend_both(*,a,b)
+;xplay_defend_both(*,a,b)!=WIN
 
 >add_defend_both_move(a,b);
 
@@ -3322,8 +3322,8 @@ Pattern DD2b
 *ca
 ?bX
 
-;!xplay_defend_both(c,a,b)
-;&& (oplay_attack(*,c,c) || oplay_defend_both(*,c,a,b))
+;xplay_defend_both(c,a,b)!=WIN
+;&& (oplay_attack(*,c,c) || oplay_defend_both(*,c,a,b)==WIN)
 
 >add_defend_both_move(a,b);
 
@@ -3341,7 +3341,7 @@ D*c
 Dba
 
 ;oplay_attack(*,D) && oplay_attack_either(*,a,D,E)
-;&& !oplay_defend_both(*,b,c,D,E)
+;&& oplay_defend_both(*,b,c,D,E)!=WIN
 
 >test_attack_either_move(D,E)
 
@@ -3360,7 +3360,7 @@ dac
 db*
 
 ;xplay_attack(a,d) && xplay_attack_either(a,*,d,e)
-;&& !xplay_defend_both(a,b,c,d,e) && !xplay_defend_both(a,c,b,d,e)
+;&& xplay_defend_both(a,b,c,d,e)!=WIN && xplay_defend_both(a,c,b,d,e)!=WIN
 ;&& !xplay_connect(a,d,e) && oplay_connect(*,a,d,e)
 
 >add_defend_both_move(d,e);
@@ -3431,7 +3431,7 @@ XO*
 ca.
 Xb*
 
-;safe_xmove(a) && !xplay_defend_both(a,b,c) && oplay_defend_both(*,a,b,c)
+;safe_xmove(a) && xplay_defend_both(a,b,c)!=WIN && oplay_defend_both(*,a,b,c)==WIN
 
 >add_defend_both_move(b,c);
 
@@ -3463,7 +3463,7 @@ XO.
 ca*
 Xb.
 
-;safe_xmove(a) && !xplay_defend_both(a,b,c) && oplay_defend_both(*,a,b,c)
+;safe_xmove(a) && xplay_defend_both(a,b,c)!=WIN && oplay_defend_both(*,a,b,c)==WIN
 
 >add_defend_both_move(b,c);
 
@@ -3479,7 +3479,7 @@ Pattern DD10
 ?Xc
 
 ;(alive(b) || alive(c))
-;&& safe_xmove(a)==WIN && !xplay_defend_both(a,b,c) && oplay_attack(*,a,a)==WIN
+;&& safe_xmove(a)==WIN && xplay_defend_both(a,b,c)!=WIN && oplay_attack(*,a,a)==WIN
 
 >add_defend_both_move(b,c);
 
@@ -3519,7 +3519,7 @@ A..
 ---
 
 ;lib(A)==3 && !oplay_attack(*,E) && oplay_attack(*,d,A)
-;&& !oplay_defend_both(*,c,d,A,B)
+;&& oplay_defend_both(*,c,d,A,B)!=WIN
 
 >test_attack_either_move(A,B)
 
@@ -3542,7 +3542,7 @@ a..
 ---
 
 ;lib(a)==3 && !attack(e) && xplay_attack(*,d,a)
-;&& !xplay_defend_both(*,c,d,a,b)
+;&& xplay_defend_both(*,c,d,a,b)!=WIN
 
 >add_defend_both_move(a,b)
 
