>>12611868you structure the game giving it a number of squares in the rectangle and an expected mine count. Even in the simplest minimum case of a 3x3 with 8 mines, there is a 1 in 9 chance for an 8 to appear.
The equation describing the chances of n to appear, in this case 8, is going to be a function proportional to the total number of squares, and inversely proportional to n and the mine/square ratio. It should be a straight probability equation of chances of finding n mines in a ring around a square and the square not being a mine itself. This second factor accounts for cases where mine concentration makes smaller numbers less likely. A larger board allows for more opportunities. I think 8 should be the easiest case to solve for also.
I am guessing this problem is already hard solved somewhere. Not sure how I would find it though.
Game Area(G): (Length)(Width) = LW
Area for 8: A = (L - 1)(W-1) = LW - L - W + 1
This is because no 8 squares can occur on outer edges. This serves as the number of check spaces. Now check each space against the probability of finding a mine in the space S, or what is called the mine concentration C.
The conditions for an 8 is that S_n is not a mine and that all of the S around it are mines.
S_n is not a mine: 1-C
All of the squares around S is a mine: C^8
C^8(1 - C):
C^8 - C^9
Now multiply it by the number of spaces for each area to check and also have to factor back in those squares that we originally removed for being impossible. This is a ratio of Area(A) to game Area(G)
(A/G)(C^8 - C^9)
I am more interested in solving for other n, especially when thinking about this in more than a two dimensional space.