Peter van Emde Boas: Games in Computation and Complexity Theory 20060925-26 Games in Computation and Complexity Theory Peter van Emde Boas ILLC-FNWI-Univ.

Slides:



Advertisements
Similar presentations
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Advertisements

Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Complexity Classes: P and NP
Lecture 24 MAS 714 Hartmut Klauck
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Cook’s Theorem The Foundation of NP-Completeness.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Study Group Randomized Algorithms 21 st June 03. Topics Covered Game Tree Evaluation –its expected run time is better than the worst- case complexity.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
Peter van Emde Boas: Games and Complexity Guangzhou 2009 Complexity, Speed-up and Compression Games and Complexity Peter van Emde Boas Guangzhou 2009 ©
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Peter van Emde Boas: Imperfect Information Games; looking for the right model. IMPERFECT INFORMATION GAMES looking for the right Model Peter van Emde Boas.
Peter van Emde Boas: Playing Savage SOFSEM 2000 Milovy PLAYING SAVITCH Peter van Emde Boas ILLC-FNWI-Univ. of Amsterdam Bronstee.com Software and Services.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Peter van Emde Boas: The Games of Computer Science, April 2000 THE CONNECTION BETWEEN GAMES AND COMPUTER SCIENCE Peter van Emde Boas ILLC-FNWI-Univ. of.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Peter van Emde Boas: Games and Computer Science 1999 Speed-up and Compression Theoretical Models 1999 Peter van Emde Boas References available at:
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
Peter van Emde Boas: Imperfect Information Games; what makes them Hard to Analyze. IMPERFECT INFORMATION GAMES; what makes them Hard to Analyze ? Peter.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
NP-complete and NP-hard problems
Chapter 11: Limitations of Algorithmic Power
Finite State Machines Data Structures and Algorithms for Information Processing 1.
Peter van Emde Boas: The Games of Computer Science. THE GAMES OF COMPUTER SCIENCE Peter van Emde Boas ILLC-FNWI-Univ. of Amsterdam References and slides.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
PSPACE-Completeness Section 8.3 Giorgi Japaridze Theory of Computability.
Definition: Let M be a deterministic Turing Machine that halts on all inputs. Space Complexity of M is the function f:N  N, where f(n) is the maximum.
Reading Osborne, Chapters 5, 6, 7.1., 7.2, 7.7 Learning outcomes
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 Chapter 9 PSPACE: A Class of Problems Beyond NP Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
Agents that can play multi-player games. Recall: Single-player, fully-observable, deterministic game agents An agent that plays Peg Solitaire involves.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
Peter van Emde Boas: Games and Computer Science 1999 GAMES AND COMPUTER SCIENCE Theoretical Models 1999 Peter van Emde Boas References available at:
Space Complexity. Reminder: P, NP classes P NP is the class of problems for which: –Guessing phase: A polynomial time algorithm generates a plausible.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
1 More About Turing Machines “Programming Tricks” Restrictions Extensions Closure Properties.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
CS 203: Introduction to Formal Languages and Automata
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
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.
G5AIAI Introduction to AI
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
1 Design and Analysis of Algorithms Yoram Moses Lecture 13 June 17, 2010
Time complexity Here we will consider elements of computational complexity theory – an investigation of the time (or other resources) required for solving.
Computability and Complexity
Turing Machines Acceptors; Enumerators
Geography Game Geography. Amy names capital city c of country she is in. Bob names a capital city c' that starts with the letter on which c ends. Amy.
Complexity 6-1 The Class P Complexity Andrei Bulatov.
Alternating tree Automata and Parity games
Theory of Computation Turing Machines.
Chapter 11 Limitations of Algorithm Power
Instructor: Aaron Roth
Instructor: Aaron Roth
Switching Lemmas and Proof Complexity
Presentation transcript:

Peter van Emde Boas: Games in Computation and Complexity Theory Games in Computation and Complexity Theory Peter van Emde Boas ILLC-FNWI-Univ. of Amsterdam References and slides available at: Workshop Logic & Games Kazimierz Dolny Sep 24-30, 2006 © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory Topics Relations Games and Computations Algorithmic Problems on Games and Game Models Complexity of problems on Games Games and PSPACE Other connections

Peter van Emde Boas: Games in Computation and Complexity Theory Non Topics Computer programs for game playing –Chess, go, bridge, poker, robot-soccer Computer Games –Pong, Doom, Civilization,..... Games, Logic and Language –That’s for the other tutorials ……

Peter van Emde Boas: Games in Computation and Complexity Theory Games and Computer Science © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory Are Games interesting at all ??? Past (1970/80) position of Games in Mathematics & CS: Study object for a marginal part of AI (Chess playing programs) Recreational Mathematics (cf. Conway, Guy & Berlekamp Theory) Game Theory (Economy): von Neumann, Morgenstern, Aumann, Games in Logic: Determinacy in set theory, Ehrenfeucht-Fraise Games,....

Peter van Emde Boas: Games in Computation and Complexity Theory A previous development Epistemic Logic used to be a strange topic in Philosophy up-to the early 1980-ies. But then at IBM its use for Distributed Computing was recognized and it became well fundable Computer Science: Fagin, Halpern, Moses, Vardi: Reasoning about Knowledge Biannual TARK conference series since 1986

Peter van Emde Boas: Games in Computation and Complexity Theory STACS’99 IN TRIER: Games !!! © Peter van Emde Boas

Peter van Emde Boas: Games in Computation and Complexity Theory Computer Science Theory Computation Theory Complexity Theory Machine Models Algorithms Knowledge Theory Information Theory Semantics

Peter van Emde Boas: Games in Computation and Complexity Theory Games in Computer Science Evasive Graph properties ( ) Information & Uncertainty (Traub ea ) Pebble Game (Register Allocation, Theory 1970+) Tiling Game (Reduction Theory ) Alternating Computation Model ( ) Interactive Proofs /Arthur Merlin Games (1983+) Zero Knowledge Protocols (1984+) Creating Cooperation on the Internet (1999+) E-commerce (1999+) Logic and Games (1950+) Language Games, Argumentation (500 BC)

Peter van Emde Boas: Games in Computation and Complexity Theory Games and Computation Computation: Set of Configurations, connected by transitions, with initial one and final ones; entire computation graph determines outcome: Accept, Reject, obtained value..... Game: Set of positions connected by moves, with initial one and final ones; entire Game graph determines outcome: Win, Loose, Utility Payoff What is the Difference ?????

