1 / 35

GAMES AND COMPUTER SCIENCE

GAMES AND COMPUTER SCIENCE Theoretical Models 1999 Peter van Emde Boas References available at: http://turing.wins.uva.nl/~peter/teaching/thmod99.html Most Papers will be made available in Library Games in Computer Science Information & Uncertainty (Traub ea. - 80+)

Olivia
Télécharger la présentation

GAMES AND COMPUTER SCIENCE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GAMES AND COMPUTER SCIENCE Theoretical Models 1999 Peter van Emde Boas References available at: http://turing.wins.uva.nl/~peter/teaching/thmod99.html Most Papers will be made available in Library

  2. Games in Computer Science • Information & Uncertainty (Traub ea. - 80+) • Pebble Game (Register Allocation, Theory) • Tiling Game (Reduction Theory) • Alternating Computation Model and / or trees • Interactive Proofs • Arthur Merlin Games • Zero Knowledge

  3. Game Theory • Theory of Strategic Interaction • Attributes • Discrete vs. Continuous • Cooperative vs. Non-Cooperative • Full Information vs. Incomplete Information (Knowledge Theory)

  4. Discrete / Continuous Combinatorial Analysis Backward Induction Number Theory (Conway Guy Berlekamp) Equilibria theory (Nash) Stochasitic Features Optimization Other names of importance: Von Neumann & Morgenstern Aumann Shapley Harsanyi

  5. OTHER ASPECTS • Single player - no choices • Single player - random moves • Single player - choices : Solitaire • Two players - choices • Two players - choices and random moves • Two players - concurrent moves

  6. Computer Science • Computation Theory • Complexity Theory • Machine Models • Algorithms • Knowledge Theory • Information Theory

  7. COMPUTATION • Deterministic • Nondeterministic • Probabilistic • Alternating • Interactive protocols • Concurrency

  8. COMPUTATION • Notion of Configurations: Nodes • Notion of Transitions: Edges • Non-uniqueness of transition: Out-degree > 1 • Initial Configuration : Root • Terminal Configuration : Leaf • Computation : Branch Tree • Acceptance Condition: Property of trees

  9. Introducing the Opponents © Games Workshop © Games Workshop URGAT THORGRIM

  10. A Game 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 © Donald Duck 1999 # 35

  11. Questions about this Game • What if the number of matches is even? • Can any of the two players force a win by clever playing? • How does the winner depend on the number of matches • Is this dependency periodic? If so WHY?

  12. Games as Recognizers • Construct a map G : S* --> Games (simply computable; Poly-time, Logspace or NC, ….) • Set recognized := {w | G(w) is won (by the first player) } • How does this relate to conventional ways of recognizing languages ?

  13. Games as Recognizers • Construct a map G : S* --> Games (simply computable; Poly-time, Logspace or NC, ….) • G(w) is guaranteed to be proper • Set recognized := {w | G(w) is won (by the first player) } • Properness conditions frequently involve probabilistic aspects

  14. Game Trees Thorgrim’s turn Terminal node: Urgat looses Urgat’s turn Terminal node: Thorgrim looses Standard Interpretation: Player unable to move looses the game Root

  15. Game Trees Thorgrim’s turn T U Terminal node: Urgat’s turn T T U U T Terminal node: Free Interpretation: Winner explicitly designated at terminal node Root

  16. Game Trees Thorgrim’s turn 2/0 -1/ 4 Terminal node: Urgat’s turn 3/1 1/-1 -3/ 2 1/ 4 5/-7 Terminal node: Non Zero-Sum Game: Payoffs explicitly designated at terminal node Root

  17. Game Trees SUB-GAME Thorgrim’s turn T U Terminal node: Urgat’s turn T T U U T Terminal node: Free Interpretation: Winner explicitly designated at terminal node Root

  18. Backward Induction Thorgrim’s turn T U Terminal node: Urgat’s turn T T T U U T T Terminal node: U U Free Interpretation: Winner explicitly designated at terminal node U Root

  19. Backward Induction Thorgrim’s turn 2/0 -1/ 4 Terminal node: Urgat’s turn 3/1 2/0 1/-1 -3/ 2 1/ 4 5/-7 3/1 Terminal node: -3/ 2 1/ 4 Non Zero-Sum Game: Payoffs explicitly designated at terminal node 1/ 4 Root

  20. Backward Induction T U 2/0 -1/ 4 T 3/1 T 2/0 U T U T 1/-1 -3/ 2 1/ 4 5/-7 T 3/1 U U -3/ 2 1/ 4 U 1/ 4 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

  21. Analysis of the DD game Extension used: Thorgrim wins if he has an odd number when the game terminates. This allows for even n . Relevant feature: parity of number of matches collected so far (not the number itself!) Four types of configurations remain: T/E : Thorgrim has to play and has an even number T/O : Thorgrim has to play and has an odd number U/E : Urgat plays, while Thorgrim has an even number U/O : Urgat plays, while Thorgrim has an odd number

  22. Backward Induction Table nU / EU / OT / ET / O 18UUT / 1T / 2 17 U T T / 1 U 16 U T U T / 3 15 U U T / 2T / 3 14 U U T / 2T / 1 13 TU U T / 1 12 TU T / 3 U 11 U U T / 3 T / 2 10UUT / 1T / 2 9 U T T / 1 U 8 U T U T / 3 7 U U T / 2T / 3 6 U U T / 2T / 1 5 TU U T / 1 4 TU T / 3 U 3 U U T / 3 T / 2 2UUT / 1T / 2 1 U T T / 1 U 0 U T U T

  23. What is the Strategy? • Play to number  0 or 1 (mod4) • Switch your parity on every turn • Start right: to even if n mod 8  {5,6,7,0} and to odd if n mod 8  {1,2,3,4} • Question: explain the correctness of this strategy, otherwise than by inspecting the table.....

  24. Alternating Computation Configuration Type Existential Universal Negating + - + Accepting - - + + - + - Rejecting Computation Tree

  25. Alternating Computation + Configuration Type + - - + + Existential + - Universal + + + - - - Negating - + - + + - + Accepting - - + + - + - Rejecting Evaluation Full Computation Tree This Tree Accepts

  26. Alternating Computation Infinite Branches ? Requires third quality :Indeterminatenodes Universalnode isindeterminateiff it has no rejecting son and at least oneindeterminateson Existentialnode isindeterminateiff it has noaccepting son and at least oneindeterminateone Negatingnode isindeterminateiff its son is

  27. Alternating Computation Infinite Branches ? Universalnode isacceptingiff it has no rejecting son and noindeterminateson (all sons are accepting) Existentialnode isacceptingiff it has oneaccepting Son; indeterminateand rejecting sons don’t matter Negatingnode isacceptingiff its son is rejecting Requires RecursiveEvaluation of computation tree !

  28. RECURSIVE EVALUATION + - ^ The proper way of Recursive evaluation ??? + - ^ ^ + - + - ^ + - ^ …. …. …. Indeterminate : ^

  29. RECURSIVE EVALUATION + - ^ Recursive evaluation == Solving LEAST FIXEDPOINT EQUATION ! + - ^ + - Partial order ≤ of definedness Extends to functions defined on the tree: F ≤ G iff "x[F(x) ≤ G(x)] ^ + - ^ + - ^ + - ^ …. …. …. OK NOK

  30. The Knaster Tarski Theorem SET U with partial order ≤ and least element ^ Countable chains have least upper bounds DOMAIN := x0≤ x1 ≤ x2 ≤ ….. ≤ xn ≤ xn+1 ≤ …. ---> xw=:i xi "i[xi ≤ xw] and "i[xi ≤ y] ==> xw ≤ y FUNCTION F which is: MONOTONE: x ≤ y ==> F(x) ≤ F(y) CONTINUOUS: F( i xi ) = iF(xi) OPERATOR :=

  31. The Knaster Tarski Theorem THEOREM: If F is an operator defined over domain U then the equation X = F( X ) has a least solution W . This solution is obtained as the limit of the sequence of iterates: ^ ≤ F( ^ ) ≤ F(F( ^ )) ≤ …. W = iFi ( ^ ) APPLICATION: U := domain of evaluations of tree F := single application of recursive rule

  32. Back to Alternation • For an accepting tree there exists a witness subtree for acceptance (and similar for rejection) • Witness subtree contains a single accepting son for every accepting node, and a single rejecting son for every rejecting node • A witness subtree is finite, even when the tree itself is infinite! • Infinite branches are irrelevant!

  33. 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!)

  34. Eliminating Negating Nodes + + + - - + - - + + + - + + - - + + + - - - + + + - - - - + - + + - - + - + + + - - + + - + - - + - + - + - - Dualized nodes -

More Related