8 ms·
Minesweeper: Advanced Tactics (2005)
- luckyt 10y agoI implemented a lot of these tactics, and my AI achieved about 50% success rate on expert mode. https://luckytoilet.wordpress.com/2012/12/23/2125/ https://luckytoilet.wordpress.com/2012/12/23/2125/
- thomasahle 10y agoCool! It's nice to know that 50% solvability is possible. One note: In your example with the 11 configurations, are you sure that just clicking the squares with lowest counts, is the optimal way to go? It might be that while they are cheap, they also give little useful information on which configuration we are actually in? Perhaps some dynamic programming type solution could give the "clicking order" ensuring maximal winning probability.
- luckyt 10y agoYea, that's a problem for sure. I don't know what's the best way to weigh being able to make progress in the future vs surviving the next click. For example, is it better to take a 50/50 chance and be guaranteed to make progress, or take a 80% chance of surviving but likely be stuck next turn? It's an interesting problem to be investigated someday.
- kiliankoe 10y agoThanks for your post! I remember reading this sometime in 2013 and writing my own minesweeper AI based on it. It didn't get very far, but I sure had a lot of fun.
- ronilan 10y agoWhen someone says "minesweeper" I always shamelessly plug my js implementation: http://www.ronilan.com/bugsweeper/ http://www.ronilan.com/bugsweeper/ Don't ask me why.
- LVB 10y agoThanks. Nice game.
- tempestn 10y agoBecause you know that after reading about minesweeper, a person naturally wants to play minesweeper. Thanks! One thing I noticed though - in oldschool minesweeper, left click would test, and right would flag. Right seems to always flag here, but left sometimes tests, and sometimes toggles. Regardless, bookmarked.
- ronilan 10y agoIndeed. A left click on a flagged cell will unflag it. Don't remember why I implemented it this way. Maybe for touch screens which don't have the right click functionality. Btw, source is here: http://ronilan.com/bugsweeper/js/bugsweeper.js http://ronilan.com/bugsweeper/js/bugsweeper.js it is with jquery. Don't ask me why.
- tempestn 10y agoWhat I'm referring to though is the case where left-clicking on an UNflagged square flags it. Doesn't seem like that should happen. I'm not sure exactly when it was happening - perhaps the first left click after a right-click flag? Or the first one after a chord?
- deleted 10y ago
- dwpdwpdwpdwpdwp 10y agoOne thing that got my minesweeper game times down was to never actually mark the mines as such, just click the unturned squares you know aren't mines.
- 3131s 10y agoFrom what I've observed top players flag mines very minimally, only so that they can strategically chord in certain situations. Lists of record scores typically make a distinction between flagging mines vs. not doing so. I never flag mines, but I'm also not that good compared to the best of the best. For reference, the best of the best is Kamil Murański. There is only a 0.4 second difference between his NF (No Flag) time and his normal expert world record: https://www.youtube.com/watch?v=GrZCWx0fnfc https://www.youtube.com/watch?v=GrZCWx0fnfc (flagging) https://www.youtube.com/watch?v=8bsLwGf-vUE https://www.youtube.com/watch?v=8bsLwGf-vUE (no flagging)
- paulhart 10y agoWow, and I was proud of myself years ago when I achieved my goal of completing expert at less than 99 seconds!
- Brainix 10y agoAmazing article. I had underdeveloped but original (to me) ideas along these lines, as I'm sure that many Hacker News readers did. Apologies in advance for bikeshedding, but "Final Solution" is a jarring phrase, and that section heading diverted my attention. https://www.ushmm.org/outreach/en/article.php?ModuleId=10007704 https://www.ushmm.org/outreach/en/article.php?ModuleId=10007...
- sandworm101 10y agoHonestly, minesweeper is the one thing i really miss having on my home machines since dropping windows. There are some versions out there that are very similar but none have the feel and speed of the classic on xp or 3.1.
- speps 10y agoCopy the .exe from a friend and use Wine
- sandworm101 10y agoJust dont tell microsoft. They dont much like people sharing thier games.
- f_allwein 10y agoA friend of mine called himself an MCSE - Minesweeper consultant and Solitaire expert.
- heinrich5991 10y agohttps://sourceforge.net/projects/mines-perfect/ https://sourceforge.net/projects/mines-perfect/ It's awesome, it has Murphy's Law (if there is a possibility that the field you just clicked has a mine, then it will have one), always solvable levels and some variations of the board (think hexagonal, 3d). And it runs nicely in Wine. Try it. :)
- deleted 10y ago[deleted]
- tydok 10y agoI use a simple but effective tactic. 50-50 chances on nearby/adjacent tiles aren't actually 50%. If one tile would reveal a 4 and the other a 2, pick the second, because 4s are more rare.
- qiemem 10y agoI don't follow. This would only work if the distribution of numbers was predetermined and influenced the distribution of mines. I was under the impression that the mines were uniformly distributed though. So in a "T" scenario, it really is 50-50. The fact that 4s are more rare doesn't matter at that point. Sort of like in a series of coin flips, of you've flipped 5 heads in a row, tails isn't more likely to come since 6 heads are rare: it's still just 50-60.
- tydok 10y agoThe mines are uniformly distributed, yes, but the numbers are not. In a relatively sparse minefield, how likely is to find a 4? Of course depending on the "shape" of a cluster, chances can be 50%. The mines influence the distribution of numbers, not the other way around. Try to apply the tactic I mentioned to solve the minefield in the article.
- Retr0spectrum 10y agoYour logic is faulty, but it's hard to explain why. I think this might be variation of the Monty Hall Problem: https://en.wikipedia.org/wiki/Monty_Hall_problem https://en.wikipedia.org/wiki/Monty_Hall_problem Or more likely, just the Gambler's fallacy: https://en.wikipedia.org/wiki/Gambler's_fallacy https://en.wikipedia.org/wiki/Gambler's_fallacy
- tydok 10y agoIt's not based on math, it's empirical. In practice seems to work. I applied it on the minefield in the article and I solved it. To put it another way, on two adjacent tiles where there's one mine, if you had the choice to reveal a 2 or a 6, which one would you choose?
- scotty79 10y agoI wonder how good convolutional neural network could get at minesweeper.
- Retr0spectrum 10y agoIt would be interesting to built a minesweeper implementation that calculates mine positions dynamically. That way, you could resolve "unsolvable" situations like this by always favouring the player (or the opposite, if you're feeling evil).
- rtpg 10y agoThere is an OSS version of Minesweeper that does something like this! It would dynamically set the game grid so that you never need to guess. Inversely, if you're guessing, it would make you lose ;) It also included a hexagonal grid mode and other goodies, but I haven't touched it in 10 years and can't find it anymore. Might have been windows only, not sure
- Retr0spectrum 10y agoI found this: http://www.chiark.greenend.org.uk/%7Esgtatham/puzzles/js/mines.html http://www.chiark.greenend.org.uk/%7Esgtatham/puzzles/js/min... "you are guaranteed to be able to solve the whole grid by deduction rather than guesswork."
- aardvark179 10y agoYes, and Simon's version delays generation of the grid till your first click to guarantee this.
- jbrantly 10y agoI used to play minesweeper so much I would dream about it. I recently went looking for a replacement and found Hexcells Infinite which has really filled the gap. All puzzles are solvable and it even has nice music. Highly recommended.
- speps 10y agoOnline https://archive.org/details/win3_Mineswee https://archive.org/details/win3_Mineswee
- chris_st 10y agoThere's a pretty good iOS (and maybe Android?) game called PsyCard [1] that's a card-based variant of Minesweeper. It's from Ludosity, so the art is insane and the difficulty is substantial. I'll be interested to see if these techniques help. [1] https://itunes.apple.com/us/app/psycard/id1078267846?mt=8 https://itunes.apple.com/us/app/psycard/id1078267846?mt=8
- mikeash 10y agoThere are versions of Minesweeper which guarantee that you never have to guess. I find these to be a lot more fun. My understanding is that they work by using a solver on the generated field, and regenerating if the solver can't find a guaranteed solution. Search for "no guess minesweeper" on your favorite platform.
- Groxx 10y agoWhich I vastly prefer :| It's not very enjoyable to spend a good amount of time on a minesweeper-like game, and then have the end succeed/fail result dictated by a dice-roll.
- mikeash 10y agoExactly. It's nice to know that my success or failure is entirely up to me. It also lets you ramp up the difficulty to an absurd level and still have something you can solve with enough effort. Purely random boards become essentially impossible.
- mvindahl 10y agoBack in the day, I spent a fair amount of time playing Minecraft at the hard level. I did OK but my sister consistently beat me by large margins, completing in about 2/3 of the time that I used. It was a bit frustrating to be beaten that thoroughly. Her advice, as I recall, was to never pause to think. When running out of no-brainers around one area, immediately skip to another area. When running out of easy options, take a chance. It worked well for her but I never managed to make it work for me. I'd always stop at some point to ponder for ten seconds.
- okamiueru 10y agoThis analysis does not mention a implementation quirk for resolving hitting a mine on the first click. Shortly described: If the first cell clicked has a mine, move the mine to the first free cell starting from top left, and search row by row from left to right, top to bottom. It did not trigger for the game in question, as there is no mine in the top left corner. However, in normal games, with all other things considered equal, top left corner would have a higher chance of having a mine than anywhere else.
- lonh 10y agoI have a free version on iOS http://apple.co/1r5mC3g http://apple.co/1r5mC3g
- myfancypants 10y agoI'm a little late to this, but a while back I built a simple version of Minesweeper with an API to allow programmatic AI solvers for the game. Would be great to hear any feedback on it! https://github.com/myfancypants/minesweeper https://github.com/myfancypants/minesweeper