I'm gonna show you a game which seems difficult But! I'f you learn one simple trick, and i'm serious it's genuinely this one simple trick The game becomes, so easy! Most people can be beaten by a piece of plastic, From the sixties.
-music- Here's the game of Dr.
Nim I managed to find and buy online It came in a fantastic original 1960s box check thatout You can tell us nineteen sixties Americabecause there's a wholesome family having fun with guns in the background! The gamestarts with the row Marbles along the top of the board there, and the goal isto take the last marble, whoever gets that one there wins the game, and eachtime you have a go you can choose to take one two or threemarbles.
but who am I going to play against? wellfor dr.
Nim you play, the piece of plastic itselfthere are levers and things that toggle and bars underneath it will make its ownmoves and in theory it will always beat me as the human i get the luxury ofgoing first there's a little toggle down here it is on the left and means it's Dr.
Nim's go, if it's on the right it's my go as a human and whenever Iwant to release a ball i just hit the button on the side there there goes the first one and you knowwhat, i'm going to do two marbles on my first go so now I move the lever over to Dr.
Nim'sside and to set Dr.
Nim going you hit the button once and it will choosehow many marbles that wants to take so here we go, going for one, oh wait it'sgone for a second one oh! So it took two marbles and then movedthe lever back over to indicate it's now my go well I only want one, so there's my oneand it's made it through, ever so often we get stuck I now go fine, dr.
Nim all yours I took one, what are you going to do?that's going for one, going for a second one its gone for a third one, and then switchedit back to my go okay there are four left, I think dr.
Nim may have me in a corner here, i'm going to take, oh goodness I'll go with two again there's- actualy you know what? Just one, I'll do one, and gonna go straight back to dr.
Nim, and you're on dr.
Nim one second, one and the winning third one and just torub it in as it winds it puts the lever back over, to say it's now my go.
No matter how many times you play doctorNim, the plastic jerk as long as the human goes first as longas you play by all the rules and don't cheat it will beat you every single time this is based on a mathematical gamecalled unsurprisingly, NIM, and this is a plastic computer that has been built tobe any human in a simplified version of NIM, NIM is a great game to play it likethis piece of plastic you're a big fan of beating other peopleand i'm going to teach you how to always win at NIMH so you can use it to annoy your friendsand family, – music- the game of NIM has been known aboutand studied by mathematicians for, well over a century, although people believe itpredates that by a long way specifically what we're looking at hereis a version of NIM called single pile NIM, for dr.
Nim all the marblescame off one row the version i'm going to show you, all these coins will be in asingle line technically proper NIM can have morethan one pile, but believe me the strategies for multi pile NIMH get a lot morecomplicated as very much another game for another video the way I would normally play NIMH in a baror similar setting against friends strangers you know, chumps, would be touse something like 12 coins we start from one end each player can take onetwo or three coins whoever takes the last coin wins while Iabsolutely never encourage any form of gambling if you were the kind of personwho would like to do that you and your opponent can both put some money on thegame put it under the last coin or token andwhoever takes that one gets the cash, in a similar vein many years ago we wereinvolved in setting up something called mass of asking where we went outside anddid busking with mathematics on the street one of the routines involved putting 12pigs on one of our buskers the 12 peg had 20 pounds underneath it very importantly 20 pounds of our moneybut we knew if we played the correct strategy we would always be able to winthe game and keep money some people found that pretty annoyingthey would go away come up with strategies come back trying to beat us, infact there are a few ways people can try and get you in a corner where you can nolonger win but I'll get to that in a moment to start with here's how you win 12 coin NIMH, a niceway to start is by looking at the end game i got myself in before with dr.
Nimi had for marbles left or in this case for coins it was my go, and i knew i couldn'tpossibly win, and if you get your opponent in this situation you can always winbecause if they take one you take three if they take to you take two they takethree you take one and they can't take four according to the rules, so the goal of the game is to getthem into this situation but how do you guarantee that situation well imagine it earlier in the game andthere are eight remaining and it's their go you've got the same deal going on withjust these four to leave these four left if they take one you take three theytake to you take two they take three you take one as long asbetween them and you you take for away you'll be left in that end game we can now go one step back to the verybeginning of the game where there are 12 coins all together you're thinking of them in lots of fourfor there for there for at the end for each round of full the other person goesfirst you go second you need to make sure youtake enough coins after their go so between you you have taken four intotal once you know what's going on it's a very straightforward game to winthey take one you take three they take to you take two they realizethey can't win they get annoyed you get the money the only problem arises when peoplerealize the trick themselves and this is what we had when we were basking peoplewould go away work it out come back and then theywould insist that we go first instead of them, so what you do is if anyof your friends caughten on to what you're doing the next time you reset it you do whatwe used to do you just take out an extra coin and put it on the end we wouldsuddenly increase the number of pegs to be greater than 12 you go first and you bring it down tothe now multiple of 4 it's they go and you're right back inyour winning situation -Some Extra Radical Music- so how does dr.
Nim the piece of plasticplay by those rules with the top we have the 12 marbles as we would expect and then underneath that we have aseries of these little toggling plastic Levers, they keep track of how manymodels have gone through the game so far and you can think of them as kind oflike a binary counter but it's not true binary it's more of a tally system thatkeeps track of the marbles you start with the leftmost one up andthe other two flat down the first model release drop the left one that raisesthe center one if I then send a second one it drops the things one raises theright one the third marble just restore the rightone to being flat only when there's a fourth marble yourleft my one get raised back up again and we're right back to where we startedthat repeats every set of four marbles after they've gotten through what arenow calling the paddles the marbles can go one of two different ways they caneither go to the left or they can go to the right, if its Dr.
Nim's turn andthe switches over on their side any marbles which go to the left willbump the switch over ending dr.
Nim's go any marbles which go to the right hit the button and release anothermarble so we need to save from the different arrangements of the top threepaddles and it keeps track from each set of 4 is the first second third or fourthball do they cause dr.
Nim's go to end? or dothey cause them to take another marble let's have a look i'll just cyclethrough a few marbles and will keep track first Marvel out ends dr.
names gosecond marble you take another ball third marble take another ball fourthmodel and the go and it carries on like that first one will end his go on theleft second one goes to the right take another one third one go to the righttake another one for one goes to the left ending their go so what does this mean for dr.
Nimsstrategy where you can imagine all 12 marbles at the beginning works in theirgroups of four and for each one it's dr.
him get to go on the firstfourth model they're going to call their go to an end if they get to have a go on the secondor third they're always going to carry on to another one when i first got thegame and I was investigating how it works actually found that a little bit oddbecause dr.
Nim doesn't have to end their go on the first marble in theorythe human is always going to have the first model from each set of 4 why is it designed to go to the left isit just easier to build that way It turns out if you read the admittedlycasually racist instruction manual you see they're acting all differentways of playing doc turn in their options for dr.
need to go first and youcan do the same trick you can give them extra marbles the doctor named will just take straightaway in there are other versions where you have a fighting chance there are some versions of this gamewhere you can actually beat dr.
Nim and that's what this little paddle here isfor is called the equalizer paddle and you can set that so initially doctornamed doesn't play with perfect strategy you get a chance at the beginning tobeat it but if you make one mistake it will takeover return to perfect play and you're not going to win, and that's why dr.
Nimhas to end its go on the first position as well as the fourth position it wouldonly end in the fourth position there are some versions of the gamewhere you may have ended at a whole round of four in that case dr.
Nim would take fourmarbles that's against the rules and it will have cheated and whoever designedthe dr.
Nim game to their credit they made in such a waythat it will never cheat it will always play within the rulesadmittedly in such a way that it would normally kick your ass so they are that is the game of dr.
Nim, I find it absolutely fascinating as an example of a very early computingbased game the instructions for all their drawbacksto go into a surprising amount of detail of the theory behind how dr.
Nimactually plays so you can see here there's a whole section next to thatfantastic caricature which talks all about whether or not machines canactually think, if you like this kind of real-world ridiculous physical computingthen you're going to love my Domino computer check it out – thousand dominoes arranged in a patternsuch as they can do binary arithmetic if you like this general concept offascinating mathematics of course make sure you subscribe to my stand-up masschannel and if you like winning drinks money or just admiration of your friendswhen you do that how to playing them and please do go beat them -Last bit of Epic Music-.