3BV of a billion exp boards

Want to calculate something or share your results?
Post Reply
qqwref
Posts: 125
Joined: Thu Sep 23, 2010 4:17 pm

3BV of a billion exp boards

Post by qqwref »

Over the past few days, I ran a version of zinicalc to generate a billion random Expert boards (using Mersenne Twister, so no board cycles) and store the 3BV of each. The distribution of the common boards is fairly well known - you can get a good graph of the whole distribution, and some fairly accurate numbers, with much fewer boards. I did so many boards because I was interested in the distribution of the rarest boards. I did not modify the boards to account for the location of the initial click, and I did not discard 3BV<100 boards as most clones would.

For the low boards:
- A board of 3BV<120 occurs about 1.402 boards per thousand, or 1.392 if you discard easy boards.
- A board of 3BV<115 occurs about 487 boards per million, or 477 if you discard easy boards.
- A board of 3BV<110 occurs about 151.5 boards per million, or 141.5 if you discard easy boards.
- A board of 3BV<105 occurs about 41.4 boards per million, or 31.4 if you discard easy boards.
- A board of 3BV<100 occurs about 10.0 boards per million.
- A board of 3BV<95 occurs about 2.14 boards per million.
- A board of 3BV<90 occurs about 400 boards per billion.
- A board of 3BV<85 occurs about 55 boards per billion.
- A board of 3BV<80 occurs about 10 boards per billion.

And for the high (note these are pretty much unaffected by discarding easy boards):
- A board of 3BV>230 occurs about 2.743 boards per thousand.
- A board of 3BV>240 occurs about 611 boards per million.
- A board of 3BV>250 occurs about 135 boards per million.
- A board of 3BV>260 occurs about 17.5 boards per milllion.
- A board of 3BV>270 occurs about 2.35 boards per million.
- A board of 3BV>280 occurs about 260 boards per billion.
- A board of 3BV>290 occurs about 30 boards per billion.

These are the lowest (73) and highest (304) boards that were generated:
random 73 3BV board.PNG
random 73 3BV board.PNG (13.8 KiB) Viewed 8135 times
random 304 3BV board.PNG
random 304 3BV board.PNG (13.36 KiB) Viewed 8141 times
Note that, for the smaller numbers, the distribution of the number of boards found is roughly a Poisson, which means that the standard deviation is approximately the square root of the given number. So, for instance, if I found that a board appeared about 10,000 times, its standard deviation (the error) is about 100. This means that the smaller numbers in my list are not all that accurate, while the larger numbers are a lot more accurate.

If you want to play around with the data yourself, you can download it from http://www.mzrg.com/filepost/1bn_3BVs.csv
NF player. Best scores 1-10-39.
aradesh
Posts: 87
Joined: Sat Aug 29, 2009 3:37 pm

Re: 3BV of a billion exp boards

Post by aradesh »

Hi qqwref.

Can I have the code you used for this? (is it already available somewhere on the forum?) I'm curious how long it took to run - eg how many boards 3bv were calculated per second?
qqwref
Posts: 125
Joined: Thu Sep 23, 2010 4:17 pm

Re: 3BV of a billion exp boards

Post by qqwref »

The code was essentially zinicalc with some tweaks - here's the modified main function. I don't remember exactly how long it took since it was a while ago, but I did it in 10 100-million chunks which each took a few hours or less.

Code: Select all

int main(int argc,char** argv)
{
        time_t seconds = time(NULL);
	init_genrand(seconds);
        height = 16;
        width = 30;
        mines = 99;
	int i,j,k;
	int* bbbvdist=(int*)malloc(400*sizeof(int)); // 3BV distribution
	board=(cell*)malloc((size=width*height)*sizeof(cell));
	for (k=0; k<400; k++) {
		bbbvdist[k]=0;
	}
	for (k=0; k<100; k++) { // percentage of job done
	for (i=0; i<10000000; i++) {
		clearboard();
		for(j=0;j<mines;++j) {
			int done = 0;
			while(done==0) {
				int r = genrand_int32(); // from mt19937ar-cok.c
				int xy = r & 511; // choose a 2^n-1 a bit above size for good randomness
				if (xy < size) { // only good if on board, right?
					if (board[xy].mine==0) {
						board[xy].mine=1;
						done++;
					}
				}
			}
                }
		initboard();
		bbbvdist[bbbv]++;
                if (bbbv < 85 || bbbv > 285) { // interesting board, I want to see it
                        printboard();
                }
        }
	printf("<%d> ",(k+1));
	}
	printf("[");
	for (k=0; k<400; k++) printf("%d,",bbbvdist[k]);
	printf("]");
	printf("Press enter to exit\n");
	pause();
	return 0;
}
NF player. Best scores 1-10-39.
Post Reply