Live data from Hacker News

Kaboom: an unusual Minesweeper

pwmarcz.pl

41–50 of 71 posts

Re: Kaboom: an unusual Minesweeper

#41
post #22

In a similar vein: Cheating Hangman, once described as "an app that perfectly recreates the infuriating feeling of playing hangman with your older sibling who was definitely cheating and also knew way more words than you". https://cheatman.danq.me/ Implementation details: https://danq.me/2019/09/26/cheatman/

I love it, 9/10, my only complaint is the dictionary is ever so slightly too broad, I wish there was a filter to at least limit it to, say, OED words only.

But a truly awesome project.

Re: Kaboom: an unusual Minesweeper

#42
As far as I understand this has been done more than 15 years ago by the "Mines Perfect" game [0], which is open source IIRC. In this case you'd use the Lucky Mode and the Murphy's Law option (although more modes are available). And no SAT solver was used in that game, I think, which to me is more impressive, although perhaps less elegant.

[0] http://www.czeppi.de/english/index.html

Re: Kaboom: an unusual Minesweeper

#43
Quote: "Recently, I had an idea: what if you had to play Minesweeper against the computer?"

For me that statement means player 2 played by computer. What he actually implemented is not that. Which gave me the idea to actually do that. Same rules as classic one, you click, another human click (or computer player) - loser is the one who reveals a bomb. In case nobody blows up winner is the one who is last to flag correctly a bomb on a guessing situation.

Ideas, constructive criticism is welcome. What you guys say?

Re: Kaboom: an unusual Minesweeper

#44
post #22

In a similar vein: Cheating Hangman, once described as "an app that perfectly recreates the infuriating feeling of playing hangman with your older sibling who was definitely cheating and also knew way more words than you". https://cheatman.danq.me/ Implementation details: https://danq.me/2019/09/26/cheatman/

Hatetris (or whichever implementation of that idea came first) appears on this trail:

https://github.com/qntm/hatetris

On the topic of hang man, we played some on breaks at work. Eventually I figured that I could use some tool assistance that scored dictionary words according to their length, the overall frequency of the letters that appear in them, the number of times letters are repeated within the words etc. and from the top of those I manually picked the most obscure ones.

Re: Kaboom: an unusual Minesweeper

#45

Quote: "Recently, I had an idea: what if you had to play Minesweeper against the computer?" For me that statement means player 2 played by computer. What he actually implemented is not that. Which gave me the idea to actually do that. Same rules as classic one, you click, another human click (or computer player) - loser is the one who reveals a bomb. In case nobody blows up winner is the one who is last to flag corre…

Perhaps rather than awarding a "draw" to the last click, go by points for area marked safe? I think that would be slightly less weighted towards random chance rather than strategy (though I welcome correction from anyone with time+inclination to run the maths or Sims!).

Re: Kaboom: an unusual Minesweeper

#46
post #26
post #8

Earlier quoted context omitted.

I wouldn't say it's "easier", since random chance of failure isn't a difficulty level, it's a lack of difficulty: Your gameplay has no effect on the outcome. If anything, this is Minesweeper as it should have been: A game of perception and deduction with no chance of random failure. As a huge minesweeper fan, I think this is fantastic.

I'm not entirely sure the software's working correctly. I lost my first game, and I'm fairly certain that there was a different possible orientation of mines: https://imgur.com/gallery/hg1Mcwq

hatwash answered why the two green squares above and below the right-most 2 were safe. Here's why the top-left and bottom-left squares were safe:

    a b c d
    2 3 4 2
    0 e f g
Because of the left-most 2, only two of a,b,e are mines.

That means only one of c,f is a mine - the third mine of the 3.

That means only three of b,d,e,g are mines - the remaining three mines of the 4.

But both d and g cannot be mines, because combined with the one mine in c,f that would put three mines around the right 2. So only one of d,g is a mine.

So if only one of c,f is a mine, and only one of d,g is a mine, that means b,e are both mines - the remaining two mines of the 4. So b,e can be flagged as mines.

That means the left 2 is complete, so a can be opened safely. Also the mine at e completes the bottom-most 1, and you can proceed from there.

Re: Kaboom: an unusual Minesweeper

#47
post #12

Earlier quoted context omitted.

In complex situations it is easy to come to the conclusion that you have to guess, but sometimes there is an elaborate connection you might have missed. This game is sure to call you out on any mistakes you make of this kind. That would at least make this game more strict and perhaps even more difficult.

I tend to solve Minesweeper locally as much as possible, solving cordoned off sections where the answer doesn't rely on the rest of the board. A major benefit to doing it this way in traditional implementations is that if I'm forced to guess, the sooner I make an incorrect guess the sooner I move on to a solvable map. While trying this out I've encountered several sections where I would have to guess, and that guess…

Agreed, I'd like this to go one step further and allow you to guess on a square where you will inevitably have to guess anyway.

I'm not sure how hard this is to add to the SAT solver. The formal definition is something like "if for some set of maybe-squares S, no matter what the solutions are to all of the squares outside S, the set of solutions to S is the same, then allow clicking anywhere in S". But that's a combinatorial explosion: just the number of sets S to consider is a factor of 2^#{maybe-squares} . I don't know enough to say if that can be optimized into something sane so that it can be rigorously applied, but a handful of special cases for small unconnected sections of the board would cover most of it.

Re: Kaboom: an unusual Minesweeper

#48
It's amazing how good this is for training!

Apparently I am not that great at minesweeper and guess way too often when it's not necessary. This variation kills those bad habits pretty quickly by punishing you 100% of the time for guessing. Along with undo and double checking with the debugger, I've picked up way more patterns/heuristics than in my years of playing.

Coolest thing is that if you're a perfect logician you can always win!

Link to actual game since it's not prominent in article: https://pwmarcz.pl/kaboom/

Re: Kaboom: an unusual Minesweeper

#49

> One of the bottom squares contain a mine, but it's impossible to say which one. You have to select one of them. But according to what I just said, that would mean certain death! I wanted the game to be cruel, but now it's unwinnable. So I'll modify the idea a bit and say you are allowed to guess, but only if there are no safe squares left. This way, the game will be cruel, but fair. The situation when your only mov…

If you read through the rest of the article, that's actually the end result! Ambiguous squares are guaranteed not to be mines iff guessing is the only possible move.

On the flip side, the game punishes you for guessing by guaranteeing ambiguous squares result in a mine iff there there are moves you could make without guessing.

Re: Kaboom: an unusual Minesweeper

#50
post #47

Earlier quoted context omitted.

I tend to solve Minesweeper locally as much as possible, solving cordoned off sections where the answer doesn't rely on the rest of the board. A major benefit to doing it this way in traditional implementations is that if I'm forced to guess, the sooner I make an incorrect guess the sooner I move on to a solvable map. While trying this out I've encountered several sections where I would have to guess, and that guess…

Agreed, I'd like this to go one step further and allow you to guess on a square where you will inevitably have to guess anyway. I'm not sure how hard this is to add to the SAT solver. The formal definition is something like "if for some set of maybe-squares S, no matter what the solutions are to all of the squares outside S, the set of solutions to S is the same, then allow clicking anywhere in S". But that's a combi…

> I'd like this to go one step further and allow you to guess on a square where you will inevitably have to guess anyway.

If you have all of the possible information for that guess already, then yeah.

If there are still some unknowns that you could resolve first to get more information, then guessing should still result in a mine.

Post reply on HN