Nu Programs
 • News
 • About
 • Contact

 • Home
 • About
-- Articles --
 • Randomness
 • Board Cycles
 • Dream Boards
 • TLM Theory
 • First Click
 • 1 Click Bug

On Board Cycles in Microsoft's Minesweeper
by Tim Kostka

This article assume knowledge of a pseudo-random number generator and its implications as discussed in the randomness article.

How to tell when you're in a board cycle
There is no easy way of knowing if the board you're playing is in a board cycle or not. When you start up Minesweeper in Beginner mode around 12% of the time you're in a board cycle. If you play enouch games without restarting Minesweeper or changing difficulty levels, then you'll always end up in a cycle. For the tests that I do to determine if a board is in a cycle, I compare the board to all the boards in the cycle. If it finds and exact match or if it finds a match that is exactly one mine off (due to the TLM occurance), then it's in the cycle.

How long are the board cycles?
Because of the seed number, Minesweeper can generate an enormous amount of unique boards, more than one person could ever hope to play in a lifetime, but because of the nature of the pseudo-random algorithm Minesweeper always falls into a cycle of boards which are just repeated. The number of boards in one of these cycles is amazingly finite compared to the total possible unique boards.
On Beginner, there are two board cycles. Each is about 25,000 boards long. I'm not giving the exact number here on purpose. On Intermediate there are also two board cycles and each is about 15,000 boards long. On Expert, however, I haven't been able to determine the number of board cycles or their length. What I can say is that at least one cycle does exist (as it has to) and that at least one cycle is over 300,000 boards long. My computer sorted through this many expert boards and found no repeating boards.

Boards until a Cycle (Beginner)
How long does it take to get into a board cycle?
When Minesweeper is started, the beginning board is calculated using a random seeded number (I'm not sure how the seed the generator) and the board often doesn't appear in either board cycle. But if you play enough boards, or press F2 long enough, it settles into a cycle. I did a test of the number of boards it takes Minesweeper to settle into a cycle. For each test, I started minesweeper, lost the game, tested if that was in the cycle, if not, then hit F2 and lost that game and saw if it was in the cycle, etc... The number of boards before a board appeared which was in the cycle was recorded. The results are in the table on the right. This was out of a sample of around 3500 instances of Minesweeper.
As you can see, around 12% of the time when Minesweeper starts, it's already in a board cycle. The length of the 0 row corresponds to about 10%. So 10% of the time when you start a Minesweeper beginner game, you're already in a cycle. The other 90% of the time you're out of a cycle and the board is unique. The most number of boards it took to reach a cycle was 211, so if you press F2 that much, then you're almost certainly in the cycle.
This page and all its contents are © 2002 by Tim Kostka. All programs here are distributed with this freeware license. If you have any other questions, please feel free to contact me directly.

Last updated: