Win Every Bet with this Math Game
Want to beat your friends or show your amazing strategy skills? Learn this simple trick
Lots of games you play nowadays involve a combination of luck and strategy. Wordle is taking the world by storm and although one may argue that if played to win instead of winning in the least amount of turns, Wordle requires strategy but luck still plays a small part. Another example I can think of is Monopoly. You know, roll a dice hoping it lands on the property you want, buy, sell, hold and repeat.
This is obviously simplified but you get where I'm going with this. But what about games that require no luck, but pure strategy? What if I said there was such a game, and no I'm not talking about chess or checkers. What if I told you there was a game less complex but just as beautiful? Let me introduce you to Nim.
I stumbled across Nim a month ago and since I've been hooked. Playing Nim stop against computers and experimenting with different variations. The thing with Nim is that it's purely strategy and luck will never be on your side except if your opponent knows the strategy I'm about to show you. So how do you beat a computer that will make moves with absolute efficiency? How can you beat your friends and look smug doing so? Well, you're in the right place. In this article I will detail the exact strategy to beat the game and win every time as well as providing gameplay. Without further ado, let's begin. Nim is a fairly straightforward game with a very simple set of rules. For simplicity I will focus on Nim played with a set of 3, 5 and 7 heaps.
Marianne Freiberger explains it perfectly by saying, "There are two players. When it's a player's move he or she can take any number of coins from a single heap. They have to take at least one coin, though, and they can't take coins from more than one heap. The winner is the player who makes the last move, so there are no coins left after that move." Pretty simple, right?
For this method we will use something known as the Nim sum or Nim addition. Basically you will arrange each heap as a sum of 4, 2 and 1. For example 3 can be written as (2*1)+(1*1). 5 is written as (4*1)+(1*1) and lastly 7 is written as (4*1)+(2*1)+(1*1). This table can help simplify things further. If you're familiar with binary, this will familiar to you.
Taking a look at the table, we have an uneven number of pairs of 1. In order to win, you must make sure that after your turn the number of pairs of each number is equal. In this case you will go first and remove 1 stone from the heap of 3. Now we have this configuration.
Let's say Player 2 removes 1 stone from the heap of 5.
In order to even out the pairs remove 1 stone from the heap of 7.
Player 2 then removes 1 stone from the heap of 4.
Now you will remove 5 stones from the heap of 6.
Player 2 removes 1 stone from the heap of 2.
Now remove 2 stones from the heap of 3.
Although this isn't an even set of pairs this is the only way to ensure that player 2 will get the last stone.
Player 2 then removes one stone from the middle heap then you remove one stone from any of the remaining heaps of 1 and win. It's that simple. If you want to challenge yourself you can add variations to the game such as making it 1, 3, 5 and 7.
The next time you have a social gathering introduce this game to your friends.
This artice was originally published on Medium.com.