Peter van Emde Boas: Games in Computation and Complexity Theory COMPUTATION Deterministic Nondeterministic Probabilistic Alternating Interactive protocols Concurrency

Peter van Emde Boas: Games in Computation and Complexity Theory COMPUTATION TREES Notion of Configurations: Nodes Notion of Transitions: Edges Non-uniqueness of transition: Out-degree > 1 - Nondeterminism Initial Configuration : Root Terminal Configuration : Leaf Computation : Branch Tree Acceptance Condition: Property of trees

Peter van Emde Boas: Games in Computation and Complexity Theory Types of Games Single player - no choices : Routine : Single player - choices : Solitaire : Two players – choices : Finite Combinatorial Games : Single player - random moves : Gambling : Two players - choices, randomness, information hiding: Several players - concurrent moves :

Peter van Emde Boas: Games in Computation and Complexity Theory Types of Games (and Computations) Single player - no choices : Routine : Deterministic Computation Single player - choices : Solitaire : Nondeterministic Computation Two players – choices : Finite Combinatorial Games : Alternating Computation Single player - random moves : Gambling : Probabilistic Algorithms Two players - choices, randomness, information hiding: Interactive Proof Systems Several players - concurrent moves : Multi Prover Systems

Peter van Emde Boas: Games in Computation and Complexity Theory The Questions © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory A Game…. X X O Questions: Termination ? Is there a winner ? If so, who ? And how does he do it ? Trivial ….. No ….

Peter van Emde Boas: Games in Computation and Complexity Theory A Game…. X X O Questions: Termination ? Is there a winner ? If so, who ? And how does he do it ? Trivial ….. Yes …. O X …. X

Peter van Emde Boas: Games in Computation and Complexity Theory A Game from H.W. Lenstra: Aeternitatem Cogita Questions: Termination ? Is there a winner ? If so, who ? And how does he do it ? Not evident: 50 moves rule… Unknown in general…..

Peter van Emde Boas: Games in Computation and Complexity Theory The game of HEX

Peter van Emde Boas: Games in Computation and Complexity Theory Position is winning for Green

Peter van Emde Boas: Games in Computation and Complexity Theory Green wins the game

Peter van Emde Boas: Games in Computation and Complexity Theory Questions about HEX: Termination ? Is there a Winner ? If so, Who ? And how does he achieve to win ….? trivial Topological argument => Draw is impossible ! Zermelo principle => There must be a winner ! Strategy-copy argument: It can’t be the second player who wins the game….. Unknown

Peter van Emde Boas: Games in Computation and Complexity Theory Why is a Draw impossible?

Peter van Emde Boas: Games in Computation and Complexity Theory A Mathematical Game Position: finite list of non negative numbers: 5, 5, 3, 4, 0, 1, 12 Move: replace a single number by a list of smaller numbers ( 0 only can be removed….. ) 5, 3, 3, 2, 0, 3, 4, 0, 1, 12 Player unable to move loses the game.

Peter van Emde Boas: Games in Computation and Complexity Theory Questions on the Mathematical Game: Termination ? Is there a winner ? If so, Who ? And how to win ….? Yes, based on set theory (Königs Lemma) Yes, but not grace to the Zermelo principle …. Parity principle: First player wins iff some number occurs with odd parity Establish position with even parities only…..

Peter van Emde Boas: Games in Computation and Complexity Theory de Bono’s L-Game Move: 1) remove your L-piece, and place it somewhere else 2) may move one of the neutral stones Board: 4 by 4 square Pieces: Red’s L-piece Greens’s L-piece 2 Neutral stones

Peter van Emde Boas: Games in Computation and Complexity Theory de Bono’s L-Game Move: 1) remove your L-piece, and place it somewhere else 2) may move one of the neutral stones Board: 4 by 4 square Pieces: Red’s L-piece Greens’s L-piece 2 Neutral stones

Peter van Emde Boas: Games in Computation and Complexity Theory de Bono’s L-Game Move: 1) remove your L-piece, and place it somewhere else 2) may move one of the neutral stones Board: 4 by 4 square Pieces: Red’s L-piece Greens’s L-piece 2 Neutral stones

Peter van Emde Boas: Games in Computation and Complexity Theory de Bono’s L-Game Move: 1) remove your L-piece, and place it somewhere else 2) may move one of the neutral stones Board: 4 by 4 square Pieces: Red’s L-piece Greens’s L-piece 2 Neutral stones

Peter van Emde Boas: Games in Computation and Complexity Theory de Bono’s L-Game Board: 4 by 4 square Pieces: Red’s L-piece Greens’s L-piece 2 Neutral stones Move: 1) remove your L-piece, and place it somewhere else 2) may move one of the neutral stones

Peter van Emde Boas: Games in Computation and Complexity Theory Move / Lost position Complete move for Red Lost Position for GreenInitial position

Peter van Emde Boas: Games in Computation and Complexity Theory Questions on L-Game: Termination ? Is there a winner ? If so, Who ? And how to do that ….? No – the game can run in cycles…. Some positiosn are determined, but not the intitial one Initial position is a draw due to infinite play….. Complicated; there exists a Database for this game….. Source: van Gijlswijk, J.J.O.O Wiegerinck et.al.: Computer Analysis of E. de Bono’s L-Game Rep. MI-UvA-76-18

Peter van Emde Boas: Games in Computation and Complexity Theory Time for Computer Science… In order to answer such questions the games must become input for some Computer Program How to represent a Game on the Computer ?

Peter van Emde Boas: Games in Computation and Complexity Theory Game Models © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory © Games Workshop URGAT Orc Big Boss THORGRIM Dwarf High King Introducing the Opponents Games involve strategic interaction......

Peter van Emde Boas: Games in Computation and Complexity Theory CONWAY’S PERSPECTIVE © Peter van Emde Boas SMC, Amsterdam A Game is a Set.

Peter van Emde Boas: Games in Computation and Complexity Theory A GAME IS A SET Pick an element, this is again a set Give it to the other player, it is now his turn Player looses if there is no element remaining: the empty set  represents the (unique) lost game Let’s play REALS !

Peter van Emde Boas: Games in Computation and Complexity Theory Another way of playing multisets A position is a finite collection of sets, repetitions allowed (multiset) A move consists of –Select one of the sets –Replace this set by a finite collection of its elements, repetitions allowed The player unable to move looses Why does this game terminate?

