1 / 32

Games,Games,….

Games,Games,…. The Fruit Game aka NIM. Jonathan Choate Groton School www.zebragraph.com jchoate@groton.org. Wythoff’s NIM. Chuk-A-Luck. UnderCut. Sprouts. NIM.

annot
Télécharger la présentation

Games,Games,….

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Games,Games,…. The Fruit Game aka NIM Jonathan Choate Groton School www.zebragraph.com jchoate@groton.org Wythoff’s NIM Chuk-A-Luck UnderCut Sprouts

  2. NIM • Nim is a two person game played with piles of objects such as coins,M&Ms, etc. There can be three or more piles of 1 or more objects. A move consists of moving any amount from any one pile. The object of the game is to take the last object. Play alternates. Let’s play the game shown in the next slide.

  3. Pile 1 Pile 2 Pile 3

  4. The Secret to Winning at NIM • Need to be able to count in base 2

  5. 1. Express each pile in base 2 2. Sum up each column and see whether it is even or odd 3. If all the sums are even this is a losing position 4. If all the sums are odd this is a winning position

  6. To win the game you must keep your opponent always facing a losing position. Here is the key. You can always convert a winning position to a losing one by removing objects from any one pile. You can never convert a losing position to a winning one. Using this you can decide whether or not you should have gone first in our example game

  7. Using this you can decide whether or not you should have gone first in our example game. Since the opening position was odd, you should go first and remove one from the pile of 3. Convince yourself there is no move you can make that will convert 6,4,2 into a winning position.

  8. Sprouts This is a 2 person pencil and paper game. The game starts with 3 dots on a piece of paper. A move consists of joining two points with a segment ( it doesn’t have to be straight) and placing a new dot on the drawn segment. Players alternate moves and once a dot has three lines coming out of it, it can no longer be used. The last person to move wins

  9. Here is a typical game underway. The dots colored red Can not be used because they each have three lines coming out of them.

  10. Here is a completed game.

  11. There are lots of interesting questions about this game. Does the game have to end? If so after how many moves? Is there a shortest game? Is there a winning strategy? For more information about Sprouts go to http://www.sciencenews.org/sn_arc97/4_5_97/mathland.htm

  12. Wythoff’s Nim • This is a two player variation on NIM. There are two piles of objects. A move consists of removing any number of objects from either pile OR removing the same amount from each pile. The last person to move wins.

  13. Here is a graphical version of the game with piles of 17 and 16. A move consists of moving the red square any amount either vertically or horizontally OR any number of squares diagonally.

  14. The pictures below come from the web site Cut-The Knot and suggest a strategy for winning the game

  15. The table on the next page uses the following theorem. Let x>0 be an irrational number and let y = 1/x. Consider the sequence S = { int(1+x), int(2(1+x)), int(3(1+x)),… int(4(1+y)),int(2*(1+y)), int(3*(1+y)), . . . }. Then S contains every positive integer once. More on this can be found in Peter Schumer’s Mathematical Journeys.

  16. Chuk-A-Luck

  17. Rules • Three die are rolled and you can bet on a number from 1 to 6. He payoffs are • 1:1 if your number comes up once • 2:1 if your number comes up two times • 3:1 if your number comes up three times. Is this a fair game?

  18. It’s a fair game if the expected value E(X) is $0. • E(X) is equal to the probability you lose your bet times how much you bet plus the probability you win your bet times how much you win.

  19. Assume you bet $1 and you are betting on 6. The probability of getting no 6’s in three rolls of a die is equal to (5/6)(5/6)(5/6) = 125/216 The probability of getting 1 6 in three rolls of a die is equal to 3(1/6)(5/6)(5/6) = 75/216

  20. The probability of getting 2 6’s in three rolls of a die is equal to 3(1/6)(1/6)(5/6) = 15/216 The probability of getting 3 6’s in three rolls of a die is equal to 1(1/6)(1/6)(1/6) = 1/216

  21. Your expected value on a $1 bet is equal to ( -$1)(125/216) + ($1)(75/216) + ($2)(15/216) + ($3)(1/216) = -$17/216 ~-$.079 This means that you would expect to lose on the average almost 8 cents per game. Not great odds but a good deal for charities. For more on 3-die Chuck-A-Luck http://mathworld.wolfram.com/Chuck-a-Luck.html

  22. How about 4 Die Chuck-A-Luck? Assume you bet $1 and you are betting on 6. The probability of getting no 6’s in four rolls of a die is equal to (5/6)(5/6)(5/6)(5/6) = 625/1096 The probability of getting one 6 in four rolls of a die is equal to 4(1/6)(5/6)(5/6) )(5/6) = 500/1096

  23. The probability of getting 2 6’s in four rolls of a die is equal to 6(1/6)(1/6)(5/6)(5/6) = 30/1096 The probability of getting 3 6’s in four rolls of a die is equal to 4(1/6)(1/6)(1/6)(5/6) = 20/1096 The probability of getting 4 6’s in four rolls of a die is equal to 4(1/6)(1/6)(1/6)(1/6) = 4/1096

  24. Your expected value on a $1 bet is equal to ( -$1)(625/1296) + ($1)(500/1296) + ($2)(150/1296) ($3)(20/1296)+($4)(1/1296) = $239/1296 = ~$.18 This means that you would expect to win on the average almost 18 cents per game. Great odds, sell everything you own and play!!! Actually, not a great idea. Why?

  25. Undercut • This is a two player game. A play consists of each player writing a number between 1 and 5 in away that neither can see what the other wrote. Each player keeps a running total with the object of the game being the first to reach a total of 40 wins.

  26. The hitch is that if a player puts down a number that is one less than his opponent than he gets his number plus the opponent’s number and the opponent gets nothing. For example, if player A puts down 3 and player B puts down 4, player A gets 7 points and player B gets nothing. Is there a best strategy for playing Undercut?

  27. Game Theory can be used to analyze this game. One of the basic theorems in game theory kown as the Min-Max Theorem says that a rational player will play in a way that would insure getting the best of the worst. To use this, you need to construct a pay-off matrix.

  28. The Payoff Matrix For Undercut

  29. Assume that the row player will say 1 with a probability of a 2 with a probability of b 3 with a probability of c 4 with a probability of d 5 with a probability of e Since the best of the worst would be to break even, we get the following equations.

  30. 0a - 3b + 2c + 3d + 4e=0 3a + 0b - 5c + 2d + 3e=0 -2a + 5b + 0c - 7d + 2e=0 -3a -2b +7c + 0d - 9e =0 -4a -3b +2c + 9d + 0e =0 a+b+c+d+e = 1

  31. Here are the solutions a= 10/66 b= 26/66 c= 13/66 d= 16/66 e= 1/66 Surprised? For more on Undercut go to http://www.mathaware.org/mam/96/undercut/

More Related