Simplism Games Forums
http://www.simplismgames.com/cgi-bin/yabb2/YaBB.pl
General >> Nonosweeper >> Brute-forcing beginner
http://www.simplismgames.com/cgi-bin/yabb2/YaBB.pl?num=1154001424

Message started by Ian on Jul 27th, 2006 at 11:57am

Title: Brute-forcing beginner
Post by Ian on Jul 27th, 2006 at 11:57am
Hello all, I've been playing Nono for about 3 days now, loving it (not that I'm all that good... yet! :D)

Anyways, I've been working out various chances of certain things on the Beginner board:

The total number of possible beginner boards is 36C9 = 94143280
(for those unfamiliar with this notation, nCr means the number of ways of choosing r objects from a set of n. The formula is n! ÷ r!(n-r)!)

Therefore the chances of just choosing a particular board and getting it is 1 in 94143280.

You could expect a 50% probability that you will get this in the first 50% of 94143280 games, i.e. 47071640.

At 1 game every 1/2 second, you would need to play beginner for 23535820s = 272 days non-stop to reach this total. And then you have half a chance of getting the board you want :P

To make things a bit more likely, say you wanted a board with a blank row or column. In this case, there are 12 possible rows or columns the blanks could occupy, so the remaining 3 blanks have to be in the remaining 30 squares:
12 × 30C3 = 48720

Therefore the chances of getting a board with a blank row or column is 48720 / 94143280 which is about 1 in 1932 (attainable!)

Another good way to get a nice beginner level is to have lots of 1-1-2 or 1-2-1 or 2-1-1. Ideally, we want 3 of these and 3 of 1-4, 2-3, 3-2 or 4-1 along the rows (by my beginner tactics, and I think I saw that someone else used this as well).
The 1-1-2s could be in any of 6C3 places, and there are 3 options for the order. Then there are 4 options for each of the remaining 3 rows:
3 × 6C3 × 4³ = 3840
The chances of getting one of these boards is about 1 in 24516, and by the half-second half-chance timing estimate, you'd need to play for about 1h42m to get a 50% probability of getting one.

Happy sweeping!

Title: Re: Brute-forcing beginner
Post by Qetuth on Jul 27th, 2006 at 4:13pm
Interesting calculations. Good to see someone else take an interest in that aspect of the game :D Oh, and don't get too discouraged if you aren't high on the boards yet: It's amazing how much people speed up when they've played for a while.

Hmm, I feel like figuring out some of this type of stuff myself:

A Corner beginner board like the fake board screenshot that was posted here (along with a fake 0s time) is 4 possibilities so 68 days of constant playing by ians working. However, any board with a 3x3 gap, gives 16 possibilities, so 17 days. It might be interesting to find out what % of boards exist that can be solved with a single click.

The current tournament (5x5, 9 mines), each board has a probability of 25c9 = 8,171,900. The chance, though, of a baord where the mines fill a single row plus a single column, since there are 25 boards which fit that pattern, is 326876, which at 2 boards a second, you have a 50% chance of finding in the first 23 hours. Okay, thats still a bit too much to brute force, but for anyone wondering how some people got the times they did in season 10, touney 5 (5x4, 4 mines), there are only 4845 possible boards, so a vertical row board, at 2 games a second, should have appeared every 8 minues on average.

On the other hand, there are 1,977,204,582,144,932,989,443,770,175 different intermediate boards, of which only 29,033,531,588,150,684,937,045 have a blank top row, so roughly 580 hexillion have a blank row or column, thats 1/3333 or so? I may have that wrong...

To get an example "perfect int board", of the type where either the bottom, top, left, or right 6 rows are all full, and 4 remaining mines placed randomly elsewhere, at 10 seconds a game average, should have a 50% chance to occur every 856 billion years of constant playing. So if anyone gets a board like that, you'd better not waste it!


Title: Re: Brute-forcing beginner
Post by Ian on Jul 27th, 2006 at 6:07pm
Hehe, thanks Qetuth :D

As for beginner boards that can be solved in a single click, somehow we need to find a method of quickly counting all possible sets of 9 squares connected by edges. Hmm... ???

I guess this is essentially a Graph Theory problem, so take the squares as vertices and edges between squares as edges joining two vertices? Eek, this is hard. I think some of the critical problems could be if you try and build from a starting point, you could cross over yourself, or making sure you don't count things twice.

