Home Blog About Us Work we do Content Contact Us
 
 Advertisment 

Guest Post

I'm delighted to share with you the first Guest Posting on my blog.

This article was written by Emmet Nicholas, a developer at Stack Exchange in New York City. He is the Creator of Minesweeper Online.

His article was written in response to my posting on Classic Minesweeper.

 

GUEST POST
 

Minesweeper First Click: Quality vs. Quantity

Having spent way too many hours playing Minesweeper, I was interested to reach the conclusion of the June 2012 Minesweeper article on DataGenetics:

Always click on a corner!
It should be no surprise now that we've walked through the math that it is always best to click in a corner to maximize the chances that a cascade will occur.

Seems reasonable, but if clicking corners first yields over three times more "cascades" than clicking in the middle (49.846% vs. 15.449% in expert mode), why have I been clicking in the middle all this time? Have I been Doing It Wrong?

In thinking about this, I realized there are two distinct types of Minesweeper objectives:

A) Win this game"I don't care how long it takes; I just want to win this game."
B) Set a best time"I don't care how many games it takes; I just want to set a best time."

"Always click on a corner!" may make sense for "win this game" players, but what about me and my minesweeper-addicted friends, always competing to get the fastest times, and whose first-click strategies are all approximately:

  1. Click.
  2. If you didn't get a big cascade, start a new game and go back to step 1.

...should we be clicking corners first as well?

To try to answer this question, I began collecting first-click statistics on all games played at Minesweeper Online (my JavaScript clone of pre-Windows-7 Minesweeper).

Between June 8 and June 21, 2012, over a million games (1,078,205 to be exact) were played at minesweeperonline.com, and players tended to click in the middle first:

First-click locations
LevelGames playedCornerEdgeMiddle
Beginner38,95931.61%12.58%55.81%
Intermediate61,55118.55%15.77%65.68%
Expert977,69514.88%17.11%68.01%

First, I measured the chances that each first-click location resulted in a "cascade":

% of first clicks that resulted in cascade
LevelCornerEdgeMiddle
Beginner67.10%49.67%32.32%
Intermediate60.29%42.10%25.06%
Expert49.85%31.23%15.43%

Fortunately, the above statistics almost exactly align with the theoretical values calculated in the aforementioned article, so we've passed the sanity check!

Now for the good stuff: when cascades occurred, which first-click locations resulted in the largest average cascade sizes? (For the purposes of this article, and for the sake of simplicity, "cascade size" is just the number of squares in the cascade.)

Average first-click cascade size (when cascades occurred)
LevelCornerEdgeMiddle
Beginner27.9233.0941.57
Intermediate26.6837.2054.34
Expert15.7924.6036.84

To think about this more visually, average expert-level first-click cascades might resemble the following:

First click: Corner
First click: Edge
First click: Middle
Size: 16
Size: 25
Size: 37

Cascades are much bigger when starting in the middle! This makes sense, since a cascade's "growth" is more unbounded when it starts in the middle.

So, click the corner first for a high chance of creating a small cascade, but click the middle first for a low chance of creating a big cascade... quality vs. quantity!

Next, let's ignore cascades altogether. What is the average number of squares opened by the different first-click locations, cascade or no cascade? Again, I queried the minesweeperonline data:

Average number of squares opened by first click
LevelCornerEdgeMiddle
Beginner19.0616.9414.11
Intermediate16.4816.2414.36
Expert8.378.376.53

So, even though cliking in the middle yields bigger cascades, since the cascades are rarer, it isn't the best strategy for opening the highest number of squares on average.

With all this data, though, I'm still not sure where to click! Do I want bigger cascades? Or more cascades? Or more opened squares on average? After thinking again about my first-click strategy (see the 2-step process above), I realized that what I really want to do is maximize the probability that my first click opens at least n squares.

I measured the probability that different first-click locations opened at least n squares, while varying n:

 

Beginner level: Percentage of first clicks that open at least n squares

 

Intermediate level: Percentage of first clicks that open at least n squares

 

Expert level: Percentage of first clicks that open at least n squares

 

CONCLUSION

As you can see, depending on the size of the opening cascade you're aiming for, clicking the corner, edge, or middle first may all be optimal strategies!

On the beginner level, clicking the corner first is practically always the way to go. But on the intermediate and expert levels, things start to get interesting:

Intermediate level:

Click the middle first to maximize the probability that your first click opens 38 or more squares.

Click the edge first to maximize the probability that your first click opens 19 or more squares.

Click the corner first if you're satisfied with opening fewer than 19 squares.

Example 38-square opening

Example 19-square opening

Expert level:

Click the middle first to maximize the probability that your first click opens 34 or more squares.

Click the edge first to maximize the probability that your first click opens 13 or more squares.

Click the corner first if you're satisfied with opening fewer than 13 squares.

Example 34-square opening

Example 13-square opening

 

 
/GUEST POST

 

 

Check out other interesting blogarticles.

 

 

 

 

 

 

 

 

 

© 2009-2013 DataGenetics