←back to thread

Minesweeper thermodynamics

(oscarcunningham.com)
206 points robinhouston | 3 comments | | HN request time: 0s | source
Show context
gregfjohnson ◴[] No.45123258[source]
I hacked up a version of minesweeper that was “forgiving:” if there was no selection that was provably safe, it gave you a safe move. If you picked any square that was not provably a bomb, it would not be a bomb. Typically, as long as you don’t select a number of bombs equal to the number of squares , your first move is safe. I just extended that for the whole game. If you select N-1 bombs, you always win on the first move..
replies(8): >>45123401 #>>45124178 #>>45124382 #>>45124386 #>>45124449 #>>45124938 #>>45126205 #>>45126922 #
1. robinhouston ◴[] No.45124386[source]
Simon Tatham's _Mines_ deals with this in a different way: it generates the mine positions in such a way that they can never lead to an ambiguous state during a game. https://www.chiark.greenend.org.uk/~sgtatham/puzzles/doc/min...
replies(1): >>45125097 #
2. yshklarov ◴[] No.45125097[source]
That's pretty neat. I wonder how it works. It's not obvious to me at all how to build something like this, as the program doesn't know the sequence in which the player will reveal the tiles.

I also once made my own variant of this (just like gregfjohnson's idea): A "lucky minesweeper" where luck can be toggled on/off at any point during the game: https://github.com/yshklarov/minesweeper

replies(1): >>45125136 #
3. OscarCunningham ◴[] No.45125136[source]
He's written a bit about how it works here: https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/mines....