gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] connections reevaluated


From: Gunnar Farneback
Subject: Re: [gnugo-devel] connections reevaluated
Date: Mon, 18 Nov 2002 17:06:49 +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)

Arend wrote:
>  float
> -strategic_effective_size(int pos)
> +strategic_effective_size(float effective_size)
>  {
> -  float eff = dragon[pos].effective_size;
> -  return ((15.0 * eff) / (15.0 + eff));
> +  return ((15.0 * effective_size) / (15.0 + effective_size));
>  }

This function looks more general than its name implies. Seems better
to introduce a function

float
soft_cap(float a, float b)
{
  return (a * b) / (a + b);
}

and then use

soft_cap(dragon[bb].effective_size, 15.0)

instead of

strategic_effective_size(dragon[bb].effective_size)

which is kind of repetitive. Feel free to replace soft_cap with
some better name.

> --- engine/value_moves.c      20 Oct 2002 10:40:45 -0000      1.65
> +++ engine/value_moves.c      16 Nov 2002 00:01:09 -0000
> @@ -1,4 +1,4 @@
> -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
> +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ 
> \hline
>   * This is GNU GO, a Go program. Contact address@hidden, or see       *
>   * http://www.gnu.org/software/gnugo/ for more information.          *
>   *                                                                   *

Huh?

/Gunnar




reply via email to

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