Ticket #164: def_both.diff

File def_both.diff, 29.7 KB (added by draqo, 5 years ago)
  • engine/combination.c

    diff -N -r -u -X .ignore gnugo-copy/engine/combination.c gnugo/engine/combination.c
    old new  
    22 * This is GNU Go, a Go program. Contact gnugo@gnu.org, or see       * 
    33 * http://www.gnu.org/software/gnugo/ for more information.          * 
    44 *                                                                   * 
    5  * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 and 2006      * 
     5 * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 and 2007 * 
    66 * by the Free Software Foundation.                                  * 
    77 *                                                                   * 
    88 * This program is free software; you can redistribute it and/or     * 
     
    144144                remove_attack_threat_move(ii, a_threatened_groups[l]); 
    145145              } 
    146146            } 
    147             else if (!defend_both(a_threatened_groups[k], 
    148                                   a_threatened_groups[l])) { 
     147            else if (defend_both(a_threatened_groups[k], 
     148                                 a_threatened_groups[l]) != WIN) { 
    149149              TRACE("Double threat at %1m, either %1m or %1m attacked.\n", 
    150150                    ii, a_threatened_groups[k], a_threatened_groups[l]); 
    151151              add_either_move(ii, ATTACK_STRING, a_threatened_groups[k], 
  • engine/reading.c

    diff -N -r -u -X .ignore gnugo-copy/engine/reading.c gnugo/engine/reading.c
    old new  
    638638  int a_savepos; 
    639639  int b_savepos; 
    640640  int acode = 0; 
    641   int dcode = 0; 
     641  int dcode_a; 
     642  int dcode_b; 
    642643   
    643644  int color = board[astr]; 
    644645  ASSERT1(IS_STONE(color) , astr); 
     
    653654    bstr = t; 
    654655  } 
    655656 
    656   attack_and_defend(astr, &acode, NULL, &dcode, &a_savepos); 
    657   if (acode != 0) { 
     657  attack_and_defend(astr, &acode, NULL, &dcode_a, &a_savepos); 
     658  if (acode != LOSE) { 
    658659    a_threatened = 1; 
    659     if (dcode != WIN) 
    660       return 0; /* (astr) already lost */ 
     660    if (dcode_a == LOSE) 
     661      return LOSE; /* (astr) already lost */ 
    661662  } 
     663  else 
     664    dcode_a = WIN; 
    662665   
    663   attack_and_defend(bstr, &acode, NULL, &dcode, &b_savepos); 
    664   if (acode != 0) { 
     666  attack_and_defend(bstr, &acode, NULL, &dcode_b, &b_savepos); 
     667  if (acode != LOSE) { 
    665668    b_threatened = 1; 
    666     if (dcode != WIN) 
    667       return 0; /* (bstr) already lost */ 
     669    if (dcode_b == LOSE) 
     670      return LOSE; /* (bstr) already lost */ 
    668671  } 
     672  else 
     673    dcode_b = WIN; 
    669674 
    670675  /* Neither string can be attacked or only one of them, in which case 
    671676   * we have time to save it. 
    672677   */ 
    673678  if (!a_threatened || !b_threatened) 
    674     return WIN; 
     679    return gg_min(dcode_a, dcode_b); 
    675680   
    676681  /* If both strings are threatened we assume that one will become lost, 
    677682   * unless find_defense() happened to return the same defense point for 
     
    682687   */ 
    683688 
    684689  if (a_savepos == b_savepos) 
    685     return WIN; /* Both strings can be attacked but also defended  
    686                  * by one move. */ 
     690    return gg_min(dcode_a, dcode_b); /* Both strings can be attacked but 
     691                                        also defended by one move. */ 
    687692 
    688693  /* We also try each of the returned defense points and see whether 
    689694   * the other string can still be attacked. This still gives a 
  • engine/utils.c

    diff -N -r -u -X .ignore gnugo-copy/engine/utils.c gnugo/engine/utils.c
    old new  
    13841384        && trymove(move, color, "double_atari", NO_MOVE)) { 
    13851385      if (countlib(move) > 1 
    13861386          && (BOARD(m, n+dn) == EMPTY || BOARD(m+dm, n) == EMPTY  
    1387               || !defend_both(POS(m, n+dn), POS(m+dm, n)))) { 
     1387              || defend_both(POS(m, n+dn), POS(m+dm, n)) != WIN)) { 
    13881388        popgo(); 
    13891389        if (value) { 
    13901390          if (worm[POS(m, n+dn)].effective_size 
  • patterns/aa_attackpats.db

    diff -N -r -u -X .ignore gnugo-copy/patterns/aa_attackpats.db gnugo/patterns/aa_attackpats.db
    old new  
    434434?*? 
    435435BAC 
    436436 
    437 ; lib(A) == 1 && lib(B) + lib(C) <= 6 && !oplay_defend_both(*,B,C) 
     437; lib(A) == 1 && lib(B) + lib(C) <= 6 && oplay_defend_both(*,B,C)!=WIN 
    438438 
    439439 
    440440Pattern A25 
  • patterns/barriers.db

    diff -N -r -u -X .ignore gnugo-copy/patterns/barriers.db gnugo/patterns/barriers.db
    old new  
    215215Oc 
    216216ba 
    217217 
    218 ;!safe_omove(a) || oplay_defend_both(a,b,c) 
     218;!safe_omove(a) || oplay_defend_both(a,b,c)==WIN 
    219219 
    220220 
    221221Pattern Barrier12 
     
    406406Oab. 
    407407.dcO 
    408408 
    409 ;oplay_attack_either(a,b,c,d,b,d) || oplay_defend_both(a,b,c,d,a,c) 
     409;oplay_attack_either(a,b,c,d,b,d) || oplay_defend_both(a,b,c,d,a,c)==WIN 
    410410 
    411411 
    412412Pattern Barrier24 
     
    656656OcXe 
    657657.bad 
    658658 
    659 ;oplay_defend_both(a,b,c,d,a,e) 
     659;oplay_defend_both(a,b,c,d,a,e)==WIN 
    660660 
    661661 
    662662Pattern Barrier42 
     
    669669cD? 
    670670baO 
    671671 
    672 ;oplay_attack_either(a,b,b,D) || oplay_defend_both(a,b,a,c) 
     672;oplay_attack_either(a,b,b,D) || oplay_defend_both(a,b,a,c)==WIN 
    673673 
    674674 
    675675Pattern Barrier43 
     
    696696..,o 
    697697---- 
    698698 
    699 ;oplay_attack_either(a,b,c,d,d,b) && !oplay_defend_both(a,c,b,c,E) 
     699;oplay_attack_either(a,b,c,d,d,b) && oplay_defend_both(a,c,b,c,E)!=WIN 
    700700 
    701701 
    702702Pattern Barrier45 
     
    11981198bfE 
    11991199aDc 
    12001200 
    1201 ;!oplay_defend_both(a,b,c,D,E) 
     1201;oplay_defend_both(a,b,c,D,E)!=WIN 
    12021202>return (!xplay_attack(b,f)); 
    12031203 
    12041204 
     
    14861486fAb 
    14871487 
    14881488;lib(A)==2 && !oplay_attack(b,b) 
    1489 >return (!xplay_attack(c,d) && xplay_defend_both(e,d,f)); 
     1489>return (!xplay_attack(c,d) && xplay_defend_both(e,d,f)==WIN); 
    14901490 
    14911491 
    14921492Pattern Intrusion21 
     
    18941894 
    18951895;safe_omove(a) 
    18961896;&& (o_somewhere(e) || oplay_attack(a,e,e)) 
    1897 ;&& !oplay_defend_both(a,b,c,b,D) 
     1897;&& oplay_defend_both(a,b,c,b,D)!=WIN 
    18981898>return (!xplay_attack(a,f) && (o_somewhere(e) || (!xplay_attack(e,f)))); 
    18991899 
    19001900 
     
    19131913 
    19141914;safe_omove(a) 
    19151915;&& (o_somewhere(b) || oplay_attack(a,b,b)) 
    1916 ;&& !oplay_defend_both(a,c,d,e,F,G) 
     1916;&& oplay_defend_both(a,c,d,e,F,G)!=WIN 
    19171917>return (!xplay_attack(a,h)); 
    19181918 
    19191919 
     
    22632263cDO 
    22642264 
    22652265;oplay_attack(c,b,D) 
    2266 >return !safe_xmove(a) && !oplay_defend_both(c,b,a,b,D); 
     2266>return !safe_xmove(a) && oplay_defend_both(c,b,a,b,D)!=WIN; 
    22672267 
    22682268 
    22692269Pattern Intrusion63 
     
    24682468ebaO 
    24692469---- 
    24702470 
    2471 ;!oplay_defend_both(a,b,c,b,D) 
     2471;oplay_defend_both(a,b,c,b,D)!=WIN 
    24722472 
    24732473>non_xterritory(b); 
    24742474>non_xterritory(c); 
     
    25062506bac 
    25072507--- 
    25082508 
    2509 ;safe_omove(a) && !oplay_defend_both(a,b,c,?,d,b,E) 
     2509;safe_omove(a) && oplay_defend_both(a,b,c,?,d,b,E)!=WIN 
    25102510 
    25112511>non_xterritory(d); 
    25122512 
     
    26752675|Xd 
    26762676|bX 
    26772677 
    2678 ;!oplay_defend_both(a,b,?,c,a,d) 
     2678;oplay_defend_both(a,b,?,c,a,d)!=WIN 
    26792679 
    26802680>non_oterritory(a); 
    26812681>non_oterritory(c); 
     
    26922692|ba 
    26932693|Xc 
    26942694 
    2695 ;!xplay_defend_both(a,b,c) 
     2695;xplay_defend_both(a,b,c)!=WIN 
    26962696 
    26972697>non_oterritory(a); 
    26982698 
     
    27092709bacO 
    27102710---- 
    27112711 
    2712 ;!oplay_defend_both(a,b,c,?,d,b,E) 
     2712;oplay_defend_both(a,b,c,?,d,b,E)!=WIN 
    27132713 
    27142714>non_xterritory(a); 
    27152715>non_xterritory(b); 
     
    27282728dcaeO 
    27292729----- 
    27302730 
    2731 ;!oplay_defend_both(a,b,c,d,e,?,f,d,b) 
     2731;oplay_defend_both(a,b,c,d,e,?,f,d,b)!=WIN 
    27322732 
    27332733>non_xterritory(a); 
    27342734>non_xterritory(b); 
     
    30963096.cX 
    30973097.ab 
    30983098 
    3099 ;!xplay_defend_both(a,b,c) 
     3099;xplay_defend_both(a,b,c)!=WIN 
    31003100 
    31013101>non_oterritory(a); 
    31023102 
     
    31153115.DO 
    31163116.bC 
    31173117 
    3118 ;!oplay_defend_both(a,?,b,C,D) 
     3118;oplay_defend_both(a,?,b,C,D)!=WIN 
    31193119 
    31203120>non_xterritory(b); 
    31213121 
     
    31723172bX 
    31733173ac 
    31743174 
    3175 ;!xplay_defend_both(a,b,c) && !adjacent_to_defendable_stone_in_atari(b) 
     3175;xplay_defend_both(a,b,c)!=WIN && !adjacent_to_defendable_stone_in_atari(b) 
    31763176;&& !adjacent_to_defendable_stone_in_atari(c) 
    31773177 
    31783178>non_oterritory(a); 
     
    32863286Oab 
    32873287?Xc 
    32883288 
    3289 ;!oplay_defend_both(a,b,a,c) 
     3289;oplay_defend_both(a,b,a,c)!=WIN 
    32903290 
    32913291>non_oterritory(b); 
    32923292>non_oterritory(d); 
     
    33443344bXa 
    33453345cdX 
    33463346 
    3347 ;!safe_omove(a) && !oplay_defend_both(b,a,?,c,b,d) 
     3347;!safe_omove(a) && oplay_defend_both(b,a,?,c,b,d)!=WIN 
    33483348 
    33493349>non_oterritory(c); 
    33503350 
     
    34033403... 
    34043404--- 
    34053405 
    3406 ;oplay_defend_both(a,b,c,D,b) && oplay_attack(a,b,a) 
     3406;oplay_defend_both(a,b,c,D,b)==WIN && oplay_attack(a,b,a) 
    34073407 
    34083408>non_oterritory(e); 
    34093409 
  • patterns/endgame.db

    diff -N -r -u -X .ignore gnugo-copy/patterns/endgame.db gnugo/patterns/endgame.db
    old new  
    547547X* 
    548548-- 
    549549 
    550 ;eye(*) && proper_eye(a) && oplay_defend_both(*,a,*,b) 
     550;eye(*) && proper_eye(a) && oplay_defend_both(*,a,*,b)==WIN 
    551551 
    552552 
    553553Pattern EE303 
  • patterns/helpers.c

    diff -N -r -u -X .ignore gnugo-copy/patterns/helpers.c gnugo/patterns/helpers.c
    old new  
    579579      if (TRYMOVE(cpos, other)) { 
    580580        if (board[bpos] == EMPTY 
    581581            || board[epos] == EMPTY 
    582             || !defend_both(bpos, epos)) 
     582            || defend_both(bpos, epos) != WIN) 
    583583          result = 1; 
    584584        popgo(); 
    585585      } 
     
    639639        if (TRYMOVE(cpos, color)) { 
    640640          if (board[bpos] == EMPTY 
    641641              || board[epos] == EMPTY 
    642               || !defend_both(bpos, epos)) 
     642              || defend_both(bpos, epos) != WIN) 
    643643            result = 1; 
    644644          popgo(); 
    645645        } 
     
    663663  ASSERT1(board[worma] == OTHER_COLOR(color) 
    664664          && board[wormb] == OTHER_COLOR(color), move); 
    665665 
    666   if (!defend_both(worma, wormb)) { 
     666  if (defend_both(worma, wormb) != WIN) { 
    667667    if (0) 
    668668      gprintf("%1m: Reject attack_either_move for %1m, %1m (can't defend both)\n", 
    669669              move, worma, wormb); 
     
    677677          gprintf("%1m: Rej. attack_either_move for %1m & %1m (regular attack)\n", 
    678678                  move, worma, wormb); 
    679679      } 
    680       else if (!defend_both(worma, wormb)) 
     680      else if (defend_both(worma, wormb) != WIN) 
    681681        add_either_move(move, ATTACK_STRING, find_origin(worma), 
    682682                        ATTACK_STRING, find_origin(wormb)); 
    683683      else { 
  • patterns/owl_attackpats.db

    diff -N -r -u -X .ignore gnugo-copy/patterns/owl_attackpats.db gnugo/patterns/owl_attackpats.db
    old new  
    733733.... 
    734734---- 
    735735 
    736 ;!xplay_defend_both(*,b,c,a,b) 
     736;xplay_defend_both(*,b,c,a,b)!=WIN 
    737737 
    738738 
    739739Pattern A218 
     
    881881...x 
    882882---- 
    883883 
    884 ;xplay_attack(*,a,C) || !xplay_defend_both(*,a,b,a,C) 
     884;xplay_attack(*,a,C) || xplay_defend_both(*,a,b,a,C)!=WIN 
    885885 
    886886 
    887887Pattern A227 
     
    12801280Y*.. 
    12811281?..? 
    12821282 
    1283 ; oplay_defend_both(*,a,*,b) && !oplay_attack(*,a,b) 
     1283; oplay_defend_both(*,a,*,b)==WIN && !oplay_attack(*,a,b) 
    12841284 
    12851285 
    12861286Pattern A401a 
     
    12981298Y*.. 
    12991299?..? 
    13001300 
    1301 ; oplay_defend_both(*,a,*,b) 
     1301; oplay_defend_both(*,a,*,b)==WIN 
    13021302 
    13031303 
    13041304Pattern A402 
     
    13321332Aad 
    13331333OYX 
    13341334 
    1335 ; oplay_defend_both(*,a,b,c,A,b) && oplay_defend_both(*,b,a,d,*,A) 
     1335; oplay_defend_both(*,a,b,c,A,b)==WIN && oplay_defend_both(*,b,a,d,*,A)==WIN 
    13361336 
    13371337 
    13381338Pattern A403b 
     
    13511351OYX 
    13521352 
    13531353; owl_escape_value(e)>0 
    1354 ; && oplay_defend_both(*,a,b,c,A,b) && oplay_defend_both(*,b,a,d,*,A) 
     1354; && oplay_defend_both(*,a,b,c,A,b)==WIN && oplay_defend_both(*,b,a,d,*,A)==WIN 
    13551355 
    13561356 
    13571357Pattern A404 
     
    16461646.*Y 
    16471647Abc 
    16481648 
    1649 ;owl_escape_value(A)>0 && oplay_defend_both(*,b,*,c) 
     1649;owl_escape_value(A)>0 && oplay_defend_both(*,b,*,c)==WIN 
    16501650 
    16511651 
    16521652Pattern A416 
     
    17051705.*A 
    17061706 
    17071707;(owl_escape_value(A)>0) 
    1708 ; && oplay_defend_both(*,c,*,d) 
     1708; && oplay_defend_both(*,c,*,d)==WIN 
    17091709 
    17101710 
    17111711Pattern A419b 
     
    17201720.*Y 
    17211721 
    17221722;(owl_escape_value(A)>0) 
    1723 ; && oplay_defend_both(*,c,*,d) 
     1723; && oplay_defend_both(*,c,*,d)==WIN 
    17241724 
    17251725 
    17261726Pattern A420 
     
    17381738bd*. 
    17391739xexx 
    17401740 
    1741 ;owl_escape_value(e)>0 && !xplay_defend_both(*,a,b,c,d) 
     1741;owl_escape_value(e)>0 && xplay_defend_both(*,a,b,c,d)!=WIN 
    17421742 
    17431743 
    17441744Pattern A421 
     
    24762476XA* 
    24772477--- 
    24782478 
    2479 ; oplay_defend_both(*,A,b,*) 
     2479; oplay_defend_both(*,A,b,*)==WIN 
    24802480 
    24812481 
    24822482Pattern A619 
     
    29062906 
    29072907;lib(A) == 3 && !obvious_false_xeye(d) 
    29082908;&& oplay_defend(*,b,c,*) && oplay_defend(*,e,c,*) 
    2909 ;&& oplay_defend_both(*,c,b,d,e,b,e) 
     2909;&& oplay_defend_both(*,c,b,d,e,b,e)==WIN 
    29102910 
    29112911 
    29122912######################################################### 
     
    36963696X*? 
    36973697 
    36983698; owl_escape_value(b)>0 
    3699 ; && oplay_defend_both(*,A,b,c,b) 
    3700 ; && oplay_defend_both(*,A,b,b,*) 
     3699; && oplay_defend_both(*,A,b,c,b)==WIN 
     3700; && oplay_defend_both(*,A,b,b,*)==WIN 
    37013701 
    37023702 
    37033703Pattern A1014 
     
    37273727AfgB 
    37283728 
    37293729; (owl_escape_value(A) > 0 || owl_escape_value(B) > 0) 
    3730 ; && oplay_defend_both(*,g,f,e,f,*) 
     3730; && oplay_defend_both(*,g,f,e,f,*)==WIN 
    37313731 
    37323732 
    37333733Pattern A1015a 
     
    37413741AfgB 
    37423742 
    37433743; (owl_escape_value(A) > 0 || owl_escape_value(B) > 0) 
    3744 ; && oplay_defend_both(*,g,f,e,f,*) 
     3744; && oplay_defend_both(*,g,f,e,f,*)==WIN 
    37453745 
    37463746 
    37473747Pattern A1016 
     
    37603760 
    37613761; (owl_escape_value(A) > 0 || owl_escape_value(B) > 0) 
    37623762; && ((x_somewhere(d) && xplay_attack_either(*,c,c,e)) 
    3763 ;     || (!x_somewhere(d) && !xplay_defend_both(*,c,d,c,e))) 
     3763;     || (!x_somewhere(d) && xplay_defend_both(*,c,d,c,e)!=WIN)) 
    37643764 
    37653765 
    37663766Pattern A1016a 
     
    37793779 
    37803780; (owl_escape_value(A) > 0 || owl_escape_value(B) > 0) 
    37813781; && ((x_somewhere(d) && xplay_attack_either(*,c,c,e)) 
    3782 ;     || (!x_somewhere(d) && !xplay_defend_both(*,c,d,c,e))) 
     3782;     || (!x_somewhere(d) && xplay_defend_both(*,c,d,c,e)!=WIN)) 
    37833783 
    37843784 
    37853785Pattern A1017 
     
    40124012?Y? 
    40134013 
    40144014; vital_chain(A) && vital_chain(B) 
    4015 ; && !xplay_defend_both(*,A,B) 
     4015; && xplay_defend_both(*,A,B)!=WIN 
    40164016 
    40174017 
    40184018Pattern A1102 
     
    40274027c*O 
    40284028?Y? 
    40294029 
    4030 ;!xplay_defend_both(*,a,b,a,c) 
     4030;xplay_defend_both(*,a,b,a,c)!=WIN 
    40314031 
    40324032 
    40334033Pattern A1104 
     
    41024102Yb? 
    41034103 
    41044104; vital_chain(a) && vital_chain(b) 
    4105 ; && !xplay_defend_both(*,a,b) 
     4105; && xplay_defend_both(*,a,b)!=WIN 
    41064106 
    41074107 
    41084108Pattern A1107b 
     
    41224122Yc 
    41234123 
    41244124;lib(c)>2 && vital_chain(b) && vital_chain(c) 
    4125 ;&& oplay_attack(*,a,a) && !xplay_defend_both(a,b,c) 
     4125;&& oplay_attack(*,a,a) && xplay_defend_both(a,b,c)!=WIN 
    41264126 
    41274127# nn Removal candidate (3.3.13) 
    41284128#   Success rate in regressions : 0.9 % (23/2562) 
     
    41424142Yc 
    41434143 
    41444144;lib(c)>2 && vital_chain(b) && vital_chain(c) 
    4145 ;&& oplay_attack(*,a,a) && !xplay_defend_both(a,b,c) 
     4145;&& oplay_attack(*,a,a) && xplay_defend_both(a,b,c)!=WIN 
    41464146 
    41474147 
    41484148Pattern A1108 
     
    42824282*bX 
    42834283xCx 
    42844284 
    4285 ;owl_escape_value(C)>0 && owl_goal_dragon(D) && !xplay_defend_both(*,a,b) 
     4285;owl_escape_value(C)>0 && owl_goal_dragon(D) && xplay_defend_both(*,a,b)!=WIN 
    42864286 
    42874287 
    42884288Pattern A1117 
     
    42964296X*b 
    42974297?aY 
    42984298 
    4299 ;!xplay_defend_both(*,a,b) 
     4299;xplay_defend_both(*,a,b)!=WIN 
    43004300 
    43014301 
    43024302Pattern A1117a 
     
    43104310Y*b 
    43114311?aX 
    43124312 
    4313 ;!xplay_defend_both(*,a,b) 
     4313;xplay_defend_both(*,a,b)!=WIN 
    43144314 
    43154315 
    43164316Pattern A1118 
     
    44544454 
    44554455;(owl_escape_value(c) > 0 
    44564456; || owl_escape_value(b) > 0) 
    4457 ;&& oplay_defend_both(*,d,A,*) 
     4457;&& oplay_defend_both(*,d,A,*)==WIN 
    44584458 
    44594459 
    44604460Pattern A1124a 
     
    44764476;(owl_escape_value(d) > 0 
    44774477; || owl_escape_value(b) > 0 
    44784478; || owl_escape_value(c) > 0) 
    4479 ;&& !oplay_defend_both(e,*,A,e) 
     4479;&& oplay_defend_both(e,*,A,e)!=WIN 
    44804480 
    44814481 
    44824482Pattern A1124b 
     
    49874987?a? 
    49884988B*C 
    49894989 
    4990 ;attack(a) && !oplay_attack(*,a) && !oplay_defend_both(*,B,C) 
     4990;attack(a) && !oplay_attack(*,a) && oplay_defend_both(*,B,C)!=WIN 
    49914991 
    49924992 
    49934993######################################################### 
  • patterns/owl_defendpats.db

    diff -N -r -u -X .ignore gnugo-copy/patterns/owl_defendpats.db gnugo/patterns/owl_defendpats.db
    old new  
    42524252A* 
    42534253OB 
    42544254 
    4255 ;vital_chain(A) && vital_chain(B) && !ko(*) && !oplay_defend_both(*,A,B) 
     4255;vital_chain(A) && vital_chain(B) && !ko(*) && oplay_defend_both(*,A,B)!=WIN 
    42564256 
    42574257 
    42584258Pattern D1100b 
     
    42664266A* 
    42674267OB 
    42684268 
    4269 ;vital_chain(A)>1 && vital_chain(B)>1 && !oplay_defend_both(*,A,B) 
     4269;vital_chain(A)>1 && vital_chain(B)>1 && oplay_defend_both(*,A,B)!=WIN 
    42704270 
    42714271 
    42724272Pattern D1101 
     
    44024402eOODf 
    44034403..... 
    44044404 
    4405 ; !oplay_defend_both(*,f,a,B,C) && oplay_attack(*,D) && !safe_xmove(e) 
     4405; oplay_defend_both(*,f,a,B,C)!=WIN && oplay_attack(*,D) && !safe_xmove(e) 
    44064406 
    44074407 
    44084408Pattern D1108b 
     
    44194419.aaXX 
    44204420..... 
    44214421 
    4422 ;owl_goal_dragon(a) && !oplay_defend_both(*,B,C) 
     4422;owl_goal_dragon(a) && oplay_defend_both(*,B,C)!=WIN 
    44234423 
    44244424 
    44254425Pattern D1109 
     
    47324732OAc 
    47334733B*? 
    47344734 
    4735 ;lib(A)==2 && owl_escape_value(c)>0 && !oplay_defend_both(*,A,B) 
     4735;lib(A)==2 && owl_escape_value(c)>0 && oplay_defend_both(*,A,B)!=WIN 
    47364736 
    47374737 
    47384738Pattern D1125 
     
    49574957aO 
    49584958Ob 
    49594959 
    4960 ; (owl_escape_value(*) > 0) && !oplay_defend_both(*,a,b) 
     4960; (owl_escape_value(*) > 0) && oplay_defend_both(*,a,b)!=WIN 
    49614961 
    49624962 
    49634963Pattern D1140 
     
    51215121*.O 
    51225122Boo 
    51235123 
    5124 ; lib(A)==2 && !oplay_defend_both(*,A,B) 
     5124; lib(A)==2 && oplay_defend_both(*,A,B)!=WIN 
    51255125 
    51265126 
    51275127Pattern D1202 
     
    58355835dab. 
    58365836ofoo 
    58375837 
    5838 ;owl_escape_value(f)>0 && !oplay_defend_both(*,a,b,c,d,a,E) 
     5838;owl_escape_value(f)>0 && oplay_defend_both(*,a,b,c,d,a,E)!=WIN 
    58395839 
    58405840 
    58415841Pattern D1331 
     
    58525852bD*. 
    58535853oeoo 
    58545854 
    5855 ;owl_escape_value(e)>0 && !oplay_defend_both(*,a,b,C,D) 
     5855;owl_escape_value(e)>0 && oplay_defend_both(*,a,b,C,D)!=WIN 
    58565856 
    58575857 
    58585858Pattern D1332 
     
    58875887*BO 
    58885888oco 
    58895889 
    5890 ;owl_escape_value(c)>0 && owl_goal_dragon(d) && !oplay_defend_both(*,A,B) 
     5890;owl_escape_value(c)>0 && owl_goal_dragon(d) && oplay_defend_both(*,A,B)!=WIN 
    58915891 
    58925892 
    58935893Pattern D1333b 
     
    59695969dc*. 
    59705970ofoo 
    59715971 
    5972 ;owl_escape_value(f)>0 && !oplay_defend_both(*,a,b,c,d,c,E) 
     5972;owl_escape_value(f)>0 && oplay_defend_both(*,a,b,c,d,c,E)!=WIN 
    59735973 
    59745974 
    59755975Pattern D1338 
     
    59865986baO. 
    59875987odoo 
    59885988 
    5989 ;owl_escape_value(d)>0 && !oplay_defend_both(*,a,b,a,C) 
     5989;owl_escape_value(d)>0 && oplay_defend_both(*,a,b,a,C)!=WIN 
    59905990 
    59915991 
    59925992Pattern D1339 
     
    67076707 
    67086708; (owl_escape_value(a) > 0 || owl_escape_value(b) > 0) 
    67096709; && ((o_somewhere(d) && oplay_attack_either(*,c,c,E)) 
    6710 ;     || (!o_somewhere(d) && !oplay_defend_both(*,c,d,c,E))) 
     6710;     || (!o_somewhere(d) && oplay_defend_both(*,c,d,c,E)!=WIN)) 
    67116711 
    67126712 
    67136713Pattern D1377 
  • patterns/owl_vital_apats.db

    diff -N -r -u -X .ignore gnugo-copy/patterns/owl_vital_apats.db gnugo/patterns/owl_vital_apats.db
    old new  
    615615.OX 
    616616*XA 
    617617 
    618 ; oplay_defend_both(*,A,*) 
     618; oplay_defend_both(*,A,*)==WIN 
    619619 
    620620 
    621621Pattern VA35 
     
    841841a* 
    842842Xb 
    843843 
    844 ;vital_chain(a) && vital_chain(b) && !ko(*) && !xplay_defend_both(*,a,b) 
     844;vital_chain(a) && vital_chain(b) && !ko(*) && xplay_defend_both(*,a,b)==LOSE 
    845845 
    846846 
    847847Pattern VA47b 
     
    857857a* 
    858858Xb 
    859859 
    860 ;vital_chain(a) && vital_chain(b) && ko(*) && !xplay_defend_both(*,a,b) 
     860;vital_chain(a) && vital_chain(b) && ko(*) && xplay_defend_both(*,a,b)!=WIN 
    861861 
    862862 
    863863Pattern VA48 
  • patterns/patterns.db

    diff -N -r -u -X .ignore gnugo-copy/patterns/patterns.db gnugo/patterns/patterns.db
    old new  
    553553O*d 
    554554?eb 
    555555 
    556 ;oplay_defend_both(*,a,b,*,b) && oplay_defend_both(*,b,a,*,a) 
     556;oplay_defend_both(*,a,b,*,b)==WIN && oplay_defend_both(*,b,a,*,a)==WIN 
    557557 
    558558>add_cut_move(c,d); 
    559559>add_cut_move(c,e); 
     
    716716*a 
    717717.X 
    718718 
    719 ;oplay_defend_both(*,a,*,b) 
     719;oplay_defend_both(*,a,*,b)==WIN 
    720720 
    721721 
    722722Pattern CC44 
     
    889889c*a 
    890890??X 
    891891 
    892 ;alive(c) && oplay_defend_both(*,a,*,b) 
     892;alive(c) && oplay_defend_both(*,a,*,b)==WIN 
    893893 
    894894 
    895895Pattern CC54 
     
    10561056Xab 
    10571057Xcd 
    10581058 
    1059 ;!oplay_attack_either(*,a,b,*,b) && oplay_defend_both(*,b,a,c,a,d) 
     1059;!oplay_attack_either(*,a,b,*,b) && oplay_defend_both(*,b,a,c,a,d)==WIN 
    10601060 
    10611061 
    10621062Pattern CC68 
     
    10731073.Xab 
    10741074..cd 
    10751075 
    1076 ;!oplay_attack_either(*,a,b,*,b) && oplay_defend_both(*,b,a,c,a,d) 
     1076;!oplay_attack_either(*,a,b,*,b) && oplay_defend_both(*,b,a,c,a,d)==WIN 
    10771077 
    10781078 
    10791079Pattern CC69 
     
    10981098aX*E 
    10991099?gcd 
    11001100 
    1101 ;(alive(f) || alive(g)) && !oplay_defend_both(*,a,b,c,d,c,E) 
     1101;(alive(f) || alive(g)) && oplay_defend_both(*,a,b,c,d,c,E)!=WIN 
    11021102 
    11031103 
    11041104Pattern CC71 
     
    11161116aX*E 
    11171117?fcd 
    11181118 
    1119 ;!oplay_defend_both(*,a,b,c,d,c,E) && (dragonsize(f) <= wormsize(E)) 
     1119;oplay_defend_both(*,a,b,c,d,c,E)!=WIN && (dragonsize(f) <= wormsize(E)) 
    11201120 
    11211121 
    11221122Pattern CC72 
     
    13871387----- 
    13881388 
    13891389;odefend_against(*,d) 
    1390 ;&& !oplay_defend_both(*,a,b,a,E) 
     1390;&& oplay_defend_both(*,a,b,a,E)!=WIN 
    13911391;&& oplay_attack_either(*,b,a,c,b,c) 
    13921392 
    13931393 
     
    14751475.... 
    14761476---- 
    14771477 
    1478 ;!xplay_defend_both(*,a,b,a,D) && xplay_attack_either(*,b,a,c,b,c) 
     1478;xplay_defend_both(*,a,b,a,D)!=WIN && xplay_attack_either(*,b,a,c,b,c) 
    14791479 
    14801480 
    14811481Pattern EC8 
     
    17701770cad 
    17711771--- 
    17721772 
    1773 ;!xplay_defend_both(*,a,b,a,e) 
     1773;xplay_defend_both(*,a,b,a,e)!=WIN 
    17741774;&& xplay_attack_either(*,b,a,d,d,b) 
    17751775;&& oplay_attack_either(*,b,b,c) 
    17761776;&& oplay_attack_either(*,a,d,b,b,c) 
     
    21502150----- 
    21512151 
    21522152;oplay_attack_either(*,a,b,c,a,c) && oplay_attack_either(*,d,e,f,d,f) 
    2153 ;&& !oplay_defend_both(*,b,a,d,e,b,d) 
    2154 ;&& !oplay_defend_both(*,e,d,a,b,e,a) 
     2153;&& oplay_defend_both(*,b,a,d,e,b,d)!=WIN 
     2154;&& oplay_defend_both(*,e,d,a,b,e,a)!=WIN 
    21552155 
    21562156 
    21572157Pattern EC58 
     
    21702170..... 
    21712171----- 
    21722172 
    2173 ;!oplay_defend_both(*,b,a,b,I) && oplay_attack_either(*,a,b,c,a,c) 
     2173;oplay_defend_both(*,b,a,b,I)!=WIN && oplay_attack_either(*,a,b,c,a,c) 
    21742174;&& oplay_attack_either(*,b,a,d,e,f,g,h,f,h) 
    2175 ;&& !oplay_defend_both(*,b,a,d,e,g,f,g,I) 
     2175;&& oplay_defend_both(*,b,a,d,e,g,f,g,I)!=WIN 
    21762176 
    21772177 
    21782178Pattern EC59 
     
    22292229.... 
    22302230---- 
    22312231 
    2232 ; oplay_defend_both(*,a,*,b) 
     2232; oplay_defend_both(*,a,*,b)==WIN 
    22332233 
    22342234 
    22352235Pattern EC61 
     
    26322632a*X 
    26332633--- 
    26342634 
    2635 ;(safe_xmove(*) && xplay_defend_both(*,a,*,B)) || xdefend_against(a,*) 
     2635;(safe_xmove(*) && xplay_defend_both(*,a,*,B)==WIN) || xdefend_against(a,*) 
    26362636 
    26372637 
    26382638Pattern EC106 
     
    27042704a*.X 
    27052705---- 
    27062706 
    2707 ;safe_xmove(*) && xplay_defend_both(*,a,*,B) 
     2707;safe_xmove(*) && xplay_defend_both(*,a,*,B)==WIN 
    27082708 
    27092709 
    27102710Pattern EC202 
     
    27192719ac.X 
    27202720---- 
    27212721 
    2722 ;xplay_defend_both(c,a,c,B) 
     2722;xplay_defend_both(c,a,c,B)==WIN 
    27232723 
    27242724 
    27252725Pattern EC203 
     
    53025302Xbd 
    53035303--- 
    53045304 
    5305 ;!oplay_defend_both(b,c,a,b) && !oplay_defend_both(c,b,d,*,c,d) 
     5305;oplay_defend_both(b,c,a,b)!=WIN && oplay_defend_both(c,b,d,*,c,d)!=WIN 
    53065306 
    53075307 
    53085308Pattern EB716 
     
    53185318Xbd 
    53195319--- 
    53205320 
    5321 ;!oplay_defend_both(b,*,a,b) && oplay_defend_both(*,b,d,c,a,d) 
     5321;oplay_defend_both(b,*,a,b)!=WIN && oplay_defend_both(*,b,d,c,a,d)==WIN 
    53225322 
    53235323 
    53245324Pattern EB717 
     
    53535353Xb. 
    53545354--- 
    53555355 
    5356 ;!oplay_defend_both(b,c,a,b) && oplay_defend_both(*,c,a,*) 
     5356;oplay_defend_both(b,c,a,b)!=WIN && oplay_defend_both(*,c,a,*)==WIN 
    53575357 
    53585358 
    53595359Pattern EB719 
     
    53705370Cee* 
    53715371---- 
    53725372 
    5373 ;alive(d) && critical(e) && !oplay_defend_both(*,?,a,B,C) 
     5373;alive(d) && critical(e) && oplay_defend_both(*,?,a,B,C)!=WIN 
    53745374 
    53755375 
    53765376############################################################ 
     
    63376337?a*bo 
    63386338----- 
    63396339 
    6340 ;xmoyo(e) && !oplay_defend_both(*,a,b,?,c,a,D) && !oplay_attack(*,a,b,c,*) 
     6340;xmoyo(e) && oplay_defend_both(*,a,b,?,c,a,D)!=WIN && !oplay_attack(*,a,b,c,*) 
    63416341 
    63426342 
    63436343############# 
     
    77067706 
    77077707; lib(c)>1 
    77087708; && !oplay_attack(*,b) 
    7709 ; && oplay_defend_both(*,A,*,b) 
     7709; && oplay_defend_both(*,A,*,b)==WIN 
    77107710; && (oplay_attack(*,A,e) || !x_alive_somewhere(D,F)) 
    77117711 
    77127712 
     
    96659665..A? 
    96669666---- 
    96679667 
    9668 ;oplay_attack(*,A) && oplay_defend_both(*,c,*,b) 
     9668;oplay_attack(*,A) && oplay_defend_both(*,c,*,b)==WIN 
    96699669 
    96709670 
    96719671Pattern ED23 
     
    1044910449OBa 
    1045010450 
    1045110451;xterri(a) && !attack(B) && !attack(C) && !oplay_attack(*,?,a,a) 
    10452 ;&& !oplay_defend_both(*,?,a,B,C) 
     10452;&& oplay_defend_both(*,?,a,B,C)!=WIN 
    1045310453 
    1045410454 
    1045510455Pattern ED71 
     
    1118511185cEa. 
    1118611186?EO. 
    1118711187 
    11188 ;lib(E)==2 && !oplay_attack(*,c) && !oplay_defend_both(*,a,b,E,D) 
     11188;lib(E)==2 && !oplay_attack(*,c) && oplay_defend_both(*,a,b,E,D)!=WIN 
    1118911189 
    1119011190>test_attack_either_move(D,E); 
    1119111191 
     
    1120711207# dX* 
    1120811208# ?a? 
    1120911209#  
    11210 # ;!oplay_defend_both(*,a,b,c,d,e) 
     11210# ;oplay_defend_both(*,a,b,c,d,e)!=WIN 
    1121111211#  
    1121211212# >antisuji(*); 
    1121311213 
  • patterns/patterns2.db

    diff -N -r -u -X .ignore gnugo-copy/patterns/patterns2.db gnugo/patterns/patterns2.db
    old new  
    9999.OaO 
    100100*dbc 
    101101 
    102 ;oplay_attack_either(*,a,b,c,a,c) && !oplay_defend_both(*,a,b,d,c,a,d) 
     102;oplay_attack_either(*,a,b,c,a,c) && oplay_defend_both(*,a,b,d,c,a,d)!=WIN 
    103103 
    104104 
    105105Pattern Conn105 
     
    280280eaf? 
    281281 
    282282;oplay_attack_either(*,a,b,c,a,c) && oplay_attack_either(*,b,a,e,b,e) 
    283 ;&& oplay_defend_both(*,c,*,f) 
     283;&& oplay_defend_both(*,c,*,f)==WIN 
    284284 
    285285 
    286286Pattern Conn304 
     
    294294Obc* 
    295295Eaf? 
    296296 
    297 ;oplay_attack_either(*,a,b,c,a,c) && !oplay_defend_both(*,b,a,b,E) 
    298 ;&& oplay_defend_both(*,c,*,f) 
     297;oplay_attack_either(*,a,b,c,a,c) && oplay_defend_both(*,b,a,b,E)!=WIN 
     298;&& oplay_defend_both(*,c,*,f)==WIN 
    299299 
    300300 
    301301Pattern Conn305 
     
    321321Obc? 
    322322EaO* 
    323323 
    324 ;oplay_attack_either(*,a,b,c,a,c) && !oplay_defend_both(*,b,a,b,E) 
     324;oplay_attack_either(*,a,b,c,a,c) && oplay_defend_both(*,b,a,b,E)!=WIN 
    325325 
    326326 
    327327Pattern Conn307 
     
    334334ObD? 
    335335caO* 
    336336 
    337 ;!oplay_defend_both(*,a,b,a,D) && oplay_attack_either(*,b,a,c,b,c) 
     337;oplay_defend_both(*,a,b,a,D)!=WIN && oplay_attack_either(*,b,a,c,b,c) 
    338338 
    339339 
    340340Pattern Conn308 
     
    360360Oa* 
    361361EbO 
    362362 
    363 ;!oplay_defend_both(*,a,b,a,E) 
     363;oplay_defend_both(*,a,b,a,E)!=WIN 
    364364 
    365365 
    366366Pattern Conn310 
     
    444444O*B 
    445445.AO 
    446446 
    447 ;!oplay_defend_both(*,A,B) 
     447;oplay_defend_both(*,A,B)!=WIN 
    448448 
    449449 
    450450############################################## 
     
    539539OacO 
    540540*bde 
    541541 
    542 ;oplay_attack_either(*,a,b,c,d,e,c,e) && !oplay_defend_both(*,a,b,d,c,a,d) 
     542;oplay_attack_either(*,a,b,c,d,e,c,e) && oplay_defend_both(*,a,b,d,c,a,d)!=WIN 
    543543;&& oplay_attack(*,b,a,c,c) 
    544544 
    545545 
     
    583583ODbO 
    584584*Oac 
    585585 
    586 ;!oplay_defend_both(*,a,b,a,D) && !oplay_defend_both(*,b,a,c,b,c) 
     586;oplay_defend_both(*,a,b,a,D)!=WIN && oplay_defend_both(*,b,a,c,b,c)!=WIN 
    587587 
    588588 
    589589Pattern Conn507 
     
    687687O*ac 
    688688?DbO 
    689689 
    690 ;!oplay_defend_both(*,a,b,a,D) && oplay_attack_either(*,b,a,c,b,c) 
     690;oplay_defend_both(*,a,b,a,D)!=WIN && oplay_attack_either(*,b,a,c,b,c) 
    691691 
    692692 
    693693Pattern Conn602 
     
    700700Obde 
    701701*acO 
    702702 
    703 ;oplay_attack_either(*,a,b,c,d,e,c,e) && !oplay_defend_both(*,a,b,d,c,a,d) 
     703;oplay_attack_either(*,a,b,c,d,e,c,e) && oplay_defend_both(*,a,b,d,c,a,d)!=WIN 
    704704;&& oplay_attack(*,b,a,c,c) 
    705705 
    706706 
     
    745745Ocb. 
    746746d*ae 
    747747 
    748 ;!oplay_break_through(*,a,b,*,b,e) && !oplay_defend_both(*,c,d,a,b,c,a) 
     748;!oplay_break_through(*,a,b,*,b,e) && oplay_defend_both(*,c,d,a,b,c,a)!=WIN 
    749749 
    750750 
    751751Pattern Conn605 
     
    885885ObC? 
    886886Oa*O 
    887887 
    888 ;!oplay_defend_both(*,a,b,a,C) 
     888;oplay_defend_both(*,a,b,a,C)!=WIN 
    889889 
    890890 
    891891Pattern Conn703 
     
    915915OcaO 
    916916 
    917917# This condition is not necessary but should be sufficient. 
    918 ;oplay_attack(*,e,b,e)  && !oplay_defend_both(*,b,a,c,d,b,c) 
    919 ;&& !oplay_defend_both(*,d,c,a,b,d,a) 
     918;oplay_attack(*,e,b,e)  && oplay_defend_both(*,b,a,c,d,b,c)!=WIN 
     919;&& oplay_defend_both(*,d,c,a,b,d,a)!=WIN 
    920920 
    921921 
    922922Pattern Conn705 
     
    930930OcaO 
    931931 
    932932# This condition is not necessary but should be sufficient. 
    933 ;!oplay_defend_both(*,b,a,c,d,b,c) 
    934 ;&& !oplay_defend_both(*,d,c,a,b,d,a) 
     933;oplay_defend_both(*,b,a,c,d,b,c)!=WIN 
     934;&& oplay_defend_both(*,d,c,a,b,d,a)!=WIN 
    935935 
    936936 
    937937Pattern Conn706 
     
    979979O*ac 
    980980ODbO 
    981981 
    982 ;!oplay_defend_both(*,a,b,a,D) && oplay_attack_either(*,b,a,c,b,c) 
     982;oplay_defend_both(*,a,b,a,D)!=WIN && oplay_attack_either(*,b,a,c,b,c) 
    983983 
    984984 
    985985########################### 
     
    10991099Dab 
    11001100?*C 
    11011101 
    1102 ;!oplay_defend_both(*,a,b,C,D) && !oplay_connect(*,C,D) 
     1102;oplay_defend_both(*,a,b,C,D)!=WIN && !oplay_connect(*,C,D) 
    11031103 
    11041104 
    11051105####################################### 
     
    19031903ba* 
    19041904?X? 
    19051905 
    1906 ;(!attack(b) || defend(b)) && !oplay_defend_both(*,a,*,b) 
     1906;(!attack(b) || defend(b)) && oplay_defend_both(*,a,*,b)!=WIN 
    19071907 
    19081908 
    19091909Pattern Shape30 
     
    24902490*... 
    24912491---- 
    24922492 
    2493 ;!oplay_defend_both(*,a,b,c) 
     2493;oplay_defend_both(*,a,b,c)!=WIN 
    24942494 
    24952495 
    24962496Pattern Shape73 
     
    26732673daX 
    26742674.cb 
    26752675 
    2676 ;!oplay_defend_both(*,c,a,b) && oplay_attack(d,c,c) 
     2676;oplay_defend_both(*,c,a,b)!=WIN && oplay_attack(d,c,c) 
    26772677 
    26782678 
    26792679Pattern Shape84 
     
    31103110fg* 
    31113111 
    31123112;lib(a)>1 && o_alive_somewhere(e,f,g) && !attack(B) && !attack(C) 
    3113 ;&& !oplay_defend_both(*,?,d,B,C) 
     3113;&& oplay_defend_both(*,?,d,B,C)!=WIN 
    31143114 
    31153115 
    31163116Pattern Sente16 
     
    31283128a*X 
    31293129--- 
    31303130 
    3131 ;xplay_attack(*,a,b,*) && xplay_defend_both(*,a,b,*,b) 
     3131;xplay_attack(*,a,b,*) && xplay_defend_both(*,a,b,*,b)==WIN 
    31323132 
    31333133 
    31343134Pattern Sente17 
     
    31443144a*bX 
    31453145---- 
    31463146 
    3147 ;alive(d) && !xplay_defend_both(*,a,b,?,c,a,d) 
     3147;alive(d) && xplay_defend_both(*,a,b,?,c,a,d)!=WIN 
    31483148 
    31493149 
    31503150Pattern Sente18 
     
    33073307*a 
    33083308bX 
    33093309 
    3310 ;!xplay_defend_both(*,a,b) 
     3310;xplay_defend_both(*,a,b)!=WIN 
    33113311 
    33123312>add_defend_both_move(a,b); 
    33133313 
     
    33223322*ca 
    33233323?bX 
    33243324 
    3325 ;!xplay_defend_both(c,a,b) 
    3326 ;&& (oplay_attack(*,c,c) || oplay_defend_both(*,c,a,b)) 
     3325;xplay_defend_both(c,a,b)!=WIN 
     3326;&& (oplay_attack(*,c,c) || oplay_defend_both(*,c,a,b)==WIN) 
    33273327 
    33283328>add_defend_both_move(a,b); 
    33293329 
     
    33413341Dba 
    33423342 
    33433343;oplay_attack(*,D) && oplay_attack_either(*,a,D,E) 
    3344 ;&& !oplay_defend_both(*,b,c,D,E) 
     3344;&& oplay_defend_both(*,b,c,D,E)!=WIN 
    33453345 
    33463346>test_attack_either_move(D,E) 
    33473347 
     
    33603360db* 
    33613361 
    33623362;xplay_attack(a,d) && xplay_attack_either(a,*,d,e) 
    3363 ;&& !xplay_defend_both(a,b,c,d,e) && !xplay_defend_both(a,c,b,d,e) 
     3363;&& xplay_defend_both(a,b,c,d,e)!=WIN && xplay_defend_both(a,c,b,d,e)!=WIN 
    33643364;&& !xplay_connect(a,d,e) && oplay_connect(*,a,d,e) 
    33653365 
    33663366>add_defend_both_move(d,e); 
     
    34303430ca. 
    34313431Xb* 
    34323432 
    3433 ;safe_xmove(a) && !xplay_defend_both(a,b,c) && oplay_defend_both(*,a,b,c) 
     3433;safe_xmove(a) && xplay_defend_both(a,b,c)!=WIN && oplay_defend_both(*,a,b,c)==WIN 
    34343434 
    34353435>add_defend_both_move(b,c); 
    34363436 
     
    34623462ca* 
    34633463Xb. 
    34643464 
    3465 ;safe_xmove(a) && !xplay_defend_both(a,b,c) && oplay_defend_both(*,a,b,c) 
     3465;safe_xmove(a) && xplay_defend_both(a,b,c)!=WIN && oplay_defend_both(*,a,b,c)==WIN 
    34663466 
    34673467>add_defend_both_move(b,c); 
    34683468 
     
    34783478?Xc 
    34793479 
    34803480;(alive(b) || alive(c)) 
    3481 ;&& safe_xmove(a)==WIN && !xplay_defend_both(a,b,c) && oplay_attack(*,a,a)==WIN 
     3481;&& safe_xmove(a)==WIN && xplay_defend_both(a,b,c)!=WIN && oplay_attack(*,a,a)==WIN 
    34823482 
    34833483>add_defend_both_move(b,c); 
    34843484 
     
    35183518--- 
    35193519 
    35203520;lib(A)==3 && !oplay_attack(*,E) && oplay_attack(*,d,A) 
    3521 ;&& !oplay_defend_both(*,c,d,A,B) 
     3521;&& oplay_defend_both(*,c,d,A,B)!=WIN 
    35223522 
    35233523>test_attack_either_move(A,B) 
    35243524 
     
    35413541--- 
    35423542 
    35433543;lib(a)==3 && !attack(e) && xplay_attack(*,d,a) 
    3544 ;&& !xplay_defend_both(*,c,d,a,b) 
     3544;&& xplay_defend_both(*,c,d,a,b)!=WIN 
    35453545 
    35463546>add_defend_both_move(a,b) 
    35473547