Re: Minesweeper probability
Don't know much about minesweeper, nor chances, but isn't the number of mines pre-determined before a game? (Meaning, the player knows how many there are)
Re: Minesweeper probability
I don't really know if you can calculate some sort of lumped probability in that case, though it feels like you should be able to (that is, it seems like the two middle squares would have a higher chance of being mines). Actually as I think about it more, I think given *only* the two probabilities we have and not a maximum number of mines, you can't lump the probabilies--you can only take the maximum probability of a shared square being a mine.
From an information perspective, it seems like you've got two separate pools of information, which don't interact much. If you think of only the 2/5 odds, what can you say about the odds of the two shared squares being mines? They're both 2/5 (duh). Can you use that to predict the odds of those two shared squares being mines after the 3/8 odds information is added? You can only say that the 2/5 odds won't go down--nothing more. [Musing: Interesting... I wonder if you can equate the situation where those odds won't go down to knowing the 2/5 odds, restricting the flow of information so that it has no other effects in this system...]
However, if you add in the information about the number of mines on the board, I'm sure you can say something about increased probability of shared squares being mines. Yeah--consider having 6 and 7 mines instead of 2 and 3 using the same setup you have. Then 11 possible places for mines, but you need 2 of them to be shared to get the total 6+7=13 to work out right. Then the probability that those shared squares are mines would go up by some amount I don't want to work out right now.
However, before you get into that sort of deadlock situation, I just don't think you can say anything more about the probability of shared squares being mines. That is, other than that the probability is (at least) the maximum of the probabilities given by each touching, revealed square (max{2/5, 3/8} in your first example). Then again, I was never terribly good at probability.
Re: Minesweeper probability
Thanks jemidiah, thats the same conclusion I ended up with, I still haven't figured out how much the number of remaining unfound mines will affect the probability of the squares which could share mines though, bit of a confusing one. I'll leave this thread unresolved in case someone can shed some more light on it
Re: Minesweeper probability
Quote:
Originally Posted by jemidiah
it seems like the two middle squares would have a higher chance of being mines
In this case, without any knowledge of the total number of mines, the probability of a shared tile being a mine is actually less.
Consider the possible solutions with 3, 4, or 5 mines adjacent to the numbered squares:
With 3 mines, both shared tiles are mines and there are 6 possible locations for the third mine. Thus, there are 6 solutions with 3 mines.
With 4 mines, one of the shared tiles is a mine (2 possibilities). There are then 3 possible locations for a second mine adjacent to the '2', and 15 possible placements of 2 additional mines adjacent to the '3'. Thus, there are 2*3*15 = 90 solutions with 4 mines.
With 5 mines, neither shared tile is a mine. There are 3 possible placements of 2 mines adjacent to the '2' and 20 possible placements of 3 mines adjacent to the '3'. Thus, there are 3*20 = 60 solutions with 5 mines.
Adding these together, we have 6+90+60 = 156 unique solutions. We can easily count among these solutions the number of times any given tile is a mine. For a shared tile, this number is 6*(2/2)+90*(1/2)+60*(0/2) = 6+45+0 = 51. For a tile adjacent only to the '2', the total is 6*(0/3)+90*(1/3)+60*(2/3) = 0+30+40 = 70. For a tile adjacent only to the '3', the total is 6*(1/6)+90*(2/6)+60*(3/6) = 1+30+30 = 61.
These totals give the probability of a given tile being a mine.
Shared tile: 51/156 = 17/52 < 3/8
'2' tile: 70/156 = 35/78 > 2/5
'3' tile: 61/156 > 3/8
Re: Minesweeper probability
My personell approach would be:
For all boxes with a question mark I would set the probability to "Mine not found yet"/ "Number of Boxes with question mark".
Having done all those, I would check each box with a question mark, whether it is adjacent to a numbered box, if yes set to probability to the higher value of ("Number in numbered box"/ "Number of boxes with question marks adjacent to the numbered box") and the probability of that box.
I would not calculate anything for the boxes that are adjacent to more then one numbered box, because I think the probability isn't related.
Once the probability is 1 in a box, you have found a mine.
Re: Minesweeper probability
Logophobic, I really like your approach in it's relative simplicity. This is why I was never good at probability :(
However, if you let n=the number of mines adjacent to the two revealed numbers, you've implicitly assumed that P(n=3)=P(n=4)=P(n=5); that is, you have the same probability of having 3 mines as having 4 or 5. This is technically more information about the number of mines, and appears to invalidate your use of the law of total probability, also invalidating your answer. In a Minesweeper game, though, this assumption would seem to be valid, and some generalization of your approach would likely work.
I'm still wondering why (conceptually instead of numerically) the probability of the two shared squares being mines is *less* than max{2/5, 3/8} instead of greater than that. It just feels wrong somehow. Note: I didn't check your counting as it's 4am, and intuition often fails us in probability.
Re: Minesweeper probability
Quote:
Originally Posted by jemidiah
you've implicitly assumed that P(n=3)=P(n=4)=P(n=5
Quite the contrary. I have assumed that each of the 156 possible solutions has equal probability (which isn't likely), such that P(n=3) = 6/156, P(n=4) = 90/156, and P(n=5) = 60/156. Without any information regarding the total number of mines, this is the best we can do.
If we know how many mines there are, then those figures could change dramatically. If, for example, there are exactly 6 mines in the 4x5 grid, then P(n=5) drops significantly while P(n=3) and P(n=4) increase. In this scenario, the probability of a shared tile being a mine may be greater than 1/2. On the other hand, if there are exactly 9 mines in the 4x5 grid, the situation is reversed and the probability of a shared tile being a mine may be less than 1/4.