- small_semeai() and small_semeai_analyzer() removed Index: engine/liberty.h =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v retrieving revision 1.188 diff -u -r1.188 liberty.h --- engine/liberty.h 18 Jul 2003 18:59:21 -0000 1.188 +++ engine/liberty.h 1 Aug 2003 13:19:47 -0000 @@ -557,7 +557,6 @@ void fuseki(int color); void semeai(int color); void new_semeai(void); -void small_semeai(int save_verbose); void semeai_move_reasons(int color); void shapes(int color); void endgame(int color); Index: engine/semeai.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/semeai.c,v retrieving revision 1.57 diff -u -r1.57 semeai.c --- engine/semeai.c 18 Jul 2003 18:59:21 -0000 1.57 +++ engine/semeai.c 1 Aug 2003 13:19:49 -0000 @@ -34,7 +34,6 @@ int my_dragon, int your_dragon, int my_status, int your_status, int margin_of_safety); -static void small_semeai_analyzer(int str1, int str2, int save_verbose); static void update_status(int dr, int new_status, int new_safety); @@ -803,82 +802,6 @@ add_semeai_move(move, your_dragon); else if (margin_of_safety == 1) add_semeai_threat(move, your_dragon); -} - - -/* small_semeai() addresses a deficiency in the reading code: - * for reasons of speed, savestone3 and savestone4 do not - * sufficiently check whether there may be an adjoining string - * which can be attacked. So they may overlook a defensive - * move which consists of attacking an adjoining string. - * - * small_semeai() generates all pairs of adjacent attackable - * worms, then calls owl_analyze_semeai in tactical (non-owl) - * mode to find out what really happens. - */ - -void -small_semeai(int save_verbose) -{ - int apos, bpos; - - /* Generate all adjacent pairs of attackable worms */ - - for (apos = BOARDMIN; apos < BOARDMAX; apos++) { - - if (!ON_BOARD(apos) || board[apos] == EMPTY) - continue; - if (worm[apos].origin != apos) - continue; - if (worm[apos].attack_codes[0] == 0) - continue; - - for (bpos = BOARDMIN; bpos < BOARDMAX; bpos++) { - if (!ON_BOARD(bpos) || board[bpos] == EMPTY) - continue; - if (worm[bpos].origin != bpos) - continue; - if (bpos == apos) - continue; - if (worm[bpos].attack_codes[0] == 0) - continue; - if (!adjacent_strings(apos, bpos)) - continue; - if (worm[apos].liberties < 3 && worm[bpos].liberties < 3) - continue; - if (save_verbose && apos < bpos) - gprintf("small semeai found at %1m, %1m\n", apos, bpos); - small_semeai_analyzer(apos, bpos, save_verbose); - } - } -} - -/* Helper function for small_semeai. Tries to resolve the - * semeai between (apos) and (bpos), possibly revising points - * of attack and defense. - * - */ - -static void -small_semeai_analyzer(int apos, int bpos, int save_verbose) -{ - int move; - int resulta, resultb; - int dummy; - - /* FIXME: Not ko aware yet (since owl_analyze_semeai isn't). - * Should be more careful if there is already a defense point. - */ - - owl_analyze_semeai(apos, bpos, &resulta, &resultb, &move, 0, &dummy); - if (resulta != 0 - && worm[apos].defense_codes[0] == 0 - && move != NO_MOVE) { - if (save_verbose) - gprintf("small semeai: changing defense of %1m to %1m\n", - apos, move); - change_defense(apos, move, WIN); - } } Index: engine/worm.c =================================================================== RCS file: /cvsroot/gnugo/gnugo/engine/worm.c,v retrieving revision 1.55 diff -u -r1.55 worm.c --- engine/worm.c 18 Jul 2003 18:59:21 -0000 1.55 +++ engine/worm.c 1 Aug 2003 13:19:50 -0000 @@ -237,12 +237,6 @@ } gg_assert(stackp == 0); - /* We try first to resolve small semeais. */ -#if 0 - small_semeai(save_verbose); -#endif - gg_assert(stackp == 0); - /* Now we try to improve the values of worm.attack and worm.defend. * If we find that capturing the string at str also defends the * string at str2, or attacks it, then we add points of attack and