[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: |
Trevor Morris |
Subject: |
Re: [gnugo-devel] trevor_1_23.4.tar.gz |
Date: |
Fri, 01 Feb 2002 11:35:53 -0500 |
At 05:19 PM 2/1/2002 +0100, Gunnar Farneback wrote:
>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.
Yes, I seem to have gotten wrapped around the ! & ^ logic. Sorry
for the bogosity.
>
>> +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.
OK, I'll take a look at mark_string - thanks for the pointer.
>
>> Pattern RA007
>>
>> X* snapback
>> X.
>>
>> :-,A,value(75)
>
>The symmetry is wrong.
right.
>
>>
>> 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.?
Yes, thanks.