The Game of Nim - a math game of strategy using matchsticks!

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • This video was sponsored by Skillshare.
    The first 1000 people to use the link will get a free trial of Skillshare Premium Membership.
    skl.sh/tecmath...
    The game of nim is an easy to learn math strategy game, that can be played anywhere with matchsticks, rocks, twigs....
    But best of all, whilst it looks fair, there is a math strategy you can employ to win everytime!
    Game of Nim link: www.archimedes...
    To donate to the tecmath channel:paypal.me/tecm...
    To support tecmath on Patreon: / tecmath
    To buy tecmath mechandise: teespring.com/stores/tecmath-store
    #skillshare
    #sponsoredvideo
    #mathgame

КОМЕНТАРІ • 94

  • @xniza1560
    @xniza1560 4 роки тому +15

    Yay you’re still alive and you’re doing well glad to know

  • @Pepa14pig
    @Pepa14pig 3 роки тому +16

    I love that little laughs when you find number that isn’t in pairs 😂
    Thanks for explanation, I have to teach kids this game on math fair in two days

  • @madisondoepel9779
    @madisondoepel9779 Рік тому +26

    When I was attending college, I actually made a whole spreadsheet with all of the possible moves and combinations for both this version and the simplified version. It includes which moves to counter each opponent's move and which moves lead to loss of the game

    • @elsacastilloo
      @elsacastilloo 11 місяців тому +2

      could i possibly see this- currently learning about the topic!

    • @madisondoepel9779
      @madisondoepel9779 11 місяців тому

      @@elsacastilloo Sure! I just requested you on Insta. I'll figure out how to send it from there

    • @WabaAnimations
      @WabaAnimations 10 місяців тому +1

      When college isnt hard enough

    • @afjelidfjssaf
      @afjelidfjssaf 4 місяці тому

      i hope you made a program to fill that spreadsheet automatically

    • @madisondoepel9779
      @madisondoepel9779 4 місяці тому +1

      @@afjelidfjssaf I did not. It was all done by hand. Lol

  • @marisolcancel1491
    @marisolcancel1491 4 роки тому +6

    Thank u so much because of all your videos i passed my math ged 🙏Thanks!!!

    • @tecmath
      @tecmath  4 роки тому +3

      Glad to hear. But the passing bit is all you!

    • @marisolcancel1491
      @marisolcancel1491 4 роки тому +2

      @@tecmath 🙏🙏Thank u for the help

  • @laurenspoth6535
    @laurenspoth6535 3 роки тому +17

    tecmath: "life is fun."
    me: "NO. NO ITS NOT."

  • @natecox599
    @natecox599 2 роки тому +5

    I remember playing this game in middle school in math we had a whole tournament and everything and I got 2nd man this game was fun cuz kids didn't know what they were doing but I lost cuz I had to go first and the other dude knew how to win too

  • @maxgrieve
    @maxgrieve 3 роки тому +11

    7:30 Soft disagree on the 'usually at this stage they're still trying to figure out what they're going to do'. In my experience with friends, usually at this stage they figure out they're definitely screwed and start swearing like troopers.

  • @ParadoxicalMind
    @ParadoxicalMind 3 роки тому +4

    "Doesn't matter, too fun to watch"...😂😂😂

  • @Killstreak_GOD
    @Killstreak_GOD 5 місяців тому +1

    Turn on the subtitles at the beginning

  • @TheVampireWX
    @TheVampireWX Місяць тому

    The way i learned to play this game, one wins if they pick up the last stick. For those who also play it this way, this still works, you just never have to leave the nim sum.

  • @JuswanthTeeb
    @JuswanthTeeb Рік тому +6

    So basically if XOR of number of matchsticks in each rows is 0, then the player who plays second wins else the player who starts wins.

  • @MrScarabey
    @MrScarabey 3 роки тому +31

    So what’s gonna happen when two nim players collide in a battle? Doesn’t it make the winner a person who starts first? He just has to lead the game to the point where he’s leaving opponent with 6

    • @aronsteff266
      @aronsteff266 Рік тому +6

      No. He loses. The first player has to break the "NIM SUM", resulting in the second player wining

  • @mattgsm
    @mattgsm 4 роки тому +10

    I watched this version of NIM on Mathologer's channel but you have the better accent

    • @tecmath
      @tecmath  4 роки тому +5

      Cheers mate. People love it or hate it!

  • @Llamu
    @Llamu Рік тому +3

    I found out about Nim in my maths class. It was the last day before Christmas so we had a sort of ‘Nim tournament’. I won. And not just slightly, I completely blew the rest of the class out of the water. 2nd, 3rd, 4th and 5th were all within a few points from eachother (5th with approx. 1082 points and 2nd with approx. 1086). But I had 1156 points. (Keep in mind we started on 1000 points, if we lost a game we lost points but if we won we gained points, meaning I actually won by at least 55%). To them, I was basically a nimatron / this website. Which is why It’s so frustrating when I repeatedly lost against that site you linked in the description. I must of seen the “Sorry… I won!” Pop up at least 100 times. The only way I can win is by opening the page in another tab, pressing “pc move” and mirroring it on the original tab, pressing “pc move” again and mirroring the move on the other tab. Repeat the process and you have the computer playing another computer which is a clone of itself. One of them will win and you get the “congratulations, you won!!!!!!!!!!!!!!!!”.

  • @AOTS123
    @AOTS123 2 роки тому

    I got to this video by watching Manhattan Murder Mystery by Woody Allen, when he’s talking to Diane Keaton about taking her to a film called Last year in Marienbad and in that film they played a game just like this.

  • @automotivel3501
    @automotivel3501 2 роки тому +9

    This is a long winded way of giving a winning tactic. In NIM you have to take the final pin. It is far easier to just make whatever number your opponent takes up to four. I.E. opponent takes 2 you take 2, they take 1 you take 3, they take 3 you take 1.

    • @schublade4
      @schublade4 11 місяців тому

      That makes a lot of sense - thanks for clarifying!

    • @Gabitza379
      @Gabitza379 10 місяців тому +2

      What if they take 5, 6 or 7? Take to the nearest multiple of 4, which is 8?

  • @IrfanIrfan-kh5cq
    @IrfanIrfan-kh5cq 4 роки тому +1

    thank you sir

  • @andrewmcintyre8636
    @andrewmcintyre8636 3 роки тому +7

    So you just have to make sure you leave an even number after you take your turn right?

  • @vi6612boink
    @vi6612boink 4 роки тому +1

    Oh hell yeah

  • @shehannanayakkara4162
    @shehannanayakkara4162 Рік тому

    Here's the strategy I've found to win any game, uses no maths.
    On their first move, if they take one card, take away one card from any other row (but not the same row!). Then if they take one card from 1 of the 2 untouched rows, take one card from the final untouched row.
    From this point on, or if they had done anything else for the earlier moves, you can always reduce it to the following 5 winning patterns on your current move.
    1. The 1-1-1 pattern
    2. The rectangle pattern (2-2, 3-3, 4-4, or 5-5)
    3. Rectangle with a 1-1 (1-1-2-2, 1-1-3-3, 1-1-4-4, or 1-1-5-5)
    4. The 1-2-3 pattern
    5. The 1-4-5 pattern
    Once you get it to one of these patterns, you just keep reducing it to another winning pattern until you win. With a bit of practice you can figure out your next move almost instantly, at most within 5 seconds.

  • @iamyou1059
    @iamyou1059 4 роки тому +1

    YES

    • @tecmath
      @tecmath  4 роки тому +1

      Sometimes I do, sometimes I don't.

    • @tecmath
      @tecmath  4 роки тому

      Occasionally

  • @John83118
    @John83118 9 місяців тому

    Impressive material. A book I read with similar content had a lasting effect on me. "Game Theory and the Pursuit of Algorithmic Fairness" by Jack Frostwell

  • @rajikasri.v9534
    @rajikasri.v9534 Рік тому +8

    What if we start the game first?

  • @missaelhernandezurdiano9423
    @missaelhernandezurdiano9423 Рік тому +1

    Does this also work for just 3,5,7 rather than 1,3,5,7 just that this time the second player has the disadvantage? Because the beginning player will not have the Nim Sum?

  • @mrperfect2160
    @mrperfect2160 4 роки тому +3

    AYYY YES IM HAPPY YA GOT ADS MATE KEEP IT UP AND MAKE THE MONEY LAST!

    • @tecmath
      @tecmath  4 роки тому +1

      Thanks. A few more in the pipeline but only if I like the product...

  • @bobmarley6161
    @bobmarley6161 3 роки тому

    Amazing.....

  • @rishabhagrawal80
    @rishabhagrawal80 4 роки тому +1

    1milliom near. ...
    ❤❤from india

    • @tecmath
      @tecmath  4 роки тому

      I know.... excited!

  • @AliAriasyt
    @AliAriasyt 3 роки тому

    You have the same strategy as Trevor Pasanen

  • @AhnastasiaRose
    @AhnastasiaRose 4 роки тому +5

    LOVE the channel! I was wondering, do you have any tips for solving algebra fraction problems? like x/2 + x/6=8?

    • @wlumsche7936
      @wlumsche7936 3 роки тому +1

      make denominator the same so it will be 3x/6 + x/6 so then its be 4x/6=8
      4x=8 times 6
      x=12

  • @hortondlfn1994
    @hortondlfn1994 3 роки тому +1

    What if you have to start the game?

  • @Mothesavage
    @Mothesavage 3 роки тому

    Its nice you said 1000 people like eveybdoy to have a chance which isgood for people to have a chance oof it was a few years ago
    Edit: it was 3months ago well if you used it for free congrats :)

  • @GENESUTUBE69
    @GENESUTUBE69 3 роки тому

    also forgot you can split the game into two sets like a even set and a 1-2-3 set

  • @GENESUTUBE69
    @GENESUTUBE69 3 роки тому

    forgot also leave odd with 1 in each row

  • @ManMountainManX
    @ManMountainManX 3 роки тому

    TY.
    /

  • @DrumickD
    @DrumickD Рік тому

    7:30 what if they just took 3?

    • @TermTheTron
      @TermTheTron Рік тому +1

      they. . . cant. you can only take from one row

  • @sjwzr
    @sjwzr 5 місяців тому

    how do i win if i start

  • @EK-eg8oh
    @EK-eg8oh 3 роки тому

    This doesn’t work if u have to go first?

  • @AliAriasyt
    @AliAriasyt 3 роки тому

    I could beat you at nim but how would we play against each other

  • @REYSEV
    @REYSEV Рік тому

    There is a payment of this game ?

  • @divyeshvasava511
    @divyeshvasava511 3 роки тому

    WHAT IF WE HAVE TO START FIRST??

  • @rizzwan-42069
    @rizzwan-42069 Місяць тому

    I thought this was about the programming language.

  • @matthieu8033
    @matthieu8033 3 роки тому

    What if we take 3 matchs off the last line at the biggining

    • @maxgrieve
      @maxgrieve 3 роки тому

      Yeah, some of these can take a bit of figuring out to start with - but in that case the next move would be to take out all the matches in the second line.
      So the situation after taking three off the last line at the start = 1 (1st line), 1+2 (2nd line), 1+4 (3rd line), 4 (last line) ... so the 4s pair up, but the three 1s and one 2 are both odd ones out. Wiping out the second line deals with it by getting rid of a 1 and a 2 at the same time, so then everything that's left pairs up again - there are still two 4s, but now there are only two 1s and there not being any 2s any more is no problem.

    • @matthieu8033
      @matthieu8033 3 роки тому

      @@maxgrieve yh, I noticed it after a moment xD. In fact, I'm in an informatic school and I have to create an AI that play as second and may beat the player (playing first) the most as possible. But our rules are quite diferent, we have N lines and can take only X matchs per turn. D'you have any idea of some strategy in this case ?

  • @terrapin52
    @terrapin52 4 роки тому +1

    Is the outcome different if you go first?

    • @tecmath
      @tecmath  4 роки тому +1

      Your will start with a nim sum of zero... so if I played you I'd beat you!

  • @riyan1716
    @riyan1716 3 роки тому

    Ou

  • @jacobeller
    @jacobeller 4 роки тому +2

    I wonder, is Mathologer smarter, or you?
    Also, I think you would win in a fight.

    • @tecmath
      @tecmath  4 роки тому +1

      He's smarter. I'd win in a game of rock paper scissors.

    • @jacobeller
      @jacobeller 4 роки тому +1

      @@tecmath Hahaha!
      Let me guess...you would use math in this theoretical game of Rock, Paper, Scissors, huh?

    • @tecmath
      @tecmath  4 роки тому +1

      Nah. I'd go rock. Good old dependable rock. Can't be beaten! But funnily enough I have read about rock paper scissors... there are strategies that make you more likely to win...

  • @levitatingdreamer3868
    @levitatingdreamer3868 4 роки тому +1

    i need help with multiplication and division of integers pleas help me if you did a video tag me with the video

    • @tecmath
      @tecmath  4 роки тому

      I was looking at doing one on these. I'll probably forget to tag you, but watch out for it!

    • @groszak1
      @groszak1 2 роки тому

      N×M could be calculated in terms of N÷(1÷M).

  • @nuklearboysymbiote
    @nuklearboysymbiote 4 роки тому

    what if they make you start first?

    • @tecmath
      @tecmath  4 роки тому +2

      I let them. They almost never know the way to win.... and one slip...

    • @nuklearboysymbiote
      @nuklearboysymbiote 4 роки тому +1

      @@tecmath the trick is to not tell them the name of the game so its harder for them to look up this video

  • @hjf_9437
    @hjf_9437 4 роки тому +1

    Does techmath reply :)

  • @GENESUTUBE69
    @GENESUTUBE69 3 роки тому

    been playing this for half a century did not know its name we called it take a way and it was 1 2 3 4 5 in the 5 rows leave equals or 1 2 3 to win sometimes we added an extra row of 6

  • @Wayneawebb
    @Wayneawebb 3 роки тому

    I couldn't figure this out. No matter what I did, the computer (I ALWAYS made the computer move first) ALWAYS beat me. God ONLY knows what I was doing wrong.
    This is frustrating me, I call B.S.on this method as you only show 1 game & it was totally confusing as to the "Person" taking the moves. I've played the Video through dozens of times & played the game but I just do NOT get the win. EVER.

  • @sophieodallaire476
    @sophieodallaire476 3 роки тому

    If the rule is that you can take the number of matches you want when it’s your turn, can’t you just take all the matches except one that you leave to your opponent?

    • @sinthebay
      @sinthebay 3 роки тому +1

      you can only take from one row

  • @panthakurai5267
    @panthakurai5267 2 роки тому

    Nine Inch Males 😂

  • @drizzle_t1238
    @drizzle_t1238 4 роки тому +1

    I’m good at maths

  • @kartheek7065
    @kartheek7065 4 роки тому

    Do a face reveal

    • @tecmath
      @tecmath  4 роки тому +2

      One day... maybe soon. You'll be bitterly disappointed... I look like a wild man... No haircut in lockdown!

  • @imtrue2132
    @imtrue2132 3 роки тому

    Dumb. No explaination on screen. Missing annotations. This video is audio only. Disliked.