[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] trevor_1_23.4.tar.gz
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] trevor_1_23.4.tar.gz |
Date: |
Fri, 01 Feb 2002 17:19:46 +0100 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode) |
Trevor wrote:
> http://www.public32.com/games/go/trevor_1_23.4.tar.gz
What is this part of the patch about?
> @@ -874,7 +878,8 @@
> * This is the case if
> * 1. There is no neighboring empty intersection.
> * 2. There is no neighboring opponent string with exactly one liberty.
> - * 3. There is no neighboring friendly string with more than one liberty.
> + * 3. Thers is a neighboring friendly string with more than one liberty.
> + *
> */
> int
> is_suicide(int pos, int color)
The full context is this documentation comment:
/*
* is_suicide(pos, color) determines whether the move (color) at
* (pos) would be a suicide.
*
* This is the case if
* 1. There is no neighboring empty intersection.
* 2. There is no neighboring opponent string with exactly one liberty.
* 3. There is no neighboring friendly string with more than one liberty.
*/
I'm quite certain that this formulation is correct without the patch.
> +static void
> +set_goal_worm(int str, int value, char goal[BOARDMAX]) {
> + int k;
> + int color = board[str];
> + if (goal[str]) { return; }
> + goal[str] = value;
> + for (k=0;k<4;k++) {
> + int pos = str+delta[k];
> + if (board[pos] == color) {
> + set_goal_worm(pos, value, goal);
> + }
> + }
> +}
This function should be possible to replace with mark_string() from
board.c. Although they do differ subtly, I think
set_larger_goal_worm() can use mark_string() after minor
modifications.
> Pattern RA007
>
> X* snapback
> X.
>
> :-,A,value(75)
The symmetry is wrong.
>
> aA snapback
> ab
>
> ; rgoal[a] == 1
> ; && NORTH(A) != color
> ; && SOUTH(A) != color
> ; && EAST(A) != color
> ; && WEST(A) != color
> ; && olib(A) == 1 && xlib(b)==1
Why this complex constraint? Wouldn't it be more straightforward and
efficient to modify the pattern to the one below?
?x?
X*x
X.?
/Gunnar
- Re: [gnugo-devel] trevor_1_23.4.tar.gz,
Gunnar Farneback <=