← Back to context

Comment by mtlmtlmtlmtl

3 days ago

I looked at the code for this once. It's sort of a hack. It generates a random puzzle, tries to solve it with a deterministic backtracking(IIRC) solver that detects situations where it's stuck. If it is stuck, it shifts some mines around in the place where the solver got stuck, according to some heuristics, and keeps solving. It keeps doing this until the entire puzzle has been solved, verifying that the puzzle can be solved without any guesswork.

I will second the recommendation. As someone who's wasted too many hours on minesweeper, it radically changes the game. Because I know there's a logical solution, I'm able to find patterns that I never found in the original, because I'd often assume it was just one of those guesswork situations. It's similar to how chess puzzles are easier than an equivalent position during a game. Because you know there's a neat solution, you're more willing to put in the legwork of searching for it. Learned a lot about the game simply by playing Simon's version.

I wouldn't describe it as a hack necessarily. This is called rejection sampling, and it's just fine as long as the rejection rate is low enough.

I tried some no-guess variants but somehow there's a kind of sterile feeling to it. For some reason it makes it more boring compared to vanilla variant. It of course excels when I'm getting frustrated at guesses and 50/50, but otherwise I play the normal minesweeper more.

  • It's an entirely a different metagame if the goal is to improve your personal best time over multiple games within a given time frame. Once you get good enough with the deterministic reasoning, the game transforms into probabilistic strategies for time saves in both the vanilla and the guaranteed solvable game, and at that point the two games are very different.

    For the vanilla game the guesses become integral part of the game that you can strategize around. There are guesses where some squares are less likely to contain mines than others. You can also try to uncover guesses as early as possible in a game, so you don't waste too much time on a game that is doomed to fail.