Pretty neat and a very nice walkthrough of the code.
For localization you might want numbered holes which makes it way more complicated.
You can detect if the backing buffer is too short, but can you detect other errors? Like having different numbers of holes and arguments? I couldn’t find any discussion about this.
Well actually, air molecules (N2, O2) are indistinguishable. This means that they are fundamentally interchangeable with each other and it’s not well defined what ”same” molecules mean. You can’t label the individual molecules.
It’s of course possible to track a single molecule if you really try hard. But this hasn’t been done since Caesar's time and the molecules have mixed. Even if we knew the exact state of the universe right now and could play back time perfectly it would be impossible to say that some particular molecules were part of his last breath.
This was also my thought, since selection bias seemed like a good explanation as well. The survey only covers 220 square arcminutes out of a total of about 148 million. Interesting data point though, definitely seems like something that one should measure!
Does this mean that the top left corner had a higher probability of being a mine? Or even a lower probability, seeing as the dev would have had to ensure that it's not a mine before the user clicks.
Now that I think about it, the dev strategy of leaving the spot without a mine but moving one there, probably does not affect the probability that there will be a mine there during gameplay.
I don't think the dev would leave the top left without a mine until one is moved there, as that would always be a safe square to click first.
So if the probability of finding a mine at any given spot is given by p, then the probability of finding a mine in the top left during gameplay for cases where one does not click it first (in which case it is 0?) is 1 for the case where you clicked on a mine first with probability p, and then p for the remainder.
So the total probability p' is p * 1 + (1 - p) * p, or 2p - p^2.
Wikipedia says
> Beginner is usually on an 8x8 or 9x9 board containing 10 mines, Intermediate is usually on a 16x16 board with 40 mines and expert is usually on a 30x16 board with 99 mines; however, there is usually an option to customise board size and mine count.
8x8 10 mines p = 0.16 p' = 0.29 ratio = 1.84
9x9 10 mines p = 0.12 p' = 0.23 ratio = 1.88
16x16 40 mines p = 0.16 p' = 0.29 ratio = 1.84
30x16 99 mines p = 0.21 p' = 0.37 ratio = 1.79
I was curious to see the concrete effects for no reason other than to procrastinate.