gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] new version of escape patch posted


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] new version of escape patch posted
Date: Fri, 03 Sep 2004 02:53:34 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

Arend wrote:
> ...and linked on patches.html. I am now running this on KGS (TheGNUGo)
> to get more a better impression.

How is the current breakage looking?

Some random comments to the patch:

> +/* Returns true if the empty vertex respectively the string at pos1 is
> + * adjacent to the empty vertex respectively the string at pos2.
> + */
> +int are_neighbors(int pos1, int pos2)
> +{
> +  if (board[pos1] == EMPTY) {
> +    if (board[pos2] == EMPTY)
> +      return (gg_abs(pos1 - pos2) == NS || gg_abs(pos1 - pos2) == WE);
> +    else
> +      return neighbor_of_string(pos1, pos2);
> +  }
> +  else {
> +    if (board[pos2] == EMPTY)
> +      return neighbor_of_string(pos2, pos1);
> +    else
> +      return adjacent_strings(pos1, pos2);
> +  }
> +}

I think you should break out auxiliary pieces like this from the patch
and apply them right away.

>  #endif  /* _LIBERTY_H_ */
>  
> +float owl_escape;
> +float escape_coeff;
> +float escape_exp;
> +float max_escape_route;
> +float escape_default_attenuation;
> +

I hope this is a temporary placement. It doesn't make sense to have
them outside the #ifndef.

> Index: engine/printutils.c
> ===================================================================
> [...]
> +/* Adds square marks for each goal intersecion in the current sgf_dumptree.
> + * This function cannot be in sgf/ as it has to understand the 1-D board.
> + */
> +void
> +mark_goal_in_sgf(char goal[BOARDMAX])
> +{
> +  int pos;
> +  SGFNode *node;
> +
> +  if (!sgf_dumptree)
> +    return;
> +  node = sgftreeNodeCheck(sgf_dumptree);
> +
> +  for (pos = BOARDMIN; pos < BOARDMAX; pos++)
> +    if (ON_BOARD(pos) && goal[pos])
> +      sgfSquare(node, I(pos), J(pos));
> +}

I think this function should go into engine/sgffile.c. Btw, isn't it
already in CVS?

> -ladder_capturable(int pos, int color)
> +ladder_capturable(int pos, int color, int result_to_beat)
> [...]
> -    if (liberties == 1 && attack(pos, NULL) == WIN)
> +    if (liberties == 1 && attack(pos, NULL) >= result_to_beat)

I associate "beat" with strict inequality, i.e. that merely reaching
the same result would not be good enough. Maybe some native speaker
could comment and (if needed) suggest a better name for the parameter.

> --- regression/9x9.tst        23 Apr 2004 16:11:43 -0000      1.8
> +++ regression/9x9.tst        2 Sep 2004 15:19:00 -0000
> @@ -1,6 +1,7 @@
> +# Added E3. /ab
>  loadsgf games/nngs/whitemouse-gnugo-3.5.2-200312052122.sgf 4
>  10 reg_genmove black
> -#? [E5|E6]
> +#? [E5|E6|E3]

Agreed.

> --- regression/owl.tst        23 Apr 2004 16:11:58 -0000      1.87
> +++ regression/owl.tst        2 Sep 2004 15:19:00 -0000
> @@ -307,7 +307,7 @@ loadsgf games/incident114.sgf 82
>  # M5 is clearly inferior, as is L5. 
>  loadsgf games/incident291.sgf 86
>  79 owl_defend K4
> -#? [1 (M6|L6)]
> +#? [1 (M6|L6|L7)]

Looks okay.

>  # See also strategy2:100.
>  loadsgf games/strategy26.sgf 257
>  254 owl_defend O13
> -#? [1 (M16|O14|N16|N17)]
> +#? [1 (M16|O14|N16|N17|N13)]

I'm pretty sure that N13 doesn't suffice to make life for the O13
stones. Maybe a case where you need to make sure that the original
stones remain in the goal dragon after a split?

/Gunnar




reply via email to

[Prev in Thread] Current Thread [Next in Thread]