[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] quasi-random dice for the Initial Position
From: |
Jim Segrave |
Subject: |
Re: [Bug-gnubg] quasi-random dice for the Initial Position |
Date: |
Mon, 7 Jul 2003 08:50:39 +0200 |
User-agent: |
Mutt/1.2.5.1i |
On Mon 07 Jul 2003 (02:40 +0200), Robert-Jan Veldhuizen wrote:
> At 02:13 7/7/2003 +0200, you wrote:
> >From: "Robert-Jan Veldhuizen" <address@hidden>
> >Sent: Monday, July 07, 2003 2:14 AM
> > > Hi there, I also posted this on GOL.
> > >
> > > I've understood from Jim Segrave that quasi-random dice just discards
> > > doubles for the opening rolls, effectively rotating 30 rolls.
> >
> >Jim said RAIP (Roll Out as Initial Position) only use 30 rolls (all rolls
> >except the doubles).
>
>
> Well, not exactly, he wrote earlier:
>
> "it always works on sets of 36 and simply discards (in effect re-rolls)
> doubles if it's the first roll of a game."
>
> And that's exactly what makes me doubt that f.i. 30*36 trials would produce
> a perfect two roll rotation.
>
> >Quasi-Random and RAIP are not related.
>
> I'm not sure what you exactly mean by this, but my question is really:
> shouldn't these be related to produce the same perfect rotation for 30*36
> trials with the opening roll, as for 36*36 trials without it? Just
> discarding rolls as you go won't give an optimal result, I'd think.
A better description would be:
Before the first game of a rollout, gnubg creates a psuedo random
array which it will use for all the games in the rollout. In effect it
has already decided the roll sequence it will use for up to 128 rolls
in every game of the rollout. In other words, for a normal rollout
where games don't go over 64 moves, every single game of every
possible rollout length has already had its dice sequence
determined. During the rollout of game n, sequence n will be used, for
game n+1 sequence n+1, etc. If it's a RAIP, then whenever the current
sequence starts with a double, the sequence is skipped and the dice
routine moves on to the next sequence. Say an RAIP is about to start using
sequence 275, but that sequence begins with a double. The dice routine
moves to sequence 276. On the following game, it will use sequence 277
(it remembers how many it has already skipped).
So, if you select RAIP and 36 games, then you will get a prefect set
of rolls for games 1..30 and the first 6 rolls of the next perfect set
(the same rolls you would have gotton for games 31..36 if you'd asked
for 1080 games or 10800 games or 92 games or whatever.
The dice sequence doesn't know how man trials it will be asked for, it
simply generates sequences such that every 30/36 games you get all
possible 1st rolls, every 1080/1296 games get every possible first 2
rolls, every 38880/46656 games you get full sets of 3 rolls, etc.
--
Jim Segrave address@hidden