bug-gnubg
[Top][All Lists]

## Re: [Bug-gnubg] evaluation bug?

 From: Joern Thyssen Subject: Re: [Bug-gnubg] evaluation bug? Date: Tue, 26 Nov 2002 10:17:49 +0000 User-agent: Mutt/1.4i

```On Mon, Nov 25, 2002 at 11:40:47PM -0500, Paul Selick wrote
> Hi,
>
> Concerning evaluation of positions which may be too good for a double,
> I think there is an evaluation bug.
>
> I have noticed some early game positions (where the probably of
> backgammon is very small) receiving evaluations greater than 2
> (which would be somewhere between gammon and backgammon)
> For example, with no Jacoby rule, after
> 42: 8/4 6/4           36: 24/15
> 33: 13/10*(2) 8/5(2)  55:
> a 2-ply search gives the Equity as being over 1.4 and as far as I can
> tell, looking at the source code and outputting some of the values, many
> of the Equities that were being averaged to produce this figure were
> over 2.
> For example, I printed the values in the last of these calculations:
> They included at line 5498 of eval.c values of:
> rW=1.819175
> arOutput[0]=0.821732
> rTG=0.652716
>   working out to a value greater than 2 for rEq
>   I don't understand exactly what this formula
>        rEq = rW +
>           ( rW - 1.0 ) * ( arOutput[ 0 ] - 1.0 ) / ( rTG - 1.0 ) ;
> is supposed to be doing, but it looks at a glance it looks to me as
> if the second term is supposed to be subtracted rather than added to rW.
> That is, my guess was that the formula was trying to take the value rW
> for a win and find the equity by deleting something for the losses, whose
> probably must be represented by 1.0-arOutput[0]
>   But since 2 of the 3 factors in the second term are negative, the
> result gets added to rW, which looks wrong to me.

Hmm, since arOutput[0] > rTG we're to good. We use interpolation between
(rTG,+1) and (1.0,rW)

y= y1 + ( y0 - y1 ) / ( x0 - x1 ) * ( x - x1 )

or

rEq = rW + ( 1 - rW ) / ( rTG - 1 ) * ( p - 1.0 )

So you're right there is a sign error....

Good catch!

I'll check in a fix tonight.

Jørn

--
Joern Thyssen, PhD
Vendsysselgade 3, 3., DK-9000 Aalborg, Denmark
+45 9813 2791 (private) / +45 2818 0183 (mobile) / +45 9633 7036 (work)
Note: new mobile number!

```