ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to Win Matchstick Maths Game, 'Nim' - Fun for Children

Updated on December 31, 2019
Matchsticks Maths Fun!
Matchsticks Maths Fun!

The MatchStick Game - also known as 'Nim'

Here is a simple game for 2 people that you can always win (unless your opponent also knows the secret).

It’s a tremendous confidence booster for children who can learn to defeat adults once they learn the 'trick'. Kid's love secrets; particularly ones adults don't know.

You start off with 15 matches laid out on the ground. In practice you can use any small objects. Stones or shells are ideal which means it is a great game to introduce on the beach when the kids are getting restless.

The rules are very simple. Each person takes turns to remove either 1, 2 or 3 matches. You win if your opponent is left with the last match.

An Example Game

Number of Matches
Number of Matches Removed
Number of matches Left
You remove 2
Opponent removes 3
You remove 1
Opponent removes 2
You remove 2
Opponent removes 1
You remove 3
1 Opponent looses!

How Does it Work?

When you start, you first remove 2 matches. You are then guaranteed to win.

From then on, each time your opponent plays you make the count removed by you and your opponent up to 4. If they take 1 you take 3 if they take 2 you take 2 etc. This means your opponent is always left with the last match.

The key to this game is TARGET NUMBERS. You arrange it so you leave your opponent with:

13, 9, 5 and finally 1 match.

Once you've removed the first 2 matches, you keep making up the total removed in that round to 4.

Can you win if your opponent starts? Yes you can unless they understand how to win and begin with 2.

If they start with 1: you take away another 1 bringing you to your target number of 13 left.

If they start with 3, you remove another 3 making the target number 9.

Games Theory

A simple game like this is an example of what mathematicians call an Impartial, two-person game with Complete Information.

Impartial means that rules for moving apply equally to both players (unlike Chess, for example, which not impartial, because the white player can only move white pieces, and black can only move black pieces).

Complete information means that both players know the complete state of the game, in contrast to, for example, card games such as poker where one player does not know the cards held by the other player(s).

What if They Start and Remove 2?

Then you play randomly and try to reach a target number.

For Example:

START: 15 Matches

Opponent removes 2 matches (leaving 13)

You remove 2 (leaving 11)

Opponent removes 1 (leaving 10)

You can then remove 1 (leaving 9 - target number). You can now win.

Unless your opponent understands the trick they are almost certainly going to make a mistake and allow you to reach a target number before the end of the game.

Now you've mastered the game, try it out on your friends and your children. But remember, don't use your new found skills to cheat strangers in bars or pubs to buy you drinks. This could be illegal where you live and besides, you might make some powerful enemies!

© 2008 Rik Ravado


    0 of 8192 characters used
    Post Comment
    • profile image


      5 years ago

      Ive been shown a varation of this game where the sticks are in a pyramid. You can take any number of sticks from a row, but only one row. The game starts with 15 sticks as well.

    • Rik Ravado profile imageAUTHOR

      Rik Ravado 

      11 years ago from England


      Well done - your method is more generalised and more suitable if you want to vary the number of matches allowed - thanks for stopping by and adding this!

    • profile image


      11 years ago

      A tactic that applies to the game, doesn't matter how many matches there are:

      Makes sure, that after you remove 1-2 or 3 matches, the number of the remaining matches is equal to [ 1 + a number dividable by 4 without remainder].

      That is: 1 + X mod 4 = 1

      For example let's assume:

      X = 12

      with the previous equation

      1+12 mod 4 = 1

      thus in the game you'd have to make sure it's the opponent's turn if the count of remaining matches is 13.

      If the game starts with 15 matches, you pick first:

      You remove 2, because then what remains is 13:


      12 mod 4 = 0

      If the game starts with 20, you pick first:

      You remove 3, because then what remains is 17:


      16 mod 4 = 0

      Keep to this, and then the count of matches doesn't matter anymore;)


    • Rik Ravado profile imageAUTHOR

      Rik Ravado 

      11 years ago from England

      To Hubbers: I've updated this Hub using the new TABLE capsule!

    • Rik Ravado profile imageAUTHOR

      Rik Ravado 

      11 years ago from England

      K@ri - Yes kids love a secret that means they can beat adults at a game!

    • k@ri profile image

      Kari Poulsen 

      11 years ago from Ohio

      I can't wait to try this out with my kids! I may even let them in on the secret. :)

    • Rik Ravado profile imageAUTHOR

      Rik Ravado 

      11 years ago from England

      No it can be adapted to play with more matchsticks or even increase the number of matches you are allowed to remove at a time.

      So, for example, you could play it with say 20 matches and allow people to remove up to 4 matches at once.

    • 49er profile image


      11 years ago from USA

      I think this is a great game. I realize this would mess up the strategy, but is it always played with only 15 matchsticks?

    • profile image


      12 years ago

      I like your clear explanation of game theory.

    • Rik Ravado profile imageAUTHOR

      Rik Ravado 

      12 years ago from England

      Diana that sounds great - hope you have some success!

    • diana1000 profile image

      Diana Harvey 

      12 years ago from Philippines

      Hi Rik,

      Thank you so much for this Hub.

      There are many little kids where I live all hanging aroundthe little bars in hopes that someone will give them a few cents to buy some bread.

      Now I will get some shells which are in abundance on our beach and teach them. This will provide some amusement to the bar flys and ensure a loaf of bread for theses kids.

      I am now on my way to show them.

      Thank you


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)