bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] SGF Double Analysis Format


From: Guido Flohr
Subject: Re: [Bug-gnubg] SGF Double Analysis Format
Date: Wed, 22 Aug 2012 16:19:59 +0200

On Tue, 2012-08-21 at 20:25 -0400, Ryan McKinnon wrote:
> Cube analysis
> 2-ply cubeless equity  +0.243 (Money:  +0.246)
>   0.573 0.222 0.024 - 0.427 0.140 0.006
> Cubeful equities:
> 1. No double            +0.349
> 2. Double, pass         +1.000  ( +0.651)
> 3. Double, take         +0.219  ( -0.130)
> Proper cube action: No double, take (16.6%)
> 
> (see image here:
> http://img689.imageshack.us/img689/2342/doubleaction.png)
> 
> And the corresponding section in the sgf file, when a double was
> mistakenly offered:
> 
> ;B[double]DA[E ver 3 2C 1 0.000000 1 0.572881 0.222155 0.024300
> 0.139598 0.006174 0.243145 0.527005 0.572881 0.222155 0.024300
> 0.139598 0.006174 0.243145 0.516940]BM[2]

I think I understood it now.  Finally. ;)

Click the MWC button under the cube analysis and things should become
obvious.  You will see match winning probabilities of 51.6940 %
(0.516940) for double and take, and 52.7005 % (0.527005) for no double.

When you display equities instead of match winning changes, these values
get converted by the function mwc2eq().  An example:

In a match with a centered cube at 7-away/6-away the leader doubles.
The analysis data looks like this:

;B[double]
 DA[E ver 3 3C 1 0.000000 1 
    0.697536 0.295444 0.006992 0.073738 0.003115 0.661274 0.615284
    0.697536 0.295444 0.006992 0.073738 0.003115 0.661274 0.631003]

The interesting values for the cube analysis are the rightmost ones.
The match winning chances are presented as this:

    1. Double, pass    62.67 %
    2. Double, take    63.10 %    0.43 %
    3. No double       61.53 %   -1.14 %
    
The values for double, take and no double come directly from the
analysis data saved in the SGF file.  The value for double, pass comes
from the match equity table.  I used Rockwell-Kazaross here.  We are
currently at 7-away/6-away.  If the trailer drops we are at
7-away/5-away, and we lookup 62.6658 (ca. 62.67) from the MET.

When you display equities instead of MWC, the probabilities have to be
transformed.  For that, you first lookup the match winning probabilities
for either opponent winning the game at the current cube value.  If
black wins we are at 7-away/5-away, if black loses we are at
6-away/6-away.  Therefore, black's match winning chance after winning
the game will be

    p_win = 0.626658

We know that value already from the lookup above and this is no
coincidence.

If black loses we are at 6-away/6-away, and the trivial value for the
match winning probability is

    p_lose = 0.500000

This is now transformed to an equity:

    eq = (2 * mwc - (p_win + p_lose)) / (p_win - p_lose)

Let's feed the values from above into the formula.  For double, take
(0.631003 or 63.1003 %) we get an equity of +1.06860995752340949643.
For double, drop (0.615284) we get an equity of +0.82039823777416349539,
and for double, pass (0.626658) we get - surprise, surprise - an equity
of exactly 1.0, which is no wonder but only a proof of correctness.

Correct me if I'm wrong, but I think that the corresponding code in
GNUBG - which is more complicated - is rather a creative way of applying
rounding errors to already computed values.

Guido
-- 
Империя ООД                         | Imperia OOD
ул. „Княз-Борис-I“ № 86, София 1000 | ul. "Knyaz-Boris-I" № 86, Sofia
http://www.imperia.bg/




reply via email to

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