Most active commenters

    ←back to thread

    Minesweeper thermodynamics

    (oscarcunningham.com)
    206 points robinhouston | 22 comments | | HN request time: 0.248s | source | bottom
    1. 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 #
    2. abetusk ◴[] No.45123401[source]
    Ha! This is NP-Complete, no? In practice, it probably doesn't matter but my bet is that there are some configurations that will take exponential time to see if the player should be "forgiven".
    replies(3): >>45123447 #>>45123487 #>>45123970 #
    3. alain_gilbert ◴[] No.45123447[source]
    I made winsweeper, which will move the mine if there is no safe tile left for you to discover.

    https://github.com/alaingilbert/winsweeper

    4. mcmoor ◴[] No.45123487[source]
    Yeah I've debugged another game that attempted this and this system resulted in the game lagging as hard sometimes.
    5. OscarCunningham ◴[] No.45123970[source]
    Yeah, it's NP-complete to decide whether a cell in Minesweeper must be a mine: https://logic.pku.edu.cn/ann_attachments/np.pdf.

    In practice I suspect a SAT solver would make quick work of the positions that actually appear in games.

    replies(1): >>45124368 #
    6. anabab ◴[] No.45124178[source]
    Prior art: https://news.ycombinator.com/item?id=21883875
    7. maggit ◴[] No.45124368{3}[source]
    There was a Minesweeper on here that used a SAT solver, but I cannot find it at the moment. As I recall, it never had any issue with resolving the board quickly. I think it dynamically resolved where the mines would be as you played the game, and if you clicked a square that could be a mine, it would be a mine, except, I believe, when there were no open squares that were safe.

    (Edit: Here it is! https://pwmarcz.pl/kaboom/ And the write-up: https://pwmarcz.pl/blog/kaboom/ )

    This is similar in spirit to my take on the game: https://magnushoff.com/articles/minesweeper/

    Unfortunately, not being familiar with SAT solvers, my implementation can grind to a halt in some configurations :)

    replies(1): >>45126102 #
    8. throwaway82408 ◴[] No.45124382[source]
    I would also like to auto clear tiles that are unambiguous when I flag a mine. Perhaps by double tapping one of the adjacent tiles
    replies(1): >>45129404 #
    9. 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 #
    10. HPsquared ◴[] No.45124449[source]
    The Windows 7 Minesweeper does something like this on the initial click, I think. You usually get a "good start".
    11. lifthrasiir ◴[] No.45124938[source]
    There is a Korean indie game made in RPG Maker MV that pushes this idea to the extreme, titled How can I be a brave in the isekai while I suck even at the minesweeper's novice level?! (rough translation, original: 지뢰찾기 초급을 겨우 깰까말까한 내가 이세계에서는 용사라고?). Too bad it's only available in Korean.
    12. 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 #
    13. OscarCunningham ◴[] No.45125136{3}[source]
    He's written a bit about how it works here: https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/mines....
    14. Gravityloss ◴[] No.45126102{4}[source]
    I wonder if one learned to play faster with this kind of minesweeper.

    I find in a lot of repetitive learning, you have a very noisy signal, you don't know if you succeeded because of luck or you did something right.

    This variant takes out the luck part.

    15. Eddy_Viscosity2 ◴[] No.45126205[source]
    > a version of minesweeper that was “forgiving:”

    I think this diminishes the game. Sometimes you just don't have enough information to know for sure. Experiencing this in a low stakes situation like a minesweeper game reminds us that life is like that sometimes and we just have to make a guess and accept the consequences.

    replies(2): >>45128943 #>>45133204 #
    16. IAmBroom ◴[] No.45126922[source]
    Every version of Minesweeper I've ever played makes your first move safe. I realize this is not going as far as your version, but I've had this argument with ardent players who insist it isn't true (and somehow they've just been lucky, I guess).
    17. npteljes ◴[] No.45128943[source]
    Yes, this really depends on what one's expectations are of a "game". Luck, as a component, is often contested. In case of the minesweeper, I'd argue there is either

    A) No place for luck at all, either by making the game "forgiving", or generating a game that never has an ambiguous block, or

    B) The game should make luck's presence more constant.

    In case of Minesweeper, the most unfair event is when after a lot of pure skill-based play, the outcome ends up being luck based. As a game mechanic, this can work out to be challenging, or work as a surprise the first time, but it gets old pretty fast - because why bother putting in all that skill, just so be judged by luck in the end? And those who are thrilled by luck checks, will be turned away from the game because the exciting part comes last.

    Because of this, I'd keep this logic game be about logic, or work luck into the game more deeply.

    Solitaire is similar, with some of its starting positions being outright unwinnable. I'd just filter these out when creating a new game.

    replies(2): >>45129503 #>>45130347 #
    18. cyclotron3k ◴[] No.45129404[source]
    Can't you right-then-left-click the flagged mine? Iirc there's an awkward way of doing this
    19. freedomben ◴[] No.45129503{3}[source]
    Agree completely. The luck aspect kinda wrecked minesweeper for me. It's a super fun simple game, but after spending a lot of effort logic-ing my way through it, only to have to take a 50/50 or worse guess toward the end and have it blow me up, is deeply unsatisfying. When it comes at the beginning (that first block can be a bomb after all) it's not too bad, but at the end isn't cool
    20. JackC ◴[] No.45130347{3}[source]
    This is why Slay the Spire is as loved as it is -- clearly defined skill and luck checks delivered one after the other at the precise limits of your ability.

    Minesweeper is more like a quirky old wooden board game, charming because it's always been what it is, warts and all.

    replies(1): >>45139963 #
    21. wkjagt ◴[] No.45133204[source]
    I actually like the idea that it's always solvable. Like a sudoku puzzle. If a sudoku isn't solvable through logic, but requires guessing, it's considered an invalid puzzle.
    22. npteljes ◴[] No.45139963{4}[source]
    Balatro as well, I think. Luck there is a huge factor, and it's honest about it from the get-go.