Maybe I'll just write a program to test every possibility...

Title: Re: Brute-forcing beginner
Post by Harryck_Repse on Aug 7th, 2006 at 10:55am
Hmm... 1 in 1932 for beginner. Thought it would be much more likely than that. Could you perhaps work out the probability of an expert game with a blank row? Here's one right here.


http://www.planete-demineur.com/phpBB2/download.php?id=1879

Title: Re: Brute-forcing beginner
Post by Harryck_Repse on Aug 7th, 2006 at 11:15am
Just saw another!


Title: Re: Brute-forcing beginner
Post by hexx on Aug 7th, 2006 at 11:26am
Hey, i have this one:

Expert grid with empty Row & Column ???


Title: Re: Brute-forcing beginner
Post by Harryck_Repse on Aug 9th, 2006 at 6:05am
I'd figure out the probability myself but I don't exactly know how to factor the number 180  without getting a serious head ache  ::)

Title: Re: Brute-forcing beginner
Post by Gero on Aug 9th, 2006 at 6:19am
I remember I got once also a board with empty row and column. I was pretty bad on it^^

Title: Re: Brute-forcing beginner
Post by Qetuth on Aug 9th, 2006 at 8:16am
A specific empty row and empty column on expert means you're basically putting 90 mines into a 14x11 area, or, 154c90 = 154c64 = 154! / 90!*64! = 1.6x10^44.

There are 180c90 boards for expert: 9.1x10^52

So, chance of a board with a specific row and column empty is 1 in 555 million.

But, there are 15 columns and 12 rows, so 180 possible choices of specific row and column, so if you don't care WHICH row and column, its a mere 1 in 3 million (That's not taking into account the rather negligible number of boards which have more than 2 blanks: only 2 per million boards with a blank row and column also have at least one other blank column. So even though we're counting those boards twice, my rounding has more effect than they do.)

Title: Re: Brute-forcing beginner
Post by Qetuth on Aug 9th, 2006 at 9:21am
Thought I'd make a start on the single click beginner boards:

If you have a blank row, the remaining 3 blocks can be put in in:
12c3=220 ways using up to one row on either side for the 3. 20 of these use only a single side.
12c2 x 2 = 132 ways placing 2 blocks as above, then one more on top of one of those. 30 of these use a single side.
8x3+4x2 = 32 ways of placing the three with only one connecting square. 16 on each side, of which 6 use 3 rows.

so, with the top row blank, can be 20+30+16=66 one-click games.
With second row blank, can be 220+66+16=302
With third row blank, can be 220+132+24=376

So, using symmetry of the board, there are ~~2976~~ boards solvable in a single click which have a blank row or column.

100 have 5 blanks in a row and 5 in a column, intersecting. Ignore those for a sec. Now, for boards with 5 blanks in a row, starting on the left, you have 4 mines left to place.

using one row on either side: 10c4+9c2+9c2+1=283
of these, 6c4-4=11 are one-sided

with one on r+2, rest on r+1: 5(4c2+1)+7=42
with two on r+2, rest on r+1: 4x7+6+4c2=40
with three on r+2, rest on r+1: 11
so, r+2, one sided, sum is 93

with one on r+2, rest on r+1/-1: 9+4(9c2+2)+10c2+1=207
with two on r+2, rest on r+1/-1: 4x17+10+4c2=84
sum of r+2 is 291

with one on r+2, one on r-2: 25, minus 5 already counted, 20.

blank on r+3, but no negatives:  5*8+1=41
blank on r+3, allow negatives: 5*13-1 = 64, minus 5 we've already counted elsewhere = 59

and anything with r+4 is counted in the 5 by 5s.

So, top row has 5 blank from left, but mine in top right corner: 11+93+41=145
second row: 283+291+59=633
third row: 283+291+291+20+59=944

now, multiple for left or right, top or bottom, row or column, then add the 100 with both, number of boards with 5 blanks in a row or column but not 6, solvable in one click, is ~~7652~~

So, 10628 single click boards with at least 5 blanks in a row. To be continued.....

Title: Re: Brute-forcing beginner
Post by Nikolaj on Aug 9th, 2006 at 10:18am
@Q: EVERY board is solvable using only one click  ;D It“s a bit tricky though:
1) you can leave the grid to get into it at another place
2) you can move the cursor exactly at the line between cells - it doesn“t cause cells to behave as being clicked