Peter van Emde Boas: Games in Computation and Complexity Theory Playing Multisets { A, A, B, B, B, C, D, E } ( B = { p, p, q, r, r, s, t } ) { A, A, B, B, p, q, q, s, s, t, C, D, E }

Peter van Emde Boas: Games in Computation and Complexity Theory Playing Multisets Game tree of the multiset game becomes infinite Tree representing an individual play of the multiset game is both Finitely Branching (due to the rules) and anti-well founded (due to well foundedness of sets) and therefore Finite on behalf of Königs Lemma Therefore the multiset game terminates.

Peter van Emde Boas: Games in Computation and Complexity Theory Game Trees Root Terminal node: Thorgrim looses Thorgrim’s turn Urgat’s turn Terminal node: Urgat looses Standard Interpretation: Player unable to move looses the game

Peter van Emde Boas: Games in Computation and Complexity Theory Game Trees Root Terminal node: Thorgrim’s turn Urgat’s turn Terminal node: Free Interpretation: Winner explicitly designated at terminal node T TU U T UT

Peter van Emde Boas: Games in Computation and Complexity Theory Game Trees Root Terminal node: Thorgrim’s turn Urgat’s turn Terminal node: Non Zero-Sum Game: Payoffs explicitly designated at terminal node 2 / 02 / 0 5 / -71 / 4 -1 / 4 3 / 13 / 1 -3 / 21 / -1

Peter van Emde Boas: Games in Computation and Complexity Theory Game Trees Root Terminal node: Thorgrim’s turn Urgat’s turn Terminal node: Free Interpretation: Winner explicitly designated at terminal node T TU U T UT SUB-GAME

Peter van Emde Boas: Games in Computation and Complexity Theory Game Graphs start U T An extension of the Game Tree model May contain cycles Acyclic Game Graphs as an intermediate model

Peter van Emde Boas: Games in Computation and Complexity Theory Backward Induction Terminal node: Thorgrim’s turn Urgat’s turn Free Interpretation: Winner explicitly designated at terminal node Root Terminal node: T TU U T UT T T U U U

Peter van Emde Boas: Games in Computation and Complexity Theory Backward Induction Root Terminal node: Thorgrim’s turn Urgat’s turn Terminal node: Non Zero-Sum Game: Pay-offs computed for all game nodes including the Root. 2 / 02 / 0 5 / -71 / 4 -1 / 4 3 / 13 / 1 -3 / 21 / -1 2 / 02 / 0 3 / 13 / 1 1 / 4 -3 / 2 1 / 4

Peter van Emde Boas: Games in Computation and Complexity Theory Backward Induction At terminal nodes: Pay-off as explicitly given At Thorgrim’s nodes: Pay-off inherited from Thorgrim’s optimal choice At Urgat’s nodes: Pay-off inherited from Urgat’s optimal choice For strictly competetive games this is the Max-Min rule Snag ! How to chose between equal utilities ….???! 2 / 02 / 0 5 / -71 / 4 -1 / 4 3 / 13 / 1 -3 / 21 / -1 2 / 02 / 0 3 / 13 / 1 1 / 4 -3 / 2 1 / 4 T T U U T UT T T U U U

Peter van Emde Boas: Games in Computation and Complexity Theory Zermelo Principle Zermelo Principle presents a sufficient condition for Backward Induction to be possible and correct : In a finite two person game tree where draws are impossible, one of the players must have a winning Strategy Original intended application: Chess. Extends to the case of Finite Acyclic Game Graphs

Peter van Emde Boas: Games in Computation and Complexity Theory Why Finitely Branching ? Game of Finity: Thorgrim: calls a random integer Urgat: decrements the number until it becomes zero and claims victory Any mathematician knows that this game is won by Urgat Backward Induction fails to prove so at every finite stage (there remain undecided successors of the initial position) BI has to be extended over ordinal time in this example at stage  + 1 the game is declared to be a win for Urgat U U U U.....

Peter van Emde Boas: Games in Computation and Complexity Theory Backward induction on Game Graphs T Initial labeling: only sinks are labeled. Player unable to move looses start T U Final labeling: iterative apply BI rules until no new nodes are labeled. Remaining nodes are Draw D D T U U U T T T T D D start U

Peter van Emde Boas: Games in Computation and Complexity Theory Bi-Matrix Games © Games Workshop Runesmith Dragon SquiggOgre R D OS 1/-1 -1/1 A Game specified by describing the Pay-off Matrix....

Peter van Emde Boas: Games in Computation and Complexity Theory Von Neumann’s Theorem ( )/2 :+ ( )/2+ © Games Workshop R D SO R D OS 1/-1 -1/1 Mixed Strategy Nash Equilibrium; no player can improve his pay-off by deviation.

Peter van Emde Boas: Games in Computation and Complexity Theory / 02 / 0 5 / -71 / 4 -1 / 4 3 / 13 / 1 -3 / 21 / -1 LR RL l r r r ll m lll llr lml lmr lrl lrr rll rlr rml rmr rrl rrr LL 1/-1 1/-1 1/-1 1/-1 1/-1 1/-1 -3/2 -3/2 -3/2 -3/2 -3/2 -3/ 2 LR 1/-1 1/-1 1/-1 1/-1 1/-1 1/-1 -3/2 -3/2 -3/2 -3/2 -3/2 -3/2 RL 2/ 0 3/ 1 1/ 4 1/ 4 5/-7 5/-7 2/ 0 3/ 1 1/ 4 1/ 4 5/-7 5/-7 RR -1/ 4 3/ 1 1/ 4 1/ 4 5/-7 5/-7 -1/ 4 3/ 1 1/ 4 1/ 4 5/-7 5/-7 Extensive and Strategic Form

Peter van Emde Boas: Games in Computation and Complexity Theory / 02 / 0 5 / -71 / 4 -1 / 4 3 / 13 / 1 -3 / 21 / -1 LR RL l r r r ll m lll llr lml lmr lrl lrr rll rlr rml rmr rrl rrr LL 1/-1 1/-1 1/-1 1/-1 1/-1 1/-1 -3/2 -3/2 -3/2 -3/2 -3/2 -3/ 2 LR 1/-1 1/-1 1/-1 1/-1 1/-1 1/-1 -3/2 -3/2 -3/2 -3/2 -3/2 -3/2 RL 2/ 0 3/ 1 1/ 4 1/ 4 5/-7 5/-7 2/ 0 3/ 1 1/ 4 1/ 4 5/-7 5/-7 RR -1/ 4 3/ 1 1/ 4 1/ 4 5/-7 5/-7 -1/ 4 3/ 1 1/ 4 1/ 4 5/-7 5/-7 Winning Strategy and Equilibrium

Peter van Emde Boas: Games in Computation and Complexity Theory Extensive vs. Strategic Form Game tree ===> Strategic Form Exponential Blow-Up in size Strategies deciding unreached positions Strategy is non-adaptive Representation is correct (for trees; but what about arbitrary game graphs)

Peter van Emde Boas: Games in Computation and Complexity Theory Extensive vs. Strategic Form Strategic Form ===> Game Tree Leads to games with incomplete information Strategy is non-adaptive Equilibria don’t always exist, Translation is doomed to fail…..

Peter van Emde Boas: Games in Computation and Complexity Theory Urgat doesn’t know the position he is in ! INCOMPLETE INFORMATION Thorgrim’s Choice of strategy Urgat’s Choice of strategy Pay-off phase

Peter van Emde Boas: Games in Computation and Complexity Theory A Real Life Game © Donald Duck 1999 # 35 Starting with 15 matches players alternatively take 1, 2 or 3 matches away until none remain. The player ending up with an odd number of matches wins the game A Game specified by describing the rules of the game....

Peter van Emde Boas: Games in Computation and Complexity Theory Complexity Theory © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory COMPLEXITY ENDGAME ANALYSIS Input Data: Game G, Position p in G Question: Is position p a winning position for Thorgrim ? for Urgat ? a Draw ? Relevant Issues: Game presentation, Game structure (tree, graph, description) Determinacy (Incomplete Information!)

Peter van Emde Boas: Games in Computation and Complexity Theory The Problem Thinking about simple games like Tic-Tac-Toe one considers the size of the game to be indicated by measures like: -- size configuration ( 9 cells possibly with marks) -- depth (duration) game (at most 9 moves) The full game tree is much larger : nodes (disregarding early terminated plays) And what about the size of the Strategic Form ???! What size measure should we use for complexity estimates ??

Peter van Emde Boas: Games in Computation and Complexity Theory The Problem The gap between the experienced sizes (configuration size & depth) and the size of the game tree / graph is exponential ! Another exponential gap with the strategic form ! Here: use configuration size and depth as size measures for input games. Estimate complexity of endgame analysis in terms of these sizes: the Wood Measure of the Game

Peter van Emde Boas: Games in Computation and Complexity Theory Why Worry About Representations? Algorithmic problem Instances Solutions Instance Format Question Instance Size Algorithm Space/Time Complexity The rules of the game called “Complexity Theory” Machine Model

Peter van Emde Boas: Games in Computation and Complexity Theory Games as Acceptors Input X is mapped to some game G(X) The mapping X  G(X) is easy to compute (computable in Polynomial Time or Logarithmic Space) Consequence: G(X) has a Polynomial Size Description. (Leaving open what the Proper Descriptions are. Works only when using Wood Measure....) L G := { X | G(X) has a winning strategy for the first player } Which Languages L can be characterized in this way ?

Peter van Emde Boas: Games in Computation and Complexity Theory The Folklore Belief Reasonable Games Capture PSPACE Many Conterexamples: -- Games to easy -- Solitaire games which are to hard -- Two person perfect information games to hard So what is the base for this belief ???

Peter van Emde Boas: Games in Computation and Complexity Theory REASONABLE GAMES Assumptions for the sequel: Finite Complete Information Zero Sum Games Structure: tree given by description, where deciding properties like is p a position ?, is p final ? is p starting position ?, who has to move in p ?, and the generation of successors of p are all trivial problems..... The tree can be generated And traversed in time proportional to its size..... Moreover the duration of a play is polynomial with respect to the Wood Measure.

Peter van Emde Boas: Games in Computation and Complexity Theory Backward Induction in PSPACE? The Standard Dynamic Programming Algorithm for Backward Induction uses the entire Configuration Graph as a Data Structure: Exponential Space ! Instead we can Use Recursion over Sequences of Moves: This Recursion proceeds in the game tree from the Leaves to the Root.

Peter van Emde Boas: Games in Computation and Complexity Theory Backward Induction in PSPACE? Recursive Scheme in case of absense of Draws: Let  denote a sequence of moves c denote a configuration denote the empty sequence of moves pos(  ) denotes the position obtained by playing  play(c) denotes the player who has to move in position c mov(c) the finite set of legal moves in c fin(c) denotes whether c is final winf(c) denotes the winner in position c in case c is final.

Peter van Emde Boas: Games in Computation and Complexity Theory Backward Induction in PSPACE? win(  ) := if fin( pos(  ) ) then winf( pos(  ) ) else ifplay( pos (  ) ) = Thorgrim thenif    mov( pos (  ) ) [ win( .  ) = Thorgrim ] thenThorgrim elseUrgat fi else if    mov( pos (  ) ) [ win( .  ) = Urgat ] thenUrgat elseThorgrim fi

Peter van Emde Boas: Games in Computation and Complexity Theory Backward Induction in PSPACE? This Recursive scheme combines recursion (over move sequence) with iteration (over locally legal moves). Correct only for determinated games! Space Consumption = O( | Stackframe |. Recursion Depth ) | Stackframe | = O( | Move sequence | + | Configuration| ) Recursion Depth = | Move sequence | = O( Duration Game ) So the game duration should be polynomial!

Peter van Emde Boas: Games in Computation and Complexity Theory Backward induction on Game Graphs start T U Initial labeling: only sinks are labeled. Player unable to move looses start T U Final labeling: iterative apply BI rules until no new nodes are labeled. Remaining nodes are Draw D D T U U U T T T T D D

Peter van Emde Boas: Games in Computation and Complexity Theory Analyzing a Graph If Thorgrim has no move the position is lost (in 0 moves) for Thorgrim If Urgat has no move the position is lost (in 0 moves) for Urgat If Thorgrim can move to a position which is lost (in k moves) for Urgat the position is won (in k+1 moves) for Thorgrim If Thorgrim only can move to positions which are won (in ≤ k moves) for Urgat the position is lost (in ≤ k+1 moves) for Thorgrim

Peter van Emde Boas: Games in Computation and Complexity Theory Analyzing a Graph If Urgat can move to a position which is lost (in k moves) for Thorgrim the position is won (in k+1 moves) for Urgat If Urgat only can move to positions which are won (in ≤ k moves) for Thorgrim the position is lost (in ≤ k+1 moves) for Urgat Apply the above rules until no new nodes are declared loss or won for any of the two players. The remaining nodes are Draws (for both players).

