| |
BGonline.org Forums
4-ply RO — Tips on Trial Counts
Posted By: Daniel Murphy In Response To: 4-ply RO — Tips on Trial Counts (Taper_Mike)
Date: Tuesday, 6 November 2012, at 5:17 p.m.
In the world of GnuBg, where dice are rotated through the second (and, I believe, even the third) roll, [roll[ing] to a complete multiple of 1296] does [have an advantage].
I'd question the size, if any, of the advantage of rolling out Gnubg rollouts to exact multiples of 1296 trials because of roll rotation. I note also that the supposed disadvantage of 2nd turn roll rotation not being implemented in XG was questioned in the March 2012 discussion Mike linked to, and Xavier said it believed the effect of that nonimplementation is "infinitesimal."
XG rotates the first roll only, and everyone seems satisfied with the accuracy of XG rollout results. Gnubg "rotates" and "stratifies" the 1st, 2nd and 3rd rolls. From the GNU Backgammon Manual, with some emphasis added:
Quasi-Random Dice are used to reduce the element of luck in rollouts. Instead of selecting purely random dice, GNU Backgammon will ensure a uniform distribution of the first roll of the rollout. If 36 trials are requested, one game will start with 11, two games with 21, two games with 31, etc. In general, if n * 36 games is requested, n games will start with 11, 2*n games with 21 etc. This is called rotation of the first roll. Similarly, if n*1296 trials is requested, the second roll will be rotated, such that n games will start with 11-11, n games with 11-21, n games with 21-21, etc. The third roll be also be rotated if the number of trials is proportional to 46656.Suppose a user stops a 1296 trial rollout after 36 games. The 36 games would have had the following rolls for the first two rolls of each game: 11-11, 21-11, 12-11, 31-11, 13-11, ..., 66-11 Obviously such a rollout will give skewed results since the second roll was 11 for all games! To avoid this problem GNU Backgammon will randomize the sequence of rolls such that it is guaranteed that for any sample of 36 games you have exactly one game with first roll 11, exactly one game with second roll 11, etc. This is called stratification.GNU Backgammon will actually also rotate and stratify rollouts where the number of trials are not multiples of 36, 1296, etc. The distribution of rolls is obviously not uniform any longer in this case, but it will still provide some reduction of the luck, i.e., no 37 trial rollout will have 3 games with a initial 66.Before the first game of a rollout, GNU Backgammon creates a pseudo 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..The dice sequence doesn't know how many trials it will be asked for, it simply generates sequences such that for a normal rollout (rollout as initial position) every 36 (30) games you get all possible 1st rolls, every 1296 (1080) games get every possible first 2 rolls, every 46656 (38880) games you get full sets of 3 rolls, etc.As I understand it, then, with Gnubg rollouts that are not exact multiples of 36 or 1296 or 46656 trials, Gnubg "stratifies" rolls so that the distribution of rolls still approaches perfect distribution.
On top of that, Gnubg (on 1-ply and higher) uses variance reduction (as does XG), which reduces the impact of particularly favorable or unfavorable sequences of rolls, if any. Again from the manual:
Variance reduction: when using lookahead evaluations, it can reduce errors by making use of the equity difference from one ply to the next. (This can be interpreted as either canceling out the estimated luck (i.e. the difference in equity evaluations before and after rolling) or using subsequent evaluations to estimate the error in prior ones; the two views are equivalent).That doesn't say much, and much has been written about variance reduction, so interested persons can certainly read up on variance reduction, or accept that "it works."
As I understand it, then, a 3*1296 = 3,888 trial rollout should be better than, say, a 3,800 trial rollout, simply because it's longer, but a 3,888 trial rollout is not going to be appreciably better than a 3,976 trial rollout just because 3,888 is an exact multiple of 1,296.
| |
BGonline.org Forums is maintained by Stick with WebBBS 5.12.