Game theory Impartial Games.  Two-person games with perfect information  No chance moves  A win-or-lose outcome  Impartial games ◦ Set of moves available.

Slides:



Advertisements
Similar presentations
Extensible Networking Platform CSE 240 – Logic and Discrete Mathematics Review: Mathematical Induction Use induction to prove that the sum of the.
Advertisements

Business Blockbusters
Racquetball is a competitive game in which a racquet is used to serve and return a ball.
Introduction to Combinatorial Game Acm Honored Class Weitao.
Game Theory, Part 1 Game theory applies to more than just games. Corporations use it to influence business decisions, and militaries use it to guide their.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
Integer Tic Tac Toe Let’s Begin Rules: 1.Erase all x’s and o’s from the previous game before you begin. 2.Decide which player will be x’s and which will.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Top-Down Design CSC 161: The Art of Programming Prof. Henry Kautz 9/16/2009.
Rules for Classroom Play. Setup 1. Remove blue ACTION cards from the Observatory deck 2. Shuffle both decks well and set Volcano deck to one side 3. Deal.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
Progressively Finite Games
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:
Minority Games A Complex Systems Project. Going to a concert… But which night to pick? Friday or Saturday? You want to go on the night with the least.
Game Playing CSC361 AI CSC361: Game Playing.
The Game of Contorted Fractions. 2 Rules of the Game Typical position has a number of real numbers in boxes. The typical legal move is to alter just one.
View from 30,000 feet and Introduction to Graph Problems Lecture 19 CS 312.
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:
Games, Hats, and Codes Mira Bernstein Wellesley College SUMS 2005.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas in Computer Science.
In S.T.E.M we do Science, Technology, Engineering, Maths. So far we have only done Maths… We have also played many games in our sessions. Here are a few:-
Game Playing. Introduction Why is game playing so interesting from an AI point of view? –Game Playing is harder then common searching The search space.
To accompany Quantitative Analysis for Management,9e by Render/Stair/Hanna M4-1 © 2006 by Prentice Hall, Inc. Upper Saddle River, NJ Module 4 Game.
Game Theory Warin Chotekorakul MD 1/2004. Introduction A game is a contest involving to or more players, each of whom wants to win. Game theory is the.
Twenty Questions … all about tennis! Twenty Questions
A few leftover Decrease-and-conquer Algorithms
Click here for USACO solutions! …just kidding. (You still have until the end of today to take it!)
Impartial Games, Nim, Composite Games, Optimal Play in Impartial games
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.
Recursion 1. Jump It  board of n squares, n >= 2  start at the first square on left  on each move you can move 1 or 2 squares to the right  each square.
Space Complexity. Reminder: P, NP classes P NP is the class of problems for which: –Guessing phase: A polynomial time algorithm generates a plausible.
Decision Theory: Outcomes and Consequences Not Considered Decision Outcomes Consequences Decision: choose between betting on green or red chip. Objective:
Game theory is the study of the best play–safe strategy to adopt if 2 players are playing a game where decisions affect each other. Ex Two men are caught.
Adversarial Games. Two Flavors  Perfect Information –everything that can be known is known –Chess, Othello  Imperfect Information –Player’s have each.
Lesson 10.6a AIM: Variations on Linear Nim. DO NOW.
Rules Of Chess!!!!!! By: Caylin Stappenbeck. Table Of Contents!!!! Rules*** Conclusion***
CSS342: Quantifiers1 Professor: Munehiro Fukuda. CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but.
An Introduction to Game Theory Math 480: Mathematics Seminar Dr. Sylvester.
A Closer Look at Game Theory: The Hat Puzzle By Julia Greenberger.
6.5 Find Expected Value MM1D2d: Use expected value to predict outcomes. Unit 4: The Chance of Winning!
By Kevin Sandhu. Pick a Deck 5 decks to choose from Each player gets 20 life points Each player cuts the others deck Untap all cards at beginning Draw.
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.
Easy, Hard, and Impossible Elaine Rich. Easy Tic Tac Toe.
Random Numbers Random numbers are extremely useful: especially for games, and also for calculating experimental probabilities. Formula for generating random.
Integer Football Welcome to Integer Football!
Picking Apples. Subtraction game. Turn over two cards from 0-10 Work out the difference. If you have an apple with this amount put a counter on it. First.
Find Expected Value.  A collection of outcomes is partitioned into n events, no two of which have any outcomes in common. The probabilities of n events.
CS12230 Introduction to Programming Extra example– More on responsibilities 1.
GAME THEORY Day 5. Minimax and Maximin Step 1. Write down the minimum entry in each row. Which one is the largest? Maximin Step 2. Write down the maximum.
Adversarial Search. Regular Tic Tac Toe Play a few games. –What is the expected outcome –What kinds of moves “guarantee” that?
Space Complexity. Reminder: P, NP classes P is the class of problems that can be solved with algorithms that runs in polynomial time NP is the class of.
Lecture Coursework 2. Rectangle Game Look at proof of matchsticks Read thru the question. A rectangular board is divided into m columns by n rows. The.
Strategies for playing the dice game ‘Toss Up’ Roger Johnson South Dakota School of Mines & Technology April 2012.
9.2 Mixed Strategy Games In this section, we look at non-strictly determined games. For these type of games the payoff matrix has no saddle points.
Expected Value and Fair Game S-MD.6 (+) Use probabilities to make fair decisions (e.g., drawing by lots, using a random number generator). S-MD.7 (+) Analyze.
Chapter 5 Adversarial Search. 5.1 Games Why Study Game Playing? Games allow us to experiment with easier versions of real-world situations Hostile agents.
Content Game of Nim Impartial Games Sprague-Grundy theorem
1 Decisions in games Minimax algorithm  -  algorithm Tic-Tac-Toe game Decisions in games Minimax algorithm  -  algorithm Tic-Tac-Toe game.
Name 8/29/17.
Some more Decrease-and-conquer Algorithms
Introductory Game Theory
Great Theoretical Ideas in Computer Science
Game Playing.
Day 2 (same introduction)
The World Chess Championship is decided over twelve games
Breakfast Bytes Easy, Hard, and Impossible
Try starting with fewer objects to investigate.
Click on “Slide Show” and “From Beginning
11.4 Mathematical Induction
Presentation transcript:

Game theory Impartial Games

 Two-person games with perfect information  No chance moves  A win-or-lose outcome  Impartial games ◦ Set of moves available from any given position is the same for both players  partizan games ◦ Each player has a different set of possible moves from a given position ◦ Eg: Chess

 We start with ‘n’ coins, in each turn the player can take away 1, 3 or 4 coins  Question: ◦ What is the value of ‘n’ for which the first player can win the game if both the players play optimally ??

 L – Losing position  W – Winning position  0,2,7,9,14,16,… are losing positions  7N,7N+2 are losing positions for N>=0 LWLWWWWLWLWWWWLW

 All terminal positions are losing.  If a player is able to move to a losing position then it is a winning position.  If a player is able to move only to the winning positions then it is a losing position.

boolean isWinning(position pos) { moves[] = possible positions to which we can move from the position pos; for (all x in moves) if (!isWinning(x)) /* can move to Losing pos */ return true; return false; }

 

 There are ‘n’ piles of coins.  In each turn a player chooses one pile and takes at least one coin from it. If a player is unable to move he loses.

 Let n1, n2, … nk, be the sizes of the piles. It is a losing position for the player whose turn it is if and only if n 1 xor n 2 xor.. xor n k = 0.  Why does it work ??

 From the losing positions we can move only to the winning ones: - if xor of the sizes of the piles is 0 then it will be changed after our move  From the winning positions it is possible to move to at least one losing: - if xor of the sizes of the piles is not 0 we can change it to 0 by finding the left most column where the number of 1s is odd, changing one of them to 0 and then by changing 0s or 1s on the right side of it to gain even number of 1s in every column.

int grundyNumber(position pos) { moves[] = possible positions to which I can move from pos set s; for (all x in moves) insert into s grundyNumber(x); //return the smallest non-negative integer //not in the set s; int ret=0; while (s.contains(ret)) ret++; return ret; }

    kodefest-solutions/87-problem-e kodefest-solutions/87-problem-e     SRM 330 DIV I Hard

   lem/C lem/C  EASY DP:

 ry/comb.pdf ry/comb.pdf  Static&d1=tutorials&d2=algorithmGames Static&d1=tutorials&d2=algorithmGames