Peter van Emde Boas: Games in Computation and Complexity Theory Best Neighbour Algorithm Initially: assign to every position a safe neighbour (if possible); otherwise position is lost (in 0 moves). Repeat (round k+1) as long as changes occur: Look for wins: if some position in the last round was declared lost (in k moves), declare its parents won (in k+1 moves) (unless they were declared won previously): Reset safe neighbour: if your safe neighbour in the last round was declared won, try to find a new safe neighbour; if no more neighbours are available declare position lost (in k+1 moves) End Repeat; All remaining positions are declared Draw

Peter van Emde Boas: Games in Computation and Complexity Theory Best Neighbour Algorithm In this algorithm each edge is investigated at most once in every direction. Generating edges on the fly in stead of precomputing the entire game graph becomes advantageous. Original Result obtained by this method: E. de Bono’s L-game is a draw if played by a perfect player. The longest decisive play from a won position requires 9 moves.

Peter van Emde Boas: Games in Computation and Complexity Theory Incomplete Information Games © Games Workshop Runesmith Dragon Squigg Ogre R D OS 1/-1 -1/1 O S R D R D 1/-1

Peter van Emde Boas: Games in Computation and Complexity Theory Incomplete Information Games Indications of trouble….: -- Simple games no longer are determinated -- Information sets capture uncertainty -- Uniform strategies are required -- Earlier algorithms become incorrect WANTED: a complexity theory for Incomplete Information Games WARNING: such a complexity theory is unlikely to exist…..

Peter van Emde Boas: Games in Computation and Complexity Theory Games and PSPACE © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory THE HOLY QUADRINITY FINITE COMBINATORIAL GAMES QUANTIFIED PROPOSITIONAL LOGIC: ALTERNATION PSPACE UNRESTRICTED UNIFORM PARALLELISM

Peter van Emde Boas: Games in Computation and Complexity Theory Walter Savitch ICSOR; CWI, Aug 1976 San Diego, Oct 1983 © Peter van Emde Boas

Peter van Emde Boas: Games in Computation and Complexity Theory The Invariance Thesis Reasonable Sequential Machines Simulate Each Other with Polynomial overhead in Time and Constant Factor Overhead in Space M’ simulates M : …. ; no definition given T M’ ( x ) ≤ k.T M ( x ) k S M’ ( x ) ≤ k.S M ( x )

Peter van Emde Boas: Games in Computation and Complexity Theory Parallel Computation Thesis // PTIME = // NPTIME = PSPACE True for Computational Models which combine Exponential Growth potential with Uniform Behavior. The Second Machine Class

Peter van Emde Boas: Games in Computation and Complexity Theory UNDERSTANDING PSPACE The most Robust Complexity Class Solitaire Problem: finding an Accepting path in an Exponentially large, but highly Regular Graph Matrix Powering Algorithm: Parallelism Recursive Procedure: Savitch Theorem Logic: QBF, Alternation, Games

Peter van Emde Boas: Games in Computation and Complexity Theory Polynomial Space Configuration Graph Configurations & Transitions: –(finite) State, Focus of Interaction & Memory Contents –Transitions are Local (involving State and Memory locations in Focus only; Focus may shift). Only a Finite number of Transitions in a Configuration –Input Space doesn´t count for Space Measure

Peter van Emde Boas: Games in Computation and Complexity Theory Polynomial Space Configuration Graph Exponential Size Configuration Graph: – input length: |x| = k ; Space bound: S(k) –Number of States: q (constant) –Number of Focus Locations: k.S(k) t (where t denotes the number of “heads”) –Number of Memory Contents: C S(k) –Together: q.k.S(k) t. C S(k) = 2 O(S(k)) (assuming S(k) =  (log(k)) )

Peter van Emde Boas: Games in Computation and Complexity Theory Polynomial Space Configuration Graph Uniqueness Initial & Final Accepting Configuration: –Before Accepting Erase Everything –Return Focus to Starting Positions –Halt in Unique Accepting State Start Goal

Peter van Emde Boas: Games in Computation and Complexity Theory Path Finding in Configuration Graph

Peter van Emde Boas: Games in Computation and Complexity Theory Path Finding in Configuration Graph Cycles in accepting path are irrelevant Trash Nodes: Unreachable: or Useless

Peter van Emde Boas: Games in Computation and Complexity Theory Unreasonable Algorithm Step 1: generate Exponentially large structure Step 2: Perform Exponentially long heavy computation on this structure Step 3: Extract a single bit of information from the result - the rest of the efforts are wasted. :  ‘  And this is just what the Parallel Models do.....

Peter van Emde Boas: Games in Computation and Complexity Theory Unreasonable Algorithm Transitive Closure of Adjacency Matrix by Iterated squaring ==> // Models Recursive approaches ==> // Models, Savitch' Theorem & Hardness QBF and Games Playing Savitch: a direct connection between PSPACE and Games

Peter van Emde Boas: Games in Computation and Complexity Theory Adjacency Matrix Matrix describes Presence of Edges in Graph; 1 on diagonal: length zero paths M :=

Peter van Emde Boas: Games in Computation and Complexity Theory Adjacency Matrix In Boolean Matrix Algebra M 2 : Paths up to length 2 M 4 : paths up to length 4 M 2 = M 4 =

Peter van Emde Boas: Games in Computation and Complexity Theory Matrix Squaring M[i,j] := ( M[i,k] M[k,j] ) k On an N node graph, a single squaring requires O(N 3 ) operations Log(N) squarings are required to compute N-th Power of the Matrix Remember that N = 2 O(S)

Peter van Emde Boas: Games in Computation and Complexity Theory Think Parallel O( N 3 ) processors can compute these squarings in time –O( log(N)) if unbounded fan-in is allowed –O( log(N) 2 ) if fan-in is bounded This is the basis for recognizing PSPACE in polynomial time on PRAM models Don’t forget that the Matrix must be generated first ….. See Second Machine Class paper* and/or chapter in Handbook of TCS * Published in the proc’s of the 1985/86 Banach Center Workshop (Rasiowa)

