Introduction to Combinatorial Game Acm Honored Class Weitao.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

ICAMP: Game Simulation and Analysis Analysis of the Game “Poison” Sarah Eichhorn University of California Irvine iCAMP Overview Meeting, 5/5/10.
Planar graphs Algorithms and Networks. Planar graphs2 Can be drawn on the plane without crossings Plane graph: planar graph, given together with an embedding.
CIS Intro to AI 1 Interpreting Line Drawings & Constraint Satisfaction II Mitch Marcus CIS 391 – Fall 2008.
AE1APS Algorithmic Problem Solving John Drake.  Invariants – Chapter 2  River Crossing – Chapter 3  Logic Puzzles – Chapter 5  Matchstick Games -
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
4 Games and Fuses U:\APPS\Ghostgum\gsview Shared folder U:\2nd Year Share\Computer Science Courses\Semester One\Algortithmic Problem Solving Book: Algorithmic.
The Wonderful World of Hackenbush Games And Their Relation to the Surreal Numbers.
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.
AE1APS Algorithmic Problem Solving John Drake..  Previously we introduced matchstick games, using one pile of matches  It is possible to have more than.
Place captured red pieces here Place captured yellow pieces here To use as Kings Rules New Game Exit Left mouse click on piece – drag to desired location.
Progressively Finite Games
New Toads and Frogs Results By Jeff Erickson Presented by Nate Swanson.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
The Game of Nim on Graphs: NimG Gwendolyn Stockman Alan Frieze and Juan Vera.
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,
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.
CSE115/ENGR160 Discrete Mathematics 02/07/12
The Game of Nim on Graphs: NimG By Gwendolyn Stockman With: Alan Frieze, and Juan Vera.
CHECKMATE! A Brief Introduction to Game Theory Dan Garcia UC Berkeley The World Kasparov.
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.
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:
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.
Graphs, relations and matrices
Games, Hats, and Codes Mira Bernstein Wellesley College SUMS 2005.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas in Computer Science.
Game Playing.
A few leftover Decrease-and-conquer Algorithms
Part II - Sums of Games Consider a game called Boxing Match which was defined in a programming contest m.short.html.
Impartial Games, Nim, Composite Games, Optimal Play in Impartial games
Objective: Students will add integers using models and rules (11-3).
Foundations of Discrete Mathematics
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.
TECH Computer Science Problem: Selection Design and Analysis: Adversary Arguments The selection problem >  Finding max and min Designing against an adversary.
©2009, Tom McKendree Biplanes ©2009, Tom McKendree.
Crystal Bennett Joshua Chukwuka Advisor: Dr. K. Berg.
The length of vertex pursuit games Anthony Bonato Ryerson University CCC 2013.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
Conditional combinatorial games Martin Muller 報告人 : 張歐丞.
1 Parallel Model Checking Game for CTL Lecture 6 – Lecturer: Orna Grumberg.
Lesson 10.6a AIM: Variations on Linear Nim. DO NOW.
Discrete Mathematical Structures: Theory and Applications
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.

M Clements Formal Network Theory. Introduction Practical problem – The Seven Bridges of Königsberg Network graphs Nodes & edges Degrees Rules/ axioms.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Coin Turning Games By: Lauren Quattrocchi. What are Coin Turning Games? -Coin turning games are a class of combinatorial games in which there are a finite.
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.
More Induction Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 A Pork-Butchers Shop Seen from a Window Van Gogh.
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.
Benjamin Casey C S 329 E Spring  Variants played since ancient times; resemblance to Chinese “Jianshizi” or “picking stones”  Current name and.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
K 3 -Saturator By Roy Oursler. What is K 3 -Saturator K 3 -Saturator is a combinatorial game A combinatorial game is a two player game where both of the.
Content Game of Nim Impartial Games Sprague-Grundy theorem
MAT 110 Workshop Created by Michael Brown, Haden McDonald & Myra Bentley for use by the Center for Academic Support.
Algorithms and Networks
Some more Decrease-and-conquer Algorithms
Introductory Game Theory
MA/CSSE 473 Day 19 Sleepsort Finish Nim Josephus problem
Great Theoretical Ideas in Computer Science
Nim, nim.py and games.py Homework 4 Problem 4.
Planarity Testing.
CS 583 Analysis of Algorithms
Duo By: Fernando & Vivian.
Strike it out.
Team Dont Block Me, National Taiwan University
Presentation transcript:

