ICAMP: Game Simulation and Analysis Analysis of the Game “Poison” Sarah Eichhorn University of California Irvine iCAMP Overview Meeting, 5/5/10.

Slides:



Advertisements
Similar presentations
Mod arithmetic.
Advertisements

Semantic of (Ongoing work with S. Hayashi, T. Coquand) Jouy-en-Josas, France, December 2004 Stefano Berardi, Semantic of Computation group C.S. Dept.,
Martin Boyd Christopher Hirunthanakorn
AE1APS Algorithmic Problem Solving John Drake.  Invariants – Chapter 2  River Crossing – Chapter 3  Logic Puzzles – Chapter 5  Matchstick Games -
AI for Connect-4 (or other 2-player games) Minds and Machines.
Nim, nim.py and games.py Homework 4 Problem 4. The History of Nim Games Believed to have been created in China; unknown date of origin First actual recorded.
Tutorial 6 of CSCI2110 Bipartite Matching Tutor: Zhou Hong ( 周宏 )
Top-Down Design CSC 161: The Art of Programming Prof. Henry Kautz 9/16/2009.
AE1APS Algorithmic Problem Solving John Drake..  Previously we introduced matchstick games, using one pile of matches  It is possible to have more than.
Progressively Finite Games
SCIT1003 Chapter 2: Sequential games - perfect information extensive form Prof. Tsang.
For the ultimate in entertainment, play with 2 or more people, individually or as a team Players alternate turns Each player picks an “answer” and must.
Games of probability What are my chances?. Roll a single die (6 faces). –What is the probability of each number showing on top? Activity 1: Simple probability:
VK Dice By: Kenny Gutierrez, Vyvy Pham Mentors: Sarah Eichhorn, Robert Campbell.
Domineering Solving Large Combinatorial Search Spaces.
Games Game 1 Each pair picks exactly one whole number The lowest unique positive integer wins Game 2: Nim Example: Player A picks 5, Player B picks 6,
Alfredo Perez Resident Mathematician Texas A&M University GK-12 Program.
CSE115/ENGR160 Discrete Mathematics 02/07/12
Arithmetic with integers (Day 1) Add, subtract, multiply, and divide.
Playing Konane Mathematically with Combinatorial Game Theory
Suppose an ordinary, fair six-sided die is rolled (i.e., for i = 1, 2, 3, 4, 5, 6, there is one side with i spots), and X = “the number of spots facing.
Using Reduction for the Game of NIM. At each turn, a player chooses one pile and removes some sticks. The player who takes the last stick wins. Problem:
Time for playing games Form pairs You will get a sheet of paper to play games with You will have 12 minutes to play the games and turn them in.
What is the probability that it will snow on Christmas day in Huntingdon?
Game Theory Statistics 802. Lecture Agenda Overview of games 2 player games representations 2 player zero-sum games Render/Stair/Hanna text CD QM for.
Poki: The Poker Agent Greg Priebe Zak Knudson. Overview Texas Hold’em poker Architecture and Opponent Modeling of Poki Improvements from past Poki Betting.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas in Computer Science.
Salvador Badillo-Rios and Verenice Mojica. Goal The goal of this research project was to provide an extended analysis of 2-D Chomp using computational.
By Kirsten Richards. What is Mancala?  Mancala is a board game that has been played for thousands of years  One of the oldest games around  You can.
The game of Craps Rules of play: 1. Played with two dice (six faces to a die – numbers 1-6 per face) 2. Sequence of betting rounds (or just rounds) 3.
Kim Moore, Program Manager Dr. Tonya Jeffery, Co-PI.
Brian Duddy.  Two players, X and Y, are playing a card game- goal is to find optimal strategy for X  X has red ace (A), black ace (A), and red two (2)
PowerPoint created by: AJ Thomas Date created: 1/29/14
Games People Play. 4. Mixed strategies In this section we shall learn How to not lose a game when it appears your opponent has a counter to all your moves.
Catch the Spirit of Mathematical Practices Mathematics Investigations Q-Cards: Rational Numbers The Q-Card game has 8 starter cards, 28 playing cards,
Section 3.1: Proof Strategy Now that we have a fair amount of experience with proofs, we will start to prove more difficult theorems. Our experience so.
Game theory Impartial Games.  Two-person games with perfect information  No chance moves  A win-or-lose outcome  Impartial games ◦ Set of moves available.
6 Sums of Games.. Lecture6 Admin Plagiarism forms Answer football cup final problem. //Daisy Problem hints e.g. try a smaller size. General problem solving.
Connect Four AI Robert Burns and Brett Crawford. Connect Four  A board with at least six rows and seven columns  Two players: one with red discs and.
Senior Project Poster Day 2007, CIS Dept. University of Pennsylvania Reversi Meng Tran Faculty Advisor: Dr. Barry Silverman Strategies: l Corners t Corners.
Lesson 10.6a AIM: Variations on Linear Nim. DO NOW.
WOULD YOU PLAY THIS GAME? Roll a dice, and win $1000 dollars if you roll a 6.
An Introduction to Game Theory Math 480: Mathematics Seminar Dr. Sylvester.
Winning Strategies of Games Played with Chips. I got a interesting game Now we show the game P 1 =4 P 2 =6 P 3 =8 Rule 1: Two players.
Bell Ringers Solve the following equations and write the commutative property equation and solve: (-74) + 54 (-87) + (-32) Solve the following equations.
Multiples and Factors. Multiples A multiple is a number that is in the times tables. A multiple is a number that is in the times tables. Multiples of.
The Lovely Game of NIM. Version 1 - Classic NIM You will need seven objects, such as counters or blocks. It is a game for two players. Place the 7 counters.
- Saie Deshpande. Game Design Idea 1 Can be played by or.
Benjamin Casey C S 329 E Spring  Variants played since ancient times; resemblance to Chinese “Jianshizi” or “picking stones”  Current name and.
03/05/13 More Induction Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1 Artist: Frank.
Randomness Exploring Computer Science Lesson 4-10 – Part 2.
Teaching Computers to Think:
Content Game of Nim Impartial Games Sprague-Grundy theorem
Introductory Game Theory
Great Theoretical Ideas in Computer Science
9.3 Nim Game (Game with matches)
Recitation #3 Tel Aviv University 2016/2017 Slava Novgorodov
Nim Game Lesson1 Compendium , page 173 Guidebook , page 127 THE LESSON Lesson Title: NIM lesson1 Date: Length of the Lesson: 45 minutes.
1-7 Adding and Subtracting Integers
Nim Game Lesson1 Compendium , page 173 Guidebook , page 127 THE LESSON Lesson Title: NIM lesson1 Date: Length of the Lesson: 45 minutes.
NIM - a two person game n objects are in one pile
Breakfast Bytes Easy, Hard, and Impossible
Team Dont Block Me, National Taiwan University
Each player can remove 1 or 2 pegs. Player who removes the last peg wins
Each player can remove 1 or 2 pegs. Player who removes the last peg wins
Intro To Integers.
Try starting with fewer objects to investigate.
D14 – Bellringer! Pick a game that you are very familiar with.
Game Theory Day 2: More Simple Games.
Presentation transcript:

iCAMP: Game Simulation and Analysis Analysis of the Game “Poison” Sarah Eichhorn University of California Irvine iCAMP Overview Meeting, 5/5/10

Rules of Poison Two players alternate turns There are 10 objects Each turn a player must take either 1 or 2 objects The player to take the last object loses and is “poisoned”

Questions: Is Poison a fair game? What is the best strategy for each player? Are there interesting variants of the game?

“ If you can't solve a problem, then there is an easier problem you can solve: find it.” - George Polya “How to Solve It”

# of ObjectsWinner

# of ObjectsWinner 1Player

# of ObjectsWinner 1Player 2 2Player

# of ObjectsWinner 1Player 2 2Player

or

# of ObjectsWinner 1Player 2 2Player 1 3 4Player

# of ObjectsWinner 1Player 2 2Player 1 3 4Player 2 5Player 1 6 7Player 2 8Player Player 2

Poison is an unfair game! With 10 objects, Player 2 should be able to win regardless of what Player 1 does. Could we predict who should win with more objects?

Modular Arithmetic Modular arithmetic basically only keeps track of the remainder when dividing by a given integer Ex.) 4=1(mod3) 5=2(mod3) 2=2(mod3) 3=0(mod3) 67=1(mod3)

# of ObjectsWinner 1Player 2 2Player 1 3 4Player 2 5Player 1 6 7Player 2 8Player Player 2

Player 2 wins if the # of objects=1(mod3) Otherwise, Player 1 wins Ex.) Poison with 2009 objects 2009/3= =2(mod3) Player 1 should have a winning strategy

Player 2 wins!

Winning Strategy If you are Player 2 when there are 10 objects, you would like to continue having it be your turn when # of objects=1(mod3) Therefore, your strategy is always to do the opposite of what your opponent does ie.) If the other player takes 1, you take 2. If the other player takes 2, you take 1.

Game Variants The variants of Poison are often called Nim Variants: Vary the number of objects Vary number of objects allowed to take per turn Nim Heaps – Piles of objects, on your turn you can remove any number of objects from a single pile, including the whole pile.

Game Theory and Adaptive Learning Can we write a program to train a computer to figure out the best strategy to play a game? Idea: - Start by picking moves randomly - Let the computer play game many times - Reward the moves that lead to a win and punish those leading to loss by weighting the “move” options

Conclusions You are now a Poison grand master and can always win (provided you can talk the other person to going first!) Computational game theory is an exciting area of mathematics with many interesting applications