Peter van Emde Boas: Games in Computation and Complexity Theory Recursive Matrix Squaring M[i,j,p+1] := ( M[i,k,p] M[k,j,p] ) k Log(N) recursion depth is required to compute N-th Power of the Matrix Log(N) recursion depth is required to replace N fold Iteration by Recursion Overall Recursion depth: Log(N) 2 M[i,j,0] is the given Adjacency Matrix

Peter van Emde Boas: Games in Computation and Complexity Theory Recursive Path Finding Reach(x,y,0) := x = y trans(x,y) Reach(x,y,p+1) :=  z [ Reach(x,z,p) Reach(z,y,p) ] Reach(x,y,p+1) :=  z [  u,v [ (u=x v=z) (u=z v=y) ==> Reach(u,v,p) ]] Rabin, Meyer & Stockmeyer trick! The Exponential Growth of the formula is prevented! Size ≈ O( S ). O(Rec-depth) Cook/Levin Formula

Peter van Emde Boas: Games in Computation and Complexity Theory Recursive Path Finding Space Consumption of Recursive Procedure: O( | stackframe |.depth ) In this case: | stackframe | and depth are both O(S) For path finding Nondeterminism of the original machine is irrelevant! Savitch Theorem: PSPACE = NPSPACE

Peter van Emde Boas: Games in Computation and Complexity Theory Quantified Boolean Formulas (QBF) INSTANCE: Formula of the form: F = Qx[Qy[Qz[….. [ P(x,y,z, …… ) ]]] … ] Where P is propositional and Q is  or  QUESTION: is F true ? THEOREM: QBF is PSPACE-Complete

Peter van Emde Boas: Games in Computation and Complexity Theory QBF as a LOGIC GAME Game is a Propositional Formula  (x 1,x 2,.... x n, y 1,y 2,.... y n ) THORGRIM and URGAT select values for the x i and y i in a specified order THORGRIM wins if the formula eventually evaluates to true: otherwise URGAT wins the game.

Peter van Emde Boas: Games in Computation and Complexity Theory QBF is PSPACE Hard Reach(x,y,0) := x = y trans(x,y) Reach(x,y,p+1) :=  z [ Reach(x,z,p) Reach(z,y,p) ] Reach(x,y,p+1) :=  z [  u,v [ (u=x v=z) (u=z v=y) ==> Reach(u,v,p) ]] The resulting formula is polynomial size and reduces an arbitrary PSPACE computation to QBF. Brute force Evaluation runs in PSPACE. Cook/Levin Formula

Peter van Emde Boas: Games in Computation and Complexity Theory QBF in PSPACE? There exists an evident Recursive Algorithm for QBF  x[ P(x,….)] --> ( P(0, …. )  P(1, …. ) )  x[ P(x,….)] --> ( P(0, …. )  P(1, …. ) ) Space consumption: O( Depth. | Stackframe | ) = O(L 2 ) where L = size input

Peter van Emde Boas: Games in Computation and Complexity Theory Some Direct Connections © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory THE HOLY QUADRINITY FINITE COMBINATORIAL GAMES QUANTIFIED PROPOSITIONAL LOGIC: ALTERNATION PSPACE UNRESTRICTED UNIFORM PARALLELISM

Peter van Emde Boas: Games in Computation and Complexity Theory PLAYING SAVITCH Usually the connection between PSPACE and Games is established indirectly, using either Alternation or QBF (or both) as intermediate. In the Literature occasionally the same holds for the reverse connection: (this game can be analyzed in PSPACE because it can be analyzed in Polynomial Time on a ATM....) A direct approach is possible !

Peter van Emde Boas: Games in Computation and Complexity Theory The Savitch Game Given: some input x for a PSPACE acceptor M (M can be nondeterministic) To Construct: a 2 person Complete Information reasonable Game G(M,x) such that x is accepted by M iff the first player has a winning strategy in G(M,x) WLOG: time accepting computation ≤ 2 (S(|x|))

Peter van Emde Boas: Games in Computation and Complexity Theory The Savitch Game Aethis Thorgrim © Games Workshop Typical Position: Configurations C 1, C 2 and Time Interval t 1 < t 2 | C 1 |, | C 2 | ≤ (S(|x|)), 0 ≤ t 1 < t 2 ≤ 2 (S(|x|)) ROUND of the Game : Thorgrim chooses t 3 such that t 1 < t 3 < t 2 Aethis chooses C 3 at t 3 Thorgrim decides to continue with either C 1, C 3 and t 1 < t 3 or C 3, C 2 and t 3 < t 2

Peter van Emde Boas: Games in Computation and Complexity Theory The Savitch Game Initial Position: C 1 is the startting position and C 2 the (unique) accepting Configuration. 0 = t 1 and t 2 = 2 (S(|x|)) Final Position: t 2 - t 1 = 1 Aethis wins if C 1 ---> C 2 is a legal transition; otherwise Thorgrim wins the game Polynomial duration enforced by requiring (t 2 - t 1 ).e ≤ (t 3 - t 1 ) ≤ (t 2 - t 1 ).(1-e) for some fixed e satisfying 0 < e ≤ 1/2

Peter van Emde Boas: Games in Computation and Complexity Theory The Savitch Game Winning Strategies: If x is accepted Aethis can win the game by being truthful (always play the true configuration in some Accepting Computation...) If x is not accepted the assertion entailed by the initial position is false. Regardless the configuration C 3 chosen by Aethis he must make a false assertion either on the first or on the second interval (or both). Thorgim wins by always attacking the false interval....

Peter van Emde Boas: Games in Computation and Complexity Theory The Savitch Game The Punchline: Endgame Analysis of the Savitch Game is in Deterministic PSPACE, even if the original acceptor was Nondeterministic: NPSPACE = PSPACE ! an Alternative (direct) proof of the Savitch Theorem....

Peter van Emde Boas: Games in Computation and Complexity Theory The Savitch Game Final remarks: Aethis can play his winning strategy if he knows the accepting computation. Thorgrim can play his winning strategy if he can locate errors. Utterly unfeasible.... And the new proof isn’t that much different..... Reach(x,y,p+1) :=  z [  u,v [ (u=x v=z) (u=z v=y) ==> Reach(u,v,p) ]] Move Aethis Move Thorgrim

Peter van Emde Boas: Games in Computation and Complexity Theory The Power of your Editor Typical sequential models with the power of parallelism: Vector Machines (Pratt, Rabin & Stockmeyer 74) MRAM (Hartmanis & Simon 74, Bertoni et. al 81) ASSM (Tromp & vEB 93) Vector Machines (Iwama & Iwamoto 98) But also a simple model of a Text Editor (EDITRAM) solves QBF in polynomial time. So have patience when your word processor makes you wait.....

Peter van Emde Boas: Games in Computation and Complexity Theory EDITRAM Program RAM Memory Integers Text files Cursors

Peter van Emde Boas: Games in Computation and Complexity Theory EDITRAM Instructions The standard RAM instructions on the main memory (store, load, store-I, load-I,....) Read at cursor position Write at cursor position Move cursor (one position, to address, to end,..) Copy segment of text (marked by pair of cursors) Systematic string replacement (literal strings only) : C / aab / aacba /

Peter van Emde Boas: Games in Computation and Complexity Theory EDITRAM Program for QBF 1. Eliminate Quantifiers and variables: Starting at innermost quantifier replace  x i F(...x i...) by ( F( )  F( ) )  x i F(...x i...) by ( F( )  F( ) ) 2. Eliminate connectives Working inside out evaluate logical connectives: C / (0  1) / 1 / etc. 3. The result is a literal 0 or 1. Read the answer. step 1 requires a subroutine for identifying and marking variables (due to literal only condition)

Peter van Emde Boas: Games in Computation and Complexity Theory Alternation © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory Alternating Computation Computation Tree Configuration Type Existential Universal Negating Accepting Rejecting Assumption: no infinite branches

Peter van Emde Boas: Games in Computation and Complexity Theory Alternating Computation Evaluation Full Computation Tree This Tree Accepts This is just backward induction on a game tree ; But what is the Game ?? Configuration Type: Game meaning Existential: Thorgrim moves Universal: Urgat moves Negating: Role Switch Accepting: win (for Thorgrim) Rejecting: Loose

Peter van Emde Boas: Games in Computation and Complexity Theory Negating Nodes ? Create for every node its dual node which yields the “same” transitions Dual of accepting node is rejecting Dual of rejecting node is accepting Dual of universal node is existential Dual of existential node is universal Dual of Dual is identity Replace every negating node by an existential one, dualizing the entire subtree below it (think de Morgan!)

Peter van Emde Boas: Games in Computation and Complexity Theory Eliminating Negating Nodes Dualized nodes

Peter van Emde Boas: Games in Computation and Complexity Theory Alternating Computation as a Game Negating states are unnecessary - by dualizing parts of the computation tree they can be removed. What remains is a Computation Game where both Thorgrim and Urgat control nondeterministic choices in the computation. Thorgrim wants the computation to accept. Urgat wants to prevent this from happening Infinite branches (if present) don’t contribute to the game value (non-trivial to prove)

Peter van Emde Boas: Games in Computation and Complexity Theory The Alternation Theorems THM 1: APTIME  PSPACE: Recursive evaluation of the quality of the root of the Alternating Computation Tree: Depth = O(time), | Stackframe | = O(time) Resulting Overhead: Square Can be improved to linear by storing only a constant amount of information in a stack-frame

Peter van Emde Boas: Games in Computation and Complexity Theory The Alternation Theorems THM 2: PSPACE  APTIME: QBF trivially can be solved by an ATM QBF is PSPACE-hard What Further Evidence do we Need?

Peter van Emde Boas: Games in Computation and Complexity Theory The Alternation Theorems THM 3: ALOGSPACE  PTIME: Iterative evaluation of the quality of the all nodes in the Alternating Computation Tree: #Nodes = Exponential in S; # Stages = O(# Nodes ) In terms of Games: This is Backward Induction on a Game Graph.

Peter van Emde Boas: Games in Computation and Complexity Theory The Alternation Theorems THM 4: PTIME  ALOGSPACE: Guess a Space-Time diagram of Accepting Computation, (thinking in terms of a correct tiling) starting from the “accepting” tile and moving Backwards in time: At cell X guess contents of three upper neighbors; Universally validate these three upper neighbors. THIS IS CORRECT DUE TO DETERMINISM!

Peter van Emde Boas: Games in Computation and Complexity Theory Guess and Validate “accepting Configuration” Coherence of validated Guesses is enforced from Top to bottom “Start Configuration”

Peter van Emde Boas: Games in Computation and Complexity Theory Tiling Games © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory Tiling Games Tile Type: square divided in 4 coloured triangles. Infinite stock available No rotations or reflections allowed Tiling: Covering of region of the plane such that adjacent tiles have matching colours Boundary condition: colours given along (part of) edge of region, or some given tile at some given position.

Peter van Emde Boas: Games in Computation and Complexity Theory Turing Machine Finite Control Program : P Tape Read/Write Head P  (Q   )  (Q    {L,0,R}) : (q,s,q’,s’,m)  P denotes the instruction: when reading s in state q print s’ perform move m and go to state q’. Nondterminism! Q: states  : tape symbols

Peter van Emde Boas: Games in Computation and Complexity Theory Computations Configuration c : finite string in  *(Q  )  * Computation Step c --> c’ obtained by performing an instruction in P Computation: sequence of steps Final Configuration: no instruction applicable Initial Configuration: start state & leftmost symbol scanned Complete Computation: computation starting in initial configuration and terminating in final one Accepting / Rejecting computation....

Peter van Emde Boas: Games in Computation and Complexity Theory Turing Machines and Tilings Idea: tile a region and let successive color sequences along rows correspond to successive configurations..... s s symbol passing tile s qs state accepting tiles q s qs q s’ qs instruction step tiles q’ s’ qs q’ q’s’ qs (q,s,q’,s’,0) (q,s,q’,s’,R) (q,s,q’,s’,L) SNAG: Pairs of phantom heads appearing out of nowhere... Solution: Right and Left Moving States....

Peter van Emde Boas: Games in Computation and Complexity Theory Example Turing Machine K = {q,r,_} S = {0,1,B} P = { (q,0,q,0,R), (q,1,q,1,R), (q,B,r,B,L), (r,0,_,1,0), (r,1,r,0,L), (r,B,_,1,0) } q B 0 q B 0 1 q0 1 1 B q1 1 B q1 B qB r1 B r1 0 B 0 1 r0 0 0 B B Successor Machine; adds 1 to a binary integer. _ denotes empty halt state = 12

Peter van Emde Boas: Games in Computation and Complexity Theory Reduction to Tilings q B 0 q B 0 1 q0 1 1 B q1 1 B q1 B qB r1 B r1 0 B 0 1 r0 0 0 B B © Peter van Emde Boas ;

Peter van Emde Boas: Games in Computation and Complexity Theory Implementation in Hardware © Peter van Emde Boas ; © Peter van Emde Boas ;

Peter van Emde Boas: Games in Computation and Complexity Theory Tiling reductions initial configuration accepting configuration/ by construction unique blank border space blank border time Program : Tile Types Input: Boundary condition Space: Width region Time: Height region

Peter van Emde Boas: Games in Computation and Complexity Theory Tiling Problems Square Tiling: Tiling a given square with boundary condition: Complete for NP. Corridor Tiling: Tiling a rectangle with boundary conditions on entrance and exit (length is undetermined): Complete for PSPACE. Origin Constrained Tiling: Tiling the entire plane with a given Tile at the Origin. Complete for co-RE hence Undecidable Tiling: Tiling the entire plain without constraints. Still Complete for co-RE (Wang/Berger’s Theorem). Hard to Prove!

Peter van Emde Boas: Games in Computation and Complexity Theory Two Person Tiling Game Desired property of the construction: A winning strategy for Thorgrim for the given instance corresponds to an Accepting Alternating Computation. Thorgrim wins by simulating a winning strategy on the Alternating Turing Machine (understood as game). Urgat, however has additional possibilities: he could attack the legality of the encoding of a Turing Machine computation..... Urgat therefore must be forced to stay within the constraints allowed by the encoding. Solved by Bogdan Chlebus.

Peter van Emde Boas: Games in Computation and Complexity Theory Conventions on ATM Tape uses even number of cells Universal and Existential States Alternate Left or Right moving States only All Instructions Move Unique Accepting Configuration

Peter van Emde Boas: Games in Computation and Complexity Theory Chlebus´ Bag of Tricks Thorgrim and Urgat, each obtain their own set of tile types; this is enforced by introducing two flavors of the vertical colors, indicated by a pink shade. Base Shading for Thorgrim Base Shading for Urgat Both borders of Rectangle to be tiled are shaded white.

Peter van Emde Boas: Games in Computation and Complexity Theory Chlebus´ Bag of Tricks Tiles types representing the Turing Machine instructions are replaced by pairs: Decide & Move s’ q’ qs q’s’ qs q’ q’s’ s’ Decide Move The blue shading indicates a right moving state q’ for left moving states use grey shading

Peter van Emde Boas: Games in Computation and Complexity Theory THORGRIM’S TILES s s s s q pass symbol & prevent intro from right pass symbol & force intro from right for Urgat q’ qs q’s’ s’ q’ qs q’s’ s’ Decide & move right Decide & move left qs s s q q accept from left accept from right

Peter van Emde Boas: Games in Computation and Complexity Theory URGAT’S TILES s s pass symbol; accept from right is prevented q’ qs q’s’ s’ q’ qs q’s’ s’ Decide & move right Decide & move left qs s s q q accept from left accept from right is forced q

Peter van Emde Boas: Games in Computation and Complexity Theory Other Games © Games Workshop

Peter van Emde Boas: Games in Computation and Complexity Theory GEOGRAPHY Objects Selected: Directed Edges Constraint: Edge is connected to the previously selected edge, and has not been selected before Winning: Player unable to move looses Morale: Both players build a maximal Eulerian Path.

Peter van Emde Boas: Games in Computation and Complexity Theory GEOGRAPHY The original Childrens game: Objects Selected: City names Constraint: Name starts with final letter of the name of the previous city Winning: Player unable to invent a new city name looses Question: Explain the graph formulation

Peter van Emde Boas: Games in Computation and Complexity Theory GEOGRAPHY is PSPACE HARD Proof: Reduction from QBF Special Contraints on QBF: Propositional Formula in CNF Qx 1 Qx Qx k [ C 1  C 2 ...  C m ] Q =  or , C j are clauses

Peter van Emde Boas: Games in Computation and Complexity Theory GEOGRAPHY is PSPACE HARD Component Design: Vars selection component for  x i followed by  x i+1 xixi xixi cici c i+1 didi xixi xixi cici didi selection component for  x i followed by  x i+1 if no alternation occurs the nodes d i and c i+1 are identified

Peter van Emde Boas: Games in Computation and Complexity Theory GEOGRAPHY is PSPACE HARD Component Design: Clauses cncn ykyk y1y1 ymym towards those x i and x i which occur in C 1 Here it is crucial that Urgat chooses for a clause and Thorgrim chooses a literal in the clause

Peter van Emde Boas: Games in Computation and Complexity Theory GEOGRAPHY is PSPACE HARD c 1 is the startnode First Player depends on the Type of First Quantifier: if it is Existential, Thorgrim will start the game as usual. Play: each play will first traverse the vars components and select a truth assignment. Subsequently Urgat selects a clause, Thorgrim one of its literals. Only if this literal node is unvisited in the first stage Urgat has a move left.

Peter van Emde Boas: Games in Computation and Complexity Theory STRATEGY MAPPING Players select truth values for their variables as in the QBF logic game. If now some clause is false Urgat can select it; and all literals chosen by Thorgrim will be unvisited, so Urgat still has a free move to a visited out-degree 1 node. Urgat wins. If all clauses are true Urgat must select a true clause, so Thorgrim can select a visited literal. Urgat can’t go anywhere. Thorgrim wins. NB! Urgat is to move, even if at this node Thorgrim had to move previously!

Peter van Emde Boas: Games in Computation and Complexity Theory Known Examples of Games used in Complexity Theory (1980+) Tiling Games (NP, PSPACE, NEXPTIME,....) Pebbling Game (Solitaire game !) (PSPACE) Geography (PSPACE) HEX (generalized or pure) (PSPACE) Checkers, Go (PSPACE) Block Moving Problems (PSPACE) Chess (EXPTIME) The Common View is that Games Characterize PSPACE

Peter van Emde Boas: Games in Computation and Complexity Theory Hard Solitaire Games Solitaire Games are in NP when a winning play can be guessed and validated OOPS! The game can require to many steps: repetition of moves and/or positions Typical Examples: Pebble Game Block Moving Games

Peter van Emde Boas: Games in Computation and Complexity Theory The Combinatorial Game perspective 26 th MFCS 2001 Marianske Lazne Aug 30 © Peter van Emde Boas Erik D. Demaine, LCS MIT birthdate: Feb Playing Games with Algorithms: Algorithmic combinatorial game theory URL :

Peter van Emde Boas: Games in Computation and Complexity Theory GAME OVER © Morris & Goscinny