Introduction to Combinatorial Game Acm Honored Class Weitao

Sprouts

Rules The game is played by two players, starting with a few spots drawn on a sheet of paper. Players take turns, where each turn consists of drawing a line between two spots (or from a spot to itself) and adding a new spot somewhere along the line. The players are constrained by the following rules.

Rules The line may be straight or curved, but must not touch or cross itself or any other line. The new spot cannot be placed on top of one of the endpoints of the new line. Thus the new spot splits the line into two shorter lines. No spot may have more than three lines attached to it. For the purposes of this rule, a line from the spot to itself counts as two attached lines and new spots are counted as having two lines already attached to them. In so-called normal play, the player who makes the last move wins. In misère play, the player who makes the last move loses.

Combinatorial Game There are two players. There is a set, usually finite, of possible positions of the game. The rules of the game specify for both players and each position which moves to other positions are legal moves. If the rules make no distinction between the players, that is if both players have the same options of moving from each position, the game is called impartial; otherwise, the game is called partizan. The players alternate moving. The game ends when a postion is reached from which no moves are possible for the player whose turn is to move. The game ends in a finite number of moves no matter how it is played.

The Game of Nim The most famous take-away game is the game of Nim, played as follows. There are three piles of chips containing x1, x2, and x3 chips respectively. Two players take turns moving. Each move consists of selecting one of the piles and removing chips from it. You may not remove chips from more than one pile in one turn, but from the pile you selected you may remove as many chips as desired, from one chip to the whole pile. The winner is the player who removes the last chip.

P-positions and N-positions Winning for the Previous player Winning for the Next player to move Characteristic Property: (1)All terminal positions are P-positions. (2) From every N-position, there is at least one move to a P- position (3) From every P-position, every move is to an N-position.

Algorithm Recursion Step 1: Label every terminal position as a P-position. Step 2: Label every position that can reach a labelled P- position in one move as an N-position. Step 3: Find those positions whose only moves are to labelled N-positions; label such positions as P-positions. Step 4: If no new P-positions were found in step 3, stop; otherwise return to step 2.

Nim-Sum a1,a2,a3,……an Nim-Sum=a1^a2^...^an

Theorem of C.L. Bouton A position, (x1, x2, x3,...,xn), in Nim is a P-position if and only if the nim-sum of its components is zero, x1^x2^x3^...^xn=0.

Proof All terminal positions are in P. From each position in N, there is a move to a position in P Every move from a position in P is to a position in N

Graph Games A two-person game played on a directed graph with no cycles a starting position x0 ∈ X and using the following rules: (1) Player I moves first, starting at x0. (2) Players alternate moves. (3) At position x, the player whose turn it is to move chooses a position y ∈ F(x). (4) The player who is confronted with a terminal position at his turn, and thus cannot move, loses

Minimal Excludant the smallest non-negative integer not in the set mex{0,1,2,4}=3; mex{}=0;

The Sprague-Grundy Function g(x) = mex{g(y) : y ∈ F(x)}

Character If x is a terminal position, g(x) = 0. At postions x for which g(x)=0, every follower y of x is such that g(y)!=0 At postions x for which g(x)!=0,there is at least one follower y such that g(y)=0

The Sprague-Grundy Theorem A position, (x1, x2, x3,...,xn), is a P-position if and only if G(x1)^G(x2)^G(x3)^...^G(xn)=0

Examples poj1704,2425,2311

Reference 《 GAME THEORY 》 Thomas S. Ferguson 《超高端桌游:一点一线烧糊你的大脑》 junglerubik Wikipedia

Thanks!