OK, this was just for fun  ;), good job using all the math stuff  8) looking forward to see how many one click genius boards exist  ;D


Title: Re: Brute-forcing beginner
Post by Harryck_Repse on Aug 9th, 2006 at 10:28am
Nikolaj I don't think you can go between cells   ???But maybe I think that because I am a spaz and can't control the mouse very well  >:(

Title: Re: Brute-forcing beginner
Post by Qetuth on Aug 9th, 2006 at 10:54am
<Edit> @nikolaj: gah!! Oh well, I'll keep going, I guess, since that's sort of cheating. I dont imagine a single click which goes out of the board is any faster than 2 clicks. Actually, many of these aren't actually fast to solve, but anyway.... </Edit>

we've covered everything with 5 in a row. So, category 3: boards within a 4x4 square:

You cant have 2 blank rows plus a blank column in that square. A blank row and column leaves two blanks remaining:
two sides give: 4x(5c2+4) = 56.
Side and middle: 8x(5c2+2) = 96
two middles: 4x(8c2+2) = 120
So subtotal for that section: ~272

Now, with a blank top row, you have 5 remaining, and we've counted anything that uses a blank column as well. So:
Blank top row, 5 in 2nd and 3rd rows: 56-12=44
Blank top row, one in bottom row, no complete columns: 4+8+8+4=24
Blank top row, two in bottom row: 4
total with blank row: 72

Blank 2nd row, 5 in 3rd and 4th: 44
blank 2nd row, 1 above, 4 below: 28+16+16+28=88
blank 2nd row, 2 above, 9+12+9+20=50
blank 2nd row, 3 above, 11x4=44
blank 2nd row, 4 above is counted
so, blank second row gives 226

total with a blank row or a column but not both is then 298x4= ~1192

So now we only need to find the possible sets of 9 with no blank row or column, in a 4x4 area.

With a 3x2 section (can go in 6 places), placing 3 more around it without completing a row or column, gives 4x4+2x13=42. so with a 2x3 section must also be 42. 12 of these have both 2x3 and 3x2 so we've counted them twice. 42+42-12=72

With a 3 row, then an adjacent but displaced 3 row, but without creating any of the above: 4 for top row, so 16 for top and bottom, mirrored.13 for middle row, so 26 for mirrored: 16+26=42

We can now try and list all the shapes which have none of the above formations.

With a ring: 8
With a part-ring (missing a side): 8+8=16
With a part ring (missing a corner): 8+40+24=72
ring missing side and corner: 4+24=28
Claw: 4
Cup: 8
b3t3b2b1: 4
b2b3t3t1: 2

Thats all I can find, so 142+42+72=~256

If that's right, 272+1192+256=1720 formations within a 4x4 square, of which there are 9 in a beginner board: ~~15480~~

So, our running total is 26108, with a fairly small but very hard to find set remaining to count.

Title: Re: Brute-forcing beginner
Post by Maruda on Aug 9th, 2006 at 2:01pm
@Nik: in fact EVERY board is solvable using 0 clicks ;)
look at  http://www.nonosweeper.com/cgi-bin/forums/YaBB.cgi?board=news;action=display;num=1105367487;start=150

Title: Re: Brute-forcing beginner
Post by Ian on Aug 9th, 2006 at 3:38pm
I wrote a program to find single-click boards, and there are only apparently 17955... but of course I could be wrong :P

Doing it a case-by-case way, it's very easy to count ones twice.

Title: Re: Brute-forcing beginner
Post by Nikolaj on Aug 12th, 2006 at 7:12am

wrote on Aug 9th, 2006 at 10:28am:
Nikolaj I don't think you can go between cells   ???But maybe I think that because I am a spaz and can't control the mouse very well  >:(


I didn“t say that  ;D

http://sweb.cz/FarnikR/nonosweeper/oneclickbeg.avi

If I had left button pressed while F2ing, that board would have been solved in 0 clicks. Xvid encoding again ~160 kB. Enjoy  ;)

Title: Re: Brute-forcing beginner
Post by Harryck_Repse on Aug 12th, 2006 at 7:19am
lol  :)

Title: Re: Brute-forcing beginner
Post by Harryck_Repse on Sep 4th, 2006 at 2:04am
Heh, blank row in int.

:) :) :)


Simplism Games Forums » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.