- old amalgamation (!experimental_connections) code and patterns removed - dragon_eye() removed - basic_cut_helper() and ugly_cutstone_helper() removed Index: engine/dragon.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/dragon.c,v retrieving revision 1.118 diff -u -r1.118 dragon.c --- engine/dragon.c 18 Jul 2003 18:59:21 -0000 1.118 +++ engine/dragon.c 1 Aug 2003 10:47:52 -0000 @@ -64,7 +64,6 @@ int eye_color, struct eye_data *eye, char *mx, char *me, int *halfeyes); static int compute_crude_status(int pos); -static void dragon_eye(int pos, struct eye_data[BOARDMAX]); static int compute_escape(int pos, int dragon_status_known); static void compute_surrounding_moyo_sizes(const struct influence_data *q); @@ -117,29 +116,6 @@ find_connections(); time_report(2, " time to find connections", NO_MOVE, 1.0); - if (!experimental_connections) { - /* Amalgamate dragons sharing an eyespace (not ko). */ - - for (str = BOARDMIN; str < BOARDMAX; str++) - if (ON_BOARD(str)) { - - if (black_eye[str].color == BLACK_BORDER - && black_eye[str].origin == str) { - if (!is_ko_point(str) - || black_eye[str].esize > 1) /* Only exclude living kos. */ - dragon_eye(str, black_eye); - } - - if (white_eye[str].color == WHITE_BORDER - && white_eye[str].origin == str) { - if (!is_ko_point(str) - || white_eye[str].esize > 1) /* Only exclude living kos. */ - dragon_eye(str, white_eye); - } - } - time_report(2, " time to amalgamate dragons", NO_MOVE, 1.0); - } - /* At this time, all dragons have been finalized and we can * initialize the dragon2[] array. After that we can no longer allow * amalgamation of dragons. @@ -1564,61 +1540,6 @@ } - -/* - * dragon_eye(pos, eye_data) is invoked with (pos) the origin of an - * eyespace. It unites all the worms adjacent to non-marginal points - * of the eyespace into a single dragon.. In addition to marginal eye - * space points, amalgamation is inhibited for points with the - * INHIBIT_CONNECTION type set. - * - * This is based on the older function dragon_ring. - */ - -static void -dragon_eye(int pos, struct eye_data eye[BOARDMAX]) -{ - int ii; - int dr = NO_MOVE; - int color; - int k; - - /* don't amalgamate across ikken tobi */ - if (eye[pos].esize == 3 && eye[pos].msize > 1) - return; - - DEBUG(DEBUG_DRAGONS, "amalgamate dragons around %1m\n", pos); - if (eye[pos].color == BLACK_BORDER) - color = BLACK; - else { - ASSERT1(eye[pos].color == WHITE_BORDER, pos); - color = WHITE; - } - - for (ii = BOARDMIN; ii < BOARDMAX; ii++) { - if (!ON_BOARD(ii)) - continue; - - if (eye[ii].origin == pos - && !eye[ii].marginal - && !(eye[ii].type & INHIBIT_CONNECTION)) { - for (k = 0; k < 4; k++) { - int d = delta[k]; - - if (board[ii+d] == color) { - if (dr == NO_MOVE) - dr = dragon[ii+d].origin; - else if (dragon[ii+d].origin != dr) { - join_dragons(ii+d, dr); - dr = dragon[ii+d].origin; - } - } - } - } - } -} - - /* * join_dragons amalgamates the dragon at (d1) to the * dragon at (d2). @@ -2003,89 +1924,56 @@ int pos; int d; - if (!experimental_connections) { - int mx[MAX_MOYOS + 1]; - struct moyo_data moyos; - - influence_get_moyo_segmentation(q, &moyos); + int k; + int moyo_color[BOARDMAX]; + float territory_value[BOARDMAX]; + float moyo_sizes[BOARDMAX]; + float moyo_values[BOARDMAX]; + + influence_get_moyo_data(q, moyo_color, territory_value); - memset(mx, 0, sizeof(mx)); - for (d = 0; d < number_of_dragons; d++) { - int this_moyo_size = 0; - float this_moyo_value = 0.0; - for (pos = BOARDMIN; pos < BOARDMAX; pos++) { - int moyo_number = moyos.segmentation[pos]; - if (board[pos] != DRAGON(d).color - || moyo_number == 0 - || dragon[pos].id != d - || moyos.owner[moyo_number] != board[pos]) - continue; - - if (mx[moyo_number] != d + 1) { - mx[moyo_number] = d + 1; - this_moyo_size += moyos.size[moyo_number]; - this_moyo_value += moyos.territorial_value[moyo_number]; - } - } - - if (this_moyo_size < dragon2[d].moyo_size) { - dragon2[d].moyo_size = this_moyo_size; - dragon2[d].moyo_territorial_value = this_moyo_value; - } - } + for (pos = BOARDMIN; pos < BOARDMAX; pos++) { + moyo_sizes[pos] = 0.0; + moyo_values[pos] = 0.0; } - else { - int k; - int moyo_color[BOARDMAX]; - float territory_value[BOARDMAX]; - float moyo_sizes[BOARDMAX]; - float moyo_values[BOARDMAX]; + + for (pos = BOARDMIN; pos < BOARDMAX; pos++) { + if (!ON_BOARD(pos)) + continue; - influence_get_moyo_data(q, moyo_color, territory_value); - - for (pos = BOARDMIN; pos < BOARDMAX; pos++) { - moyo_sizes[pos] = 0.0; - moyo_values[pos] = 0.0; - } + if (moyo_color[pos] == board[pos]) + continue; - for (pos = BOARDMIN; pos < BOARDMAX; pos++) { - if (!ON_BOARD(pos)) - continue; - - if (moyo_color[pos] == board[pos]) - continue; - - if (moyo_color[pos] == WHITE) { - for (k = 0; k < number_close_white_worms[pos]; k++) { - int w = close_white_worms[pos][k]; - int dr = dragon[w].origin; - - moyo_sizes[dr] += 1.0 / number_close_white_worms[pos]; - moyo_values[dr] += (gg_min(territory_value[pos], 1.0) - / number_close_white_worms[pos]); - } - } - - if (moyo_color[pos] == BLACK) { - for (k = 0; k < number_close_black_worms[pos]; k++) { - int w = close_black_worms[pos][k]; - int dr = dragon[w].origin; - - moyo_sizes[dr] += 1.0 / number_close_black_worms[pos]; - moyo_values[dr] += (gg_min(territory_value[pos], 1.0) - / number_close_black_worms[pos]); - } + if (moyo_color[pos] == WHITE) { + for (k = 0; k < number_close_white_worms[pos]; k++) { + int w = close_white_worms[pos][k]; + int dr = dragon[w].origin; + + moyo_sizes[dr] += 1.0 / number_close_white_worms[pos]; + moyo_values[dr] += (gg_min(territory_value[pos], 1.0) + / number_close_white_worms[pos]); } } - - for (d = 0; d < number_of_dragons; d++) { - int this_moyo_size = (int) moyo_sizes[dragon2[d].origin]; - float this_moyo_value = moyo_values[dragon2[d].origin]; - - if (this_moyo_size < dragon2[d].moyo_size) { - dragon2[d].moyo_size = this_moyo_size; - dragon2[d].moyo_territorial_value = this_moyo_value; + + if (moyo_color[pos] == BLACK) { + for (k = 0; k < number_close_black_worms[pos]; k++) { + int w = close_black_worms[pos][k]; + int dr = dragon[w].origin; + + moyo_sizes[dr] += 1.0 / number_close_black_worms[pos]; + moyo_values[dr] += (gg_min(territory_value[pos], 1.0) + / number_close_black_worms[pos]); } + } + } + + for (d = 0; d < number_of_dragons; d++) { + int this_moyo_size = (int) moyo_sizes[dragon2[d].origin]; + float this_moyo_value = moyo_values[dragon2[d].origin]; + + if (this_moyo_size < dragon2[d].moyo_size) { + dragon2[d].moyo_size = this_moyo_size; + dragon2[d].moyo_territorial_value = this_moyo_value; } } } Index: engine/optics.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/optics.c,v retrieving revision 1.79 diff -u -r1.79 optics.c --- engine/optics.c 18 Jul 2003 18:59:21 -0000 1.79 +++ engine/optics.c 1 Aug 2003 10:47:52 -0000 @@ -576,10 +576,6 @@ if (eye[pos].marginal) (*msize)++; - if (!experimental_connections) - if (eye[pos].type & INHIBIT_CONNECTION) - return; - for (k = 0; k < 4; k++) { int pos2 = pos + delta[k]; if (ON_BOARD(pos2) Index: engine/shapes.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/shapes.c,v retrieving revision 1.47 diff -u -r1.47 shapes.c --- engine/shapes.c 18 Jul 2003 18:59:21 -0000 1.47 +++ engine/shapes.c 1 Aug 2003 10:47:52 -0000 @@ -186,15 +186,11 @@ } /* if we need to loop over the elements */ /* Nothing to connect. Remove C class bit. */ - if (my_ndragons < 2 && !experimental_connections) - class &= ~CLASS_C; - if (my_nstrings < 2 && experimental_connections) + if (my_nstrings < 2) class &= ~CLASS_C; /* Nothing to cut. Remove B class bit. */ - if (your_ndragons < 2 && !experimental_connections) - class &= ~CLASS_B; - if (your_nstrings < 2 && experimental_connections) + if (your_nstrings < 2) class &= ~CLASS_B; /* @@ -292,17 +288,8 @@ } } - /* Pattern class C, connect all combinations of our dragons. */ - if ((class & CLASS_C) && !experimental_connections) { - for (k = 0; k < my_ndragons; k++) - for (l = k+1; l < my_ndragons; l++) { - add_connection_move(move, my_dragons[k], my_dragons[l]); - TRACE("...connects dragons %1m, %1m\n", my_dragons[k], my_dragons[l]); - } - } - /* Pattern class C, try to connect all combinations of our strings. */ - if ((class & CLASS_C) && experimental_connections) { + if (class & CLASS_C) { for (k = 0; k < my_nstrings; k++) for (l = k+1; l < my_nstrings; l++) { if (disconnect(my_strings[k], my_strings[l], NULL) Index: patterns/conn.db =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/conn.db,v retrieving revision 1.38 diff -u -r1.38 conn.db --- patterns/conn.db 18 Jul 2003 18:59:22 -0000 1.38 +++ patterns/conn.db 1 Aug 2003 10:47:52 -0000 @@ -46,8 +46,6 @@ # Additionally there are a few acceptance modifiers. # # s - Accept even if the pattern includes tactically unsafe strings -# W - Only used with standard connections. -# Y - Only used with experimental connections. # ################################### # @@ -80,402 +78,6 @@ callback_data X! -Pattern EB1 - -?XO -O*! ---- - -:8,BW - - -Pattern EB2 - -?XO -O*! -.!. ---- - -:8,BW - - -Pattern EB3 -# second line clamp - -x.!? -XO*! -x.!? ----- - -:8,BW - - -Pattern EB4 -# db split (3.3.6) - -X.O? -.*!x -..!! ----- - -:8,BW - - -Pattern EB4a -# db split (3.3.6) -# do not inhibit a potential connection - -X.Ox -.*.O -..!! ----- - -:8,BW - - -Pattern EB5 - -OXO -!*! -.!. ---- - -:|,BW - - -Pattern EB6 - -?XO -O*! -.!. -.!. ---- - -:8,BW - -?XO -O*! -cab -.!. ---- - -;!xplay_attack(*,a,b,b) || !xplay_attack(*,a,c,c) - - -Pattern EB7 - -Xx? -O*O -.!. -.!. ---- - -:8,BW - -Xx? -c*O -ba. -.!. ---- - -;xplay_attack(*,a,c) && !xplay_attack(*,b,a,a) - - -Pattern EB8 - -?O? -X*! -O!. ---- - -:8,BW - - -Pattern EB9 - -?X? -XOX -O*O -.!. ---- - -:8,BW - -?X? -XOX -a*b -.!. ---- - -;xplay_attack(*,a) || xplay_attack(*,b) - - -Pattern EB10 - -O.X -!*O -.!. ---- - -:8,BW - -OaX -!*b -.!. ---- - -;xplay_attack(*,a,b) - - -Pattern EB11 - -?XX? -O*O. -!!!. -.!.. ----- - -:8,BW - -?XX? -O*Oc -!ab. -.!.. ----- - -;xplay_attack_either(*,a,b,c,a,c) - - -Pattern EB12 - -??X? -O.*O -.!!. -..!. ----- - -:8,BW - -??X? -Oc*O -.ba. -..!. ----- - -;xplay_attack(*,a,b,c,a) - - -Pattern EB13 - -?X? -O*O -o!o ---- - -:|,BW - -?X? -b*c -oao ---- - -;xplay_attack_either(*,a,b,c) - - -Pattern EB14 - -??X? -O.*O -.!!. -.!!. -..!. ----- - -:8,BW - -??X? -Oc*O -.bad -.!ef -..!. ----- - -;!xplay_attack_either(*,a,b,c,d,e,f,*,f) - - -Pattern EB15 - -?OX? -.!*O -..!O ----- - -:8,BW - - -Pattern EB16 - -??X? -O.*O -..!o ----- - -:8,BW - -??X? -Oc*O -.bao ----- - -;xplay_attack_either(*,a,b,c,a,c) - - -Pattern EB17 - -?X? -OXO -!*! -!!! -.!. ---- - -:8,BW - - -Pattern EB18 - -X.O -O*! -.!. ---- - -:8,BW - -XaO -d*b -.c. ---- - -;xplay_attack_either(*,a,a,d) -;&& (xplay_attack(*,b,d) || xplay_attack_either(*,b,c,a,a,d)) - - -Pattern EB19 - -X!O -O*. ---- - -:8,BW - -XaO -b*. ---- - -;xplay_attack_either(*,a,a,b) - - -Pattern EB20 - -?X?? -OX.? -!*!O -!!!? -.!.? ----- - -:8,BW - - -Pattern EB21 - -??X? -.O*O -.!!! -..!. ----- - -:8,BW - -??X? -.D*O -.!!! -..!. ----- - -; lib(D)==3 - - -Pattern EB22 - -??X? -?XOX -.O*O -.!!! -..!. ----- - -:8,BW - -??X? -?XOX -.D*O -.!!! -..!. ----- - -; lib(D)==3 - - -Pattern EB23 - -O.X -!*. -.!O ---- - -:8,BW - - -Pattern EB24 -# gf Revised pattern. (3.1.22) - -??X -?!. -.*O -.!o ---- - -:8,BW - -??X -?!. -.*a -.!o ---- - -;!xplay_defend(*,a) - - -Pattern EB25 -# tm New Pattern (3.1.22) - -O!. cutable keima on edge -.*O -.!. ---- - -:8,BW - -ca. -b*d -.!. ---- - -; xplay_attack_either(*,a,c,d) -; && xplay_attack_either(*,b,c,d) - - ########################## # # B patterns in the center @@ -485,28 +87,13 @@ callback_data X! -Pattern CB1 - -?O. fragile double connection -X*O -?O. - -:8,BW - -?Oa -X*O -?Ob - -;!xplay_attack_either(*,a,b,*,b) && !xplay_attack_either(*,b,a,*,a) - - Pattern CB1b ?O. fragile double connection X*O ?O. -:8,BY +:8,B ?b. X*O @@ -515,23 +102,6 @@ ;!xplay_connect(*,a,b) -Pattern CB2 - -?O. -?.. fragile double connection -X*O -?O. - -:8,BW - -?O. -?ca -X*O -?Ob - -;!xplay_attack_either(*,a,b,*,b) && xplay_defend_both(*,b,a,c,*,a) - - Pattern CB2b ?O. @@ -539,7 +109,7 @@ X*O ?O. -:8,BY +:8,B ?b. ?.. @@ -549,28 +119,13 @@ ;!xplay_connect(*,a,b) -Pattern CB3 - -O!O -!*X -.O? - -:8,BW - -O!a -!*X -.b? - -;lib(a)==2 || lib(b) == 2 - - Pattern CB3b O!O .*X .O? -:8,BY +:8,B O!a .*X @@ -579,48 +134,6 @@ ;!xplay_connect(*,a,b) -Pattern CB4 - -XO? -O*! -?!? - -:\,BW,basic_cut_helper - - -Pattern CB5 -# This pattern is needed to inhibit connection in a position like -# -# .XO.. -# .XOXX -# OO.OX -# .XOOX -# .XXXX -# - -XO -O* - -:\,BW,basic_cut_helper - - -Pattern CB6 -# This pattern is an ugly way to ensure that the X stone is at least -# regarded as a potential cutting stone. The helper returns 0 so the -# pattern does not fire as a B pattern. With an improved connectivity -# analysis, this pattern should no longer be needed. - -XO -O* - -:\,BW,ugly_cutstone_helper - -AO -O* - -;attack(A) && safe_xmove(*) - - Pattern CB7 # This pattern is used to find potential cutting stones as defined by # the field cutstone2 in the worm data. The helper returns 0 so the @@ -637,65 +150,6 @@ ;attack(A) -Pattern CB8 - -?O? -.*X -.!O -xOo - -:8,BW - - -Pattern CB9 - -X.O -O*. -O!. -?XX - -:8,BW - -BaO -O*. -O!. -?XX - -;xplay_defend_both(*,a,*,B) - - -Pattern CB10 - -o!X -O*O -X!o - -:8,BW - -oaB -O*O -Cdo - -;xplay_defend_both(*,a,*,B) && xplay_defend_both(*,d,*,C) - - -Pattern CB11 - -?OX? -O!OX -?*!O -??O? - -:8,BW - -?OA? -OaOB -?*bO -??O? - -;!attack(A) && !attack(B) && !xplay_attack(*,a,b,*) && !xplay_attack(*,b,a,*) - - Pattern CB11b ?OX? @@ -703,7 +157,7 @@ ?*!O ??O? -:8,BY +:8,B ?bX? O!OX @@ -713,95 +167,6 @@ ;!xplay_connect(*,a,b) -Pattern CB12 -# tm New pattern. (3.1.13) -# db modified (3.3.6) - -?xx another way to cut! -O*. -X!O - -:8,BW - -?xx -O*. -BaO - -;xplay_defend_both(*,a,*,B) - - -Pattern CB12a -# db added (3.3.6) - -.!O another way to cut! -O*. -X!O - -:8,BW - -baO -O*. -X!O - -;xplay_defend_both(*,a,b,*,b) - - -Pattern CB13 -# tm New pattern (3.1.18) - -xxx cut! -.!. -O*O -Xxx - -:8,BW - -xxx -dae -O*O -Fbx - -; xplay_defend_both(*,a,b,d,e) -; && xplay_defend_both(*,a,b,e,d) -; && xplay_defend_both(*,b,a,a,F) - - -Pattern CB14 -# tm New Pattern (3.1.23) (see arend:32) -# FIXME: only one of these points should be marginal -# is it safe to use amalgamate_most_valuable helper here? How? - -XO*O double cut. -O!O! - -:8,XBW - -XA*O -ObOc - -; xplay_attack(*,A) && !xplay_attack_either(*,b,c,c,*) - - -Pattern CB15 -# tm New Pattern (3.1.23) (see global:17, ) -# careful not to break trevord:730 -# FIXME: Need to use amalgamate_most_valuable helper. -# xplay_disconnect helper also might be useful here. - -?*? save cutting stone. -OXO -!O! - -:8,BW - -?*? -OXO -aOb - -; !xplay_attack_either(*,b,a,*,a) -; && !xplay_attack_either(*,a,b,*,b) - - Pattern CB15b # tm New Pattern (3.1.23) (see global:17, ) # careful not to break trevord:730 @@ -812,7 +177,7 @@ OXO !O! -:8,BY +:8,B ?*? aXb @@ -829,7 +194,7 @@ XO O! -:8,BY +:8,B ?a x* @@ -845,7 +210,7 @@ !*? fragile double connection O?? -:\,BY +:\,B O!a !*? @@ -861,7 +226,7 @@ OXO ?O* -:8,BY +:8,B ?X? XbX @@ -871,38 +236,6 @@ ;xplay_attack(*,A)1 && (xplay_attack(a,b,c,d,e,e) || xplay_attack(a,b,c,e,d,d)) -;&& !xplay_attack(a,b,f) && !xplay_attack(a,b,g) - - ########################### # # CC31x - keima connections # ########################### -Pattern CC311 -# tm modified (3.1.20) -# FIXME: Should dragons be connectable via ko? -# see trevord:260 - -O.. -..O - -:8,CW - -Ebc -daF - -;lib(E)>2 && lib(F)>2 -;&& xplay_attack_either(a,b,c,a,c)==WIN -;&& xplay_attack_either(b,a,d,b,d)==WIN - - -Pattern CC312 - -.O -.. -O. -oO - -:8,CW - -dO -ab -Oc -oO - -;(xplay_attack(a,b,c,a) || xplay_attack(a,b,c,c)) -;&& (xplay_attack(b,a,d,b) || xplay_attack(b,a,d,d)) -;&& !xcut(c) - - -Pattern CC313 -# tm modified (3.1.20) -# FIXME: Should dragons be connectable via ko? -# see trevord:260 - -O.. -..O -... - -:8,CW - -Obc -daf -.e. - -;xplay_attack_either(a,b,c,a,c) == WIN -;&& (xplay_attack_either(b,a,d,b,d) == WIN || !xplay_break_through(b,d,a,e,d,e,f)) - - #################################### # # CC32x - two space jump connections # #################################### -Pattern CC321 - -O..O -O..O - -:+,CW - -OadO -ObcO - -;!xplay_defend_both(a,b,c,d,a,c) && !xplay_defend_both(b,a,d,c,b,d) - - -Pattern CC322 - -O..O -O... - -:8,CW - -OacO -Obde - -;xplay_attack_either(a,b,c,d,e,c,e) && !xplay_defend_both(a,b,d,c,a,d) -;&& xplay_attack(b,a,c,c) - - -Pattern CC323 - -O..O -O... - -:8,CW - -Oadf -Obce - -;!xplay_defend_both(a,b,c,d,a,c) && xplay_attack_either(a,b,d,c,e,d,e) -;&& (!xplay_defend(d,c,b,a,d) -; || (xplay_attack(d,c,b,a,e,d) && xplay_attack(d,c,b,a,e,b) -; && xplay_attack(a,c,b,a,e,e))) -;&& xplay_defend_both(d,c,e,c,f) - - ############################ # # CC33x - ogeima connections @@ -1535,7 +534,7 @@ xO O. -:\,sCY +:\,sC xO Oc @@ -1549,7 +548,7 @@ XO O. -:\,sCY +:\,sC Xb ac @@ -1563,7 +562,7 @@ .O O. -:\,sCY +:\,sC db ac @@ -1578,7 +577,7 @@ . O -:+,CY +:+,C c a @@ -1592,7 +591,7 @@ XO O. -:\,CY +:\,C Xb ca @@ -1605,7 +604,7 @@ XO OX -:X,CY +:X,C Bc dA @@ -1620,7 +619,7 @@ . O -:+,CY +:+,C c a @@ -1637,7 +636,7 @@ .. O. -:8,CY +:8,C c. Eo @@ -1653,7 +652,7 @@ .. xO -:O,CY +:O,C cx ab @@ -1668,7 +667,7 @@ .X xO -:8,CY +:8,C b? aX @@ -1684,7 +683,7 @@ .. xO -:O,CY +:O,C ex ab @@ -1694,30 +693,13 @@ ;!xcut(a) && !xcut(b) && !xcut(c) && !xcut(d) && !oplay_disconnect(e,f) -# Pattern CC510 -# -# O? -# .x -# .X -# ?O -# -# :8,CY -# -# c? -# ax -# bX -# ?d -# -# ;!xcut(a) && !xcut(b) && !oplay_disconnect(c,d) - - Pattern CC511 # Connect even if stones not tactically safe. .O O. -:\,sCY +:\,sC db ac Index: patterns/connections.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/connections.c,v retrieving revision 1.36 diff -u -r1.36 connections.c --- patterns/connections.c 18 Jul 2003 18:59:22 -0000 1.36 +++ patterns/connections.c 1 Aug 2003 10:47:52 -0000 @@ -44,14 +44,6 @@ int other = OTHER_COLOR(color); UNUSED(data); - /* Only match W patterns with standard connections. */ - if ((pattern->class & CLASS_W) && experimental_connections) - return; - - /* Only match Y patterns with experimental connections. */ - if ((pattern->class & CLASS_Y) && !experimental_connections) - return; - move = AFFINE_TRANSFORM(pattern->move_offset, ll, anchor); if ((pattern->class & CLASS_B) && !safe_move(move, other)) @@ -62,23 +54,6 @@ */ if (pattern->class & CLASS_C) { - if (!experimental_connections) { - for (k = 0; k < pattern->patlen; ++k) { /* match each point */ - /* transform pattern real coordinate */ - int pos = AFFINE_TRANSFORM(pattern->patn[k].offset, ll, anchor); - if (board[pos]==EMPTY - && ((color == WHITE - && (white_eye[pos].type & INHIBIT_CONNECTION)) - || (color == BLACK - && (black_eye[pos].type & INHIBIT_CONNECTION)))) { - DEBUG(DEBUG_DRAGONS, - "Connection pattern of type %s inhibited at %1m\n", - pattern->name, pos); - return; - } - } - } - /* If C pattern, test if there are more than one dragon in this * pattern so that there is something to connect, before doing any * expensive reading. Index: patterns/helpers.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/helpers.c,v retrieving revision 1.53 diff -u -r1.53 helpers.c --- patterns/helpers.c 18 Jul 2003 18:59:22 -0000 1.53 +++ patterns/helpers.c 1 Aug 2003 10:47:53 -0000 @@ -41,60 +41,6 @@ -/* - * - * XO cb - * O* a* - * - * Check whether a cut is feasible and effective. - * - */ - -int -basic_cut_helper(ARGS) -{ - int apos, bpos, cpos; - int acolor, ccolor; - UNUSED(pattern); - - apos = OFFSET_BY(0, -1); /* O to west */ - bpos = OFFSET_BY(-1, 0); /* O to north */ - cpos = OFFSET_BY(-1, -1); /* X to northwest */ - - acolor = board[apos]; - ccolor = OTHER_COLOR(acolor); - - ASSERT1(board[apos] != EMPTY, apos); - ASSERT1(board[bpos] == acolor, bpos); - ASSERT1(board[cpos] == ccolor, cpos); - - /* If c is a ko stone, assume that we would lose the ko. */ - if (worm[cpos].attack_codes[0] != 0 - && (ccolor == color - || is_ko_point(cpos))) - return 0; - if (is_ko_point(move)) - return 0; - - if (TRYMOVE(move, ccolor)) { - if ((attack(move, NULL) == WIN) - || (attack(cpos, NULL) == WIN)) { - popgo(); - return 0; - } - popgo(); - } - else - return 0; - - if (safe_move(move, acolor) == 0) - return 0; - - /* Cut ok. */ - return 1; -} - - /* Jump out into nothingness. To avoid jumping into our own territory, * we use the "area" measure. Also we never ever jump into our own * established eyespace. @@ -253,28 +199,6 @@ return 0; return 1; -} - - -/* - * - * XO aO - * O* O* - * - * Used in a connection pattern to ensure that X is a cutstone. - */ - -int -ugly_cutstone_helper(ARGS) -{ - int apos; - UNUSED(pattern); - UNUSED(color); - - apos = OFFSET_BY(-1, -1); - - worm[apos].cutstone++; - return 0; } Index: patterns/patterns.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/patterns/patterns.h,v retrieving revision 1.57 diff -u -r1.57 patterns.h --- patterns/patterns.h 18 Jul 2003 18:59:22 -0000 1.57 +++ patterns/patterns.h 1 Aug 2003 10:47:55 -0000 @@ -275,13 +275,11 @@ #define DECLARE(x) int x(struct pattern *pattern, int transformation, int move, int color) -DECLARE(basic_cut_helper); DECLARE(jump_out_helper); DECLARE(jump_out_far_helper); DECLARE(high_handicap_helper); DECLARE(reinforce_helper); DECLARE(throw_in_atari_helper); -DECLARE(ugly_cutstone_helper); DECLARE(cutstone2_helper); DECLARE(thrash_around_helper);