bug-gnubg
[Top][All Lists]
Advanced

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

Re: Bug in rollout ?


From: Øystein Schønning-Johansen
Subject: Re: Bug in rollout ?
Date: Wed, 23 Sep 2020 20:36:01 +0200

Yes, Theo, I think you might be right. I actually turned on game logging and re-ran the rollout. I noticed that GNU Backgammon really plays the bearin really really bad. Look at the attached games:

I just picked some games at random, and these two games really show awful playing. Can anyone explain what is going on?

-Øystein

On Wed, Sep 23, 2020 at 6:51 PM Theodore Hwa <hwatheod@cs.stanford.edu> wrote:
2% seems more like the correct number. I think the first rollout is the
wrong one.

A naive analysis: X looks virtually certain to get a piece off within 5
rolls, which means that O has to win in 4 rolls for a gammon.  Since O has
13 pieces left, this means O has to roll doubles in 3 of the next 4 rolls,
which is about 4*(1/6)^3 ~ 1.85%.

Ted

On Wed, 23 Sep 2020, Øystein Schønning-Johansen wrote:

> Hi all!
> I'm trying to rollout a position as cubeless moneygame. I think I see a bug in GNU Backgammon. So
> here is my position:
>
>  GNU Backgammon  Position ID: 960BAMCw+0MAAA
>                  Match ID   : cAkAAAAAAAAA
>  +13-14-15-16-17-18------19-20-21-22-23-24-+     O: gnubg
>  |                  |   |    O  O  O  O  O | O   0 points
>  |                  |   |    O     O  O  O | O  
>  |                  |   |             O  O |    
>  |                  |   |             O    |    
>  |                  |   |             O    |    
> v|                  |BAR|                  |     (Cube: 1)
>  |                7 |   |                  |    
>  |                X |   |                  |    
>  |                X |   | X                |    
>  |                X |   | X  X           X |     On roll
>  |    X           X |   | X  X           X |     0 points
>  +12-11-10--9--8--7-------6--5--4--3--2--1-+     X: oystein
>
> I strongly believe that this is a pretty simple position to play and I think that X (on roll) will
> lose about 15% gammon. It should not be hard to roll this out.
>
> I generate this command file:
>
> [oystein@jupiter gnubg_cubeless_rollout_bug]$ cat rollout.cmd
> set rng mersenne
> new match 0
> set turn 1
> set board 960BAMCw+0MAAA
> set rollout trials 1296
> set rollout cubeful off
> set rollout initial false
> set rollout quasirandom on
> set rollout truncation enable off
> set rollout bearofftruncation exact off
> set rollout bearofftruncation onesided off
> set rollout cubedecision plies 0
> set rollout cubedecision cubeful off
> set rollout cubedecision prune off
> set rollout cubedecision noise 0
> set rollout chequerplay plies 0
> set rollout chequerplay cubeful off
> set rollout chequerplay prune off
> set rollout chequerplay noise 0
> show rollout
> show board
>
> rollout
>
> I can then start this rollout with the command file as input.
>
> [oystein@jupiter gnubg_cubeless_rollout_bug]$ gnubg -t < rollout.cmd 
>
> And the result becomes:
>
> Rollout done. Printing final results.
>
> Current Position:
>   0.000096 0.000000 0.000000 - 0.999904 0.147699 0.000000 CL -1.147507
>  [0.000008 0.000000 0.000000 - 0.000008 0.007830 0.000000 CL  0.007830] 1r
> Full cubeless rollout with variance reduction
> 1296 games, Mersenne Twister dice gen. with seed 642205659 and quasi-random dice
> Play: 0-ply cubeful
> Cube: 0-ply cubeful
> Time elapsed 2s Estimated time left 0s
> Estimated SE for "Current Position" after 1296 trials  0.007830
>
> As seen, the rollout says 14.77% gammons. I can believe that! But now comes the funny thing. Try the
> same thing but with checkerplay 2-ply. That mean changing one line in the command file to read:
>
> set rollout chequerplay plies 2
>
> And then run again. The new result is then:
>
> Rollout done. Printing final results.
>
> Current Position:
>   0.000098 0.000000 0.000000 - 0.999902 0.027877 0.000000 CL -1.027681
>  [0.000005 0.000000 0.000000 - 0.000005 0.011880 0.000000 CL  0.011726] 1r
> Full cubeless rollout with variance reduction
> 1296 games, Mersenne Twister dice gen. with seed 642390699 and quasi-random dice
> Play:  2-ply cubeless
> keep the first 0 0-ply moves and up to 5 more moves within equity 0.08
> Skip pruning for 1-ply moves.
> Cube: 0-ply cubeful
> Time elapsed 1m21s Estimated time left 0s
> Estimated SE for "Current Position" after 1296 trials  0.011726
>
> As seen here, the gammon losses are now only 2.79%. I do not believe this result at all! Also look at
> the standard deviation of this value. Could it be that the number is wrong due to a missing
> initialisation or something?
>
> Please help me investigate.
>
> -Øystein
>
>

Attachment: logfile-0001140-a.sgf
Description: application/go-sgf

Attachment: logfile-0000137-a.sgf
Description: application/go-sgf


reply via email to

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