380 likes | 501 Views
So you think you can Play this Game. Symposium Driven by Search Univ. Maastricht May 24 2011. Peter van Emde Boas & Lena Kurzen ILLC-FNWI-Univ. of Amsterdam Bronstee.com Software & Services. Original Research Topic TACTICS.
E N D
So you think you can Play this Game Symposium Driven by Search Univ. Maastricht May 24 2011 Peter van Emde Boas & Lena Kurzen ILLC-FNWI-Univ. of Amsterdam Bronstee.com Software & Services
Original Research Topic TACTICS • Game Playability: the relation between complexity aspects of games and human capabilities of actually playing the game. • Interdisciplinary between Formal and Social/Economical science • CREED eventually didn’t participate
Complexity • In the context of games various complexity notions are relevant • Size Game Tree • Size Game Graph (State-Space Complexity) • Computational Complexity of Solving Game (End-game Analysis, Winner Determination, Computation Strategy) • Time/Space Complexity Measures
Common Belief about Games • (End)-game Analysis of Reasonable Games can be performed in PSPACE • For many Games this problem is in fact PSPACE-hard • Snag: this problem sometimes is even harder (EXPTIME)
Why is (End)-game 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: The analysis of the Recursive algorithm exposes the implicit assumptions on Reasonable Games which make this approach valid.
Playability Implicit Reasonability Assumptions for Game Analysis: We deal with Perfect Information Games represented by a Tree or AcyclicGraph of Configurations Deciding questions like: is p a position ?, is p final ? is p starting position ?, who has to move in p ? is p q a legal move ? and the generation of successors/predecessors of p are all (computationally) very easy problems ..... Hence we can traverse the tree (graph) in time proportional to its size..... Extra assumption: polynomial bound on length gameplay
End-game Analysis in PSPACE? The Recursive method combines recursion (over move sequence) with iteration (over locally legal moves). Space Consumption = O( | Stackframe | . Recursion Depth ) | Stackframe | = O( | Move sequence | + | Configuration| ) Recursion Depth = | Move sequence | = O( Duration Game ) which explains why the game duration should be Polynomial.....
Amsterdam Contributions to TACTICS Logic for Cooperation, actions, preferences Complexity Dynamic Epistemic Logic Complexity of playing Eleusis Lena Kurzen 20101216
ELEUSIS • Game which models Inductive Inference (Scientific Discovery) • Invented by Robert Abbot in 1956 • Popularized (amongst others) by Martin Gardner (SCIAM 1977) • By its very nature it violates some of the basic reasonability conditions • Deciding whether some move is legal can be hard
ELEUSIS • Played with standard decks of cards • first player : God • remaining players : Humans • Scoring based on getting rid of your cards • punishment for wrong moves == drawing extra cards
God’s Role in Eleusis • God starts game by inventing a Rule (which he keeps secret) • God checks whether moves played by humans obey the rule; violators must draw extra cards • If some human has declared himself a Prophet, God checks whether the predictions made by this prophet are correct; a false prophet is punished severely
Human’s role in Eleusis • If a human can play some of his cards in accordance with the rule he may play one; God checks whether the card indeed is legal; if not the card is placed below the sequence and the human player must draw another card • If a human believes all his cards would violate the rule he can claim so; God checks whether the claim is correct; if not God plays a legal card and the human player is punished
Prophets • A human player who believes to have discovered the rule may claim to be a prophet (only once and only if no other prophet is active) • The prophet replaces God as a judge for the moves of other humans, as long as God agrees; however if the prophet gives a false verdict he will be overturned by God and punished severely
Further rules • There are special rules enforcing the termination of the game . • The precise rules determining the scoring are irrelevant for the purpose of this talk
Example play Human A plays 3 Diamonds; the card is accepted
Example play Human B plays 10 clubs; the card is accepted
Example play Human C plays 7 Clubs; the card is rejected
Example play God moves the 7 Clubs card below the sequence
Example play Human A plays Jack of Diamonds; the card is accepted
Example play Human B claims that none of his cards can be played in accordance with the rule
Example play God finds the King of hearts amongst the cards of B, and plays it; player B is punished
Example play Human C plays 3 Clubs; the card is accepted
Example play Human A plays 2 Hearts; the card is rejected
Example play God places 2 Hearts below the sequence
Example play Human B plays 9 Spades; the card is accepted
Example play God’s Rule: every card must be followed by one of higher value, but after a King any card can be played.
Constraints on Rules • The rule must depend only on the sequence of accepted cards on the table • Excludes rules like: • male humans play black, females play red • if it rains outside play black • only accept cards played by worthy people • Prefix Closure: the initial segments of a legal sequence are legal • Otherwise some legal configuration can become unreachable by a correct game play • Other optional constraints for preventing degenerate plays: E.G., each legal sequence must have a legal extension
Formalization If C denotes the set of (52) traditional playing cards a rule can be formalized by a function R : C* X C {true,false} subject to the condition : If R( <c1,c2,...,ck> , ck+1 ) = true then R( <c1,c2,...,ck-1> , ck ) = true Other than that a rule can be arbitrary
Complexity Issues • Since rules can be arbitrary every configuration can be legal (except when at some position some card is both accepted and rejected) • Therefore a crucial parameter: • The class R of rules from which God must select his rule
Three decision problems • Q1) Given class R and some configuration of cards C , is there a rule R in R consistent with C ? • Q2) Given Rule R in R and some configuration of cards C , is C consistent with R ? • Q3) Given Rule R in R and some configuration of cards C and some card x, is playing x a legal move ?
Interesting Rule classes • k-Bounded context rule: Legality of some card depends on the last k previous cards only (k may be 0 ) • Examples • red, black, red, black, .... • any Ace must be followed by three red cards.... • all figure cards must be black
Interesting Rule classes • Periodic rule mod t : there are in fact t rules and the legality of a card in position i depends only on the cards located in positions j ≡ i mod t • Examples • red, black, red, black, .... • on even positions only play figure cards.... • value of card in position i must be within distance 3 of the card in position i - 4
A positive result • If R is the class of all k-bounded context rules problem Q1 is solvable in polynomial time • k may be part of the input • idea : the answer is “yes” unless some card is both accepted and rejected when played in identical context’s • remains valid if generalized to periodic k-bounded context rules • Note that the length of a shortest description of some k-bounded context rule may be exponential in k ; so an idea like trying out all possible rules will not work here.
Negative results • Since rules can be arbitrary and since cards can be used to encode standard information in a concise way, nobody can prevent you from encoding hard combinatorial problems in rules. • {red, black} encode bits • suits encode symbols from 4-letter alphabet (genetic code) • values encode decimal numbers, leaving the figure cards for coding separators etc...
Prefix closure ? • Using these coding tricks the prefix of some code may fail to be a legal code itself. • If the rule requires an encoding of some solvable instance of a combinatorial problem, some prefix may fail to encode an instance at all • Solution: use a signaling card: only when 7 clubs is played check whether the preceding string of cards encodes a solvable instance ....
Example of a rule for which Q3 is NP-hard • Encoding Partition problem: use consecutive blocks of cards with value in {A, 2, ..., 10} to code decimal digits and numbers, using figures as separators. • Rule: all cards are OK, but if a red figure card is played the sequence of integers encoded in the prefix must give a solvable instance of the Partition problem.
Example of a rule for which Q3 is Undecidable • Encoding PCP problem: use consecutive monochromatic blocks of cards with value in {A, 2, ..., 10} to code string pairs. • Rule: all cards are OK, but if a red figure card is played following a sequence of string pairs then the series of string pairs encoded in the prefix must yield a solvable instance of Post Correspondence Problem.
Conclusion • Eleusis is unreasonably flexible – it trivially encodes problems at arbitrary levels of computational complexity • Evident connections to learning theory (which classes of rules can be discovered in the limit, or by approximation (PAC learning)) • Well suited to experiments with real human players: what type of rules are invented by actual humans playing God ?