Apple Maths
Apple Maths
  • 1
  • 222 161
How do you solve Minesweeper?
#SoME2
A (hopefully) approachable and widely usable approach to solve the tile based solitaire game Minesweeper.
0:00 - Introduction
0:16 - Basic Strategy
1:38 - Abstraction
2:20 - Sets
4:05 - Smarter Strategy
6:10 - Generalising our Strategy
8:05 - Including the Flags
9:11 - Summary
10:31 - Limitations
The code for the agent described is up on GitHub at:
github.com/ChasJC23/SetBasedMinesweeperAgent
Mistakes:
At 8:50 I got the subtraction the complete wrong way round! In that example it's the set B \ R, the single blue tile on the right.
มุมมอง: 222 163

วีดีโอ

ความคิดเห็น

  • @phoenixarian8513
    @phoenixarian8513 3 วันที่ผ่านมา

    There are some more advanced solving techniques called Whole substitution. Useful on 99 mines difficulty. By subtracting unknown-location-known-number minefield group to make clues. Something like A OR B (logic OR) has 2 mines A has 1 (A has more blocks so the mine is not yet found) therefore B has 1. And you may find B OR C has 2 therefore C has 1. Sometimes the chain can get pretty far away as there are too many mines blocking the detector to make every clue clear. And the inequality solution in 8:21 middle seg+right block=2 mines middle seg+left block=1 mine therefore left=safe right=mine. By replacing a cells with b cells the change of mine values can be a range of -a to +b. If I find a deadend corner 2 blocks wide (both corner block have 5 unexcavated blocks around) with one saying 1 and the other saying 4 then the 3 more blocks on 4's side are all mines and the more blocks on 1's side are all safe. It's an extremum which only this layout allows such a result.

  • @babymaddy7086
    @babymaddy7086 2 หลายเดือนก่อน

    Me who plays minesweeper but watches minesweeper ideas really says something

  • @imonbiswas6598
    @imonbiswas6598 3 หลายเดือนก่อน

    waiter for more games (sudoku alg.)and Minesweeper adv.

  • @scorpiobtw.
    @scorpiobtw. 3 หลายเดือนก่อน

    nice

  • @kepka55
    @kepka55 6 หลายเดือนก่อน

    1:50 Divide and rule

  • @angmathew4377
    @angmathew4377 ปีที่แล้ว

    is minesweeper that hard?

  • @anshumanagrawal346
    @anshumanagrawal346 ปีที่แล้ว

    For people who are first hearing about or learning the rules of Minesweeper in this video, you should know that with most applications you use Minesweeper isn't always solvable, as in you can't always logically deduce the solution as there may be more than one and then you're forced to guess. Just thought of saying this since I didn't know it when I first learned and for a while spent a lot of time trying to figure out some configurations which I now know aren't solvable.

  • @diribigal
    @diribigal ปีที่แล้ว

    You and fans of this video would love the computer game Bombe, where you use Venn Diagram rules to automatically solve Minesweeper variants.

  • @privategm
    @privategm ปีที่แล้ว

    What program or website you use to create this presentation?

  • @JR-White
    @JR-White ปีที่แล้ว

    I've been playing a version of Minesweeper called Bombe - if you enjoy this idea of building rules that solve Minesweeper, you might appreciate it!

    • @ryanmcmanus7273
      @ryanmcmanus7273 ปีที่แล้ว

      I came back to this video after seeing bombe

  • @flleaf
    @flleaf ปีที่แล้ว

    i figured out simpler version of smarter strategy by simple "what if" deduction (didn't understood almost any of the things about connection with sets though). but the final playthrough of the bot was still useful because i found the reverse of my strategy

    • @flleaf
      @flleaf ปีที่แล้ว

      actually, i was using that reverse strategy but didn't realized how much often it can be used

  • @monikakirisame9759
    @monikakirisame9759 ปีที่แล้ว

    Damn this made me interested to mine sweeper been avoiding on from my windows xp for years because i cant understand it

  • @00001Htheprogrammer
    @00001Htheprogrammer ปีที่แล้ว

    you can use the cheat code :P

  • @amandafournier9255
    @amandafournier9255 ปีที่แล้ว

    { }

  • @aleksitjvladica.
    @aleksitjvladica. ปีที่แล้ว

    This is the most useless video I saw today! EVERYBODY KNOWS THAT! BASIC LOGIC!

    • @JojoJere
      @JojoJere ปีที่แล้ว

      Dont be mean. Also, almost everyone uses configurations

  • @raeesronaldo
    @raeesronaldo ปีที่แล้ว

    “Kids these days won’t understand how to play minesweeper, not that we knew how to play it” -my dad

  • @parinuser
    @parinuser ปีที่แล้ว

    How do you only have 2.44K subs? I literally thought you had like - 100K or smth.I mean, you're growing fast, but still - not fast enough!

  • @ThatD1spynser
    @ThatD1spynser ปีที่แล้ว

    How do you even play it

  • @cmdr_sigma
    @cmdr_sigma ปีที่แล้ว

    It took me 6 minutes to realize this random video bestowed upon me by The Algorythm is actually teaching me math. And then suddenly programing. If only it was this entertaining when I was learning.

    • @1BubblePop
      @1BubblePop 2 วันที่ผ่านมา

      Elementary Set theory!

  • @dagger6467
    @dagger6467 ปีที่แล้ว

    With your cursor inside the minesweeper window type "XYZZY" then press Shift-Enter and Enter. A white dot should appear in the upper-left corner of the screen. If it turns black, your cursor is resting on a mine. Note: This trick works best if your Windows background is black.

  • @tristalia3113
    @tristalia3113 ปีที่แล้ว

    Never bothered with math in minesweeper. I just look at the numbers and use logic and common sense. I clicked on this video because I had hoped that it could solve those pesky little 50/50 situations that appear in almost every (hard) game atleast once or twice. well... I guess even math cant solve those ^^

  • @coolman5268
    @coolman5268 ปีที่แล้ว

    it feels like hes doing it against his own will

  • @greenthepokemontrainer3358
    @greenthepokemontrainer3358 ปีที่แล้ว

    yeah no.

  • @lunayre
    @lunayre ปีที่แล้ว

    interesting hearing all the strategies i use simplified into maths

  • @groetjesuitdehel
    @groetjesuitdehel ปีที่แล้ว

    This game is so weirdly addicting. It's so elegantly simple but complicated

  • @clovest3rz
    @clovest3rz ปีที่แล้ว

    My brain doesn’t wanna math today 😊😊😊

  • @anmol3
    @anmol3 ปีที่แล้ว

    Thanks a lot.

  • @KaziiTheAvali_inactive
    @KaziiTheAvali_inactive ปีที่แล้ว

    i enjoy coding so breaking it down into code did actually help me as I can visualize what to do when something happens. i right most of my notes in a sudo code like structure using the common if, if else, and for loops cause those were what I learned on .

  • @astro_cat030
    @astro_cat030 ปีที่แล้ว

    Is this how nerds play simple games?

  • @eppiox
    @eppiox ปีที่แล้ว

    I think 5:45 is where knowing math terms helps big time, even then had to re-watch and listen a few times... i seriously hate Maths terms and think the industry has a usability problem that stems from 100 of years ago... I can't think of anything better however! Nice vid.

    • @applemaths4062
      @applemaths4062 ปีที่แล้ว

      That is a brilliant point, I never even considered that! Terminology has perhaps the worst form of the curse of knowledge; really slow and obnoxious to learn, really trivial looking back. This is really helpful, I'll absolutely try to incorporate that in future. Thanks very much!

  • @rakapratama7812
    @rakapratama7812 ปีที่แล้ว

    One day I tried it. In a few hours I'm a master at it. It is how easy minesweeper really is lol

  • @duper7746
    @duper7746 ปีที่แล้ว

    Simple You go fucking crazy and click until you win

  • @waywardplanet
    @waywardplanet ปีที่แล้ว

    how dare you make me thoroughly entertained by mathematical terminology. how dare you.

  • @whtiequillBj
    @whtiequillBj ปีที่แล้ว

    There is one more rule which is often implemented: If the first space that the player chooses is a mine, move that mine somewhere else on the board and return the new board configuration as if that first chosen space was not a mine.

  • @SeigeGoat
    @SeigeGoat ปีที่แล้ว

    Fun fact:there's a plce in the earth where you can play minesweeper irl!!!

  • @4a1lop74
    @4a1lop74 ปีที่แล้ว

    After watching this video I relied one thing is that my brain is also a mine and it’s going to explode

  • @windows7backup
    @windows7backup ปีที่แล้ว

    Ohhhhhh. That's how minesweeper works. When I played minesweeper, I just click random tiles.

  • @senG_boi
    @senG_boi ปีที่แล้ว

    Didn't know it's so complicated

  • @exiletheblank
    @exiletheblank ปีที่แล้ว

    I've learned more math here than school 💀

  • @Dracolmao_
    @Dracolmao_ ปีที่แล้ว

    I always thought the numbers were scores 🤣

  • @christianmartinez3587
    @christianmartinez3587 ปีที่แล้ว

    This feel like this is going to be a 6 year old + video Imma just leave a comment

  • @francescoejlli8985
    @francescoejlli8985 ปีที่แล้ว

    Well Made! It would be nice if in a next video you talk about how to solve Sudoku

  • @Idkwhatiam
    @Idkwhatiam ปีที่แล้ว

    How soldiers minesweep: Cautiously looking at the ground and disarming mines. How people minesweep in computer: *Math intensifies*

  • @manchmalpfosten8133
    @manchmalpfosten8133 ปีที่แล้ว

    What the fuck

    • @poi9311
      @poi9311 ปีที่แล้ว

      Exactly.

  • @krishnagorde7295
    @krishnagorde7295 ปีที่แล้ว

    I'm a doctor. Never liked math. Felt math had no reality application. U proved me wrong at many levels. Kudos 👏

    • @pi6141
      @pi6141 ปีที่แล้ว

      lol it's pretty ironic to me how an algorithm that solves a 33 years old obscure game is enough to "prove you wrong" but the device you used to write this comment on isn't.

  • @hiimargo7058
    @hiimargo7058 ปีที่แล้ว

    Wow this was in no way informational or helpful in how to solve 50/50s and I wasted my time watching most of it

  • @GerultZRivivy
    @GerultZRivivy ปีที่แล้ว

    As a child, I beat minesweeper, on windows 7, without even knowing how to play the game, or without any help. I still feel proud.

  • @a.y.102
    @a.y.102 ปีที่แล้ว

    I would use a more versatile strategy, albeit maybe slow, that can solve the game optimally even when there is not enough information to surely advance. 1. List all the cases of arrangement of mines. 2. Remove the cases that don't match the numbers being shown on the tiles, as well as cases that don't match the number of remaining mines. 3. If a tile has mine in all of the remaining cases, that tile must have mine. If a tile doesn't have mina in any of the remaining cases, that tile must not have mine. If there is no tile found with those 2 searches, calculate the actual probability of each tile having mine, then open the tile with least probability of having mine. Theoretically, this is the strategy with the best win rate. To make it faster, we would: 1. Apply the basic strategies and other fast strategies while they can be applied. 2. Classify unknown tiles into neighbouring with at least a number, and not neighbouring any number. Then we only need to check all possible arrangements of mines in the neighbouring tiles; if we need to calculate probability, we can add "weight" for each arrangement of mines in the neighbouring tiles by the corresponding numbers of possible arrangements of mines in the non-neighbouring tiles (using the corresponding numbers of remaining mines).

  • @davidkapitancik1164
    @davidkapitancik1164 ปีที่แล้ว

    I wanted to see minesweeper video dammit, not a math video :/

  • @nicholasfly5914
    @nicholasfly5914 ปีที่แล้ว

    I am afraid when i am in the corner and there is "1" and "2", pointing at the same area of 2 tiles. It's 50/50.