peter van emde boas: games and computer science 1999 games and computer science theoretical models...
Post on 01-Jan-2016
220 Views
Preview:
TRANSCRIPT
Peter van Emde Boas: Games and Computer Science 1999
GAMES AND COMPUTER SCIENCE
Theoretical Models 1999
Peter van Emde Boas
References available at: http://turing.wins.uva.nl/~peter/teaching/thmod99.htmlMost Papers will be made available in Library
Peter van Emde Boas: Games and Computer Science 1999
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
Peter van Emde Boas: Games and Computer Science 1999
Game Theory
• Theory of Strategic Interaction
• Attributes– Discrete vs. Continuous– Cooperative vs. Non-Cooperative– Full Information vs.
Incomplete Information(Knowledge Theory)
Peter van Emde Boas: Games and Computer Science 1999
Discrete / Continuous
Combinatorial AnalysisBackward InductionNumber Theory(Conway Guy Berlekamp)
Equilibria theory (Nash)Stochasitic FeaturesOptimization
Other names of importance:Von Neumann & MorgensternAumannShapleyHarsanyi
Peter van Emde Boas: Games and Computer Science 1999
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
Peter van Emde Boas: Games and Computer Science 1999
Computer Science
• Computation Theory
• Complexity Theory
• Machine Models
• Algorithms
• Knowledge Theory
• Information Theory
Peter van Emde Boas: Games and Computer Science 1999
COMPUTATION
• Deterministic
• Nondeterministic
• Probabilistic
• Alternating
• Interactive protocols
• Concurrency
Peter van Emde Boas: Games and Computer Science 1999
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
Peter van Emde Boas: Games and Computer Science 1999
© Games Workshop © Games Workshop
URGAT THORGRIM
Introducing the Opponents
Peter van Emde Boas: Games and Computer Science 1999
A Game
© Donald Duck 1999 # 35
Starting with 15 matchesplayers alternatively take1, 2 or 3 matches away untilnone remain. The playerending up with an oddnumber of matches winsthe game
Peter van Emde Boas: Games and Computer Science 1999
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?
Peter van Emde Boas: Games and Computer Science 1999
Games as Recognizers
• Construct a map : * --> Games (simply computable; Poly-time, Logspace or NC, ….)
• Set recognized := {w | (w) is won (by the first player) }
• How does this relate to conventional ways of recognizing languages ?
Peter van Emde Boas: Games and Computer Science 1999
Games as Recognizers
• Construct a map : * --> Games (simply computable; Poly-time, Logspace or NC, ….)
• (w) is guaranteed to be proper• Set recognized :=
{w | (w) is won (by the first player) }• Properness conditions frequently
involve probabilistic aspects
Peter van Emde Boas: Games and Computer Science 1999
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 and Computer Science 1999
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 and Computer Science 1999
Game Trees
Root
Terminal node:
Thorgrim’s turn
Urgat’s turn
Terminal node:
Non Zero-Sum Game:Payoffs explicitly designated at terminal node
2 / 0
5 / -71 / 4
-1 / 4
3 / 1
-3 / 21 / -1
Peter van Emde Boas: Games and Computer Science 1999
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 and Computer Science 1999
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
UU
U
Peter van Emde Boas: Games and Computer Science 1999
Backward Induction
Root
Terminal node:
Thorgrim’s turn
Urgat’s turn
Terminal node:
Non Zero-Sum Game:Payoffs explicitly designated at terminal node
2 / 0
5 / -71 / 4
-1 / 4
3 / 1
-3 / 21 / -1
2 / 0
3 / 1
1 / 4-3 / 2
1 / 4
Peter van Emde Boas: Games and Computer Science 1999
Backward Induction2 / 0
5 / -71 / 4
-1 / 4
3 / 1
-3 / 21 / -1
2 / 0
3 / 1
1 / 4-3 / 2
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
T
TU
U
T
UTT
T
UU
U
Peter van Emde Boas: Games and Computer Science 1999
Analysis of the DD gameExtension used:Thorgrim wins if he hasan odd number when thegame terminates.This allows for even n .
Four types of configurations remain:T/E : Thorgrim has to play and has an even numberT/O : Thorgrim has to play and has an odd numberU/E : Urgat plays, while Thorgrim has an even numberU/O : Urgat plays, while Thorgrim has an odd number
Relevant feature: parity of number of matches collectedso far (not the number itself!)
Peter van Emde Boas: Games and Computer Science 1999
Backward Induction Tablen U / E U / O T / E T / O
18 U U T / 1 T / 217 U T T / 1 U16 U T U T / 315 U U T / 2 T / 314 U U T / 2 T / 113 T U U T / 112 T U T / 3 U11 U U T / 3 T / 210 U U T / 1 T / 2 9 U T T / 1 U 8 U T U T / 3 7 U U T / 2 T / 3 6 U U T / 2 T / 1 5 T U U T / 1 4 T U T / 3 U 3 U U T / 3 T / 2 2 U U T / 1 T / 2 1 U T T / 1 U 0 U T U T
Peter van Emde Boas: Games and Computer Science 1999
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.....
Peter van Emde Boas: Games and Computer Science 1999
Alternating Computation
+ -
+ +- - - ++
-Computation Tree
Configuration Type
Existential
Universal
Negating
Accepting
Rejecting
Peter van Emde Boas: Games and Computer Science 1999
Alternating Computation
+ -
+ +- - - ++
-Evaluation Full Computation Tree
This Tree Accepts
Configuration Type
Existential
Universal
Negating
Accepting
Rejecting
+
+
+
+
+
+
-
- -
- -
-
--
++
+
+
Peter van Emde Boas: Games and Computer Science 1999
Alternating Computation
Infinite Branches ?
Requires third quality : Indeterminate nodes
Universal node is indeterminate iff it has no rejecting son and at least one indeterminate son
Existential node is indeterminate iff it has no acceptingson and at least one indeterminate one
Negating node is indeterminate iff its son is
Peter van Emde Boas: Games and Computer Science 1999
Alternating Computation
Infinite Branches ?
Universal node is accepting iff it has no rejecting son and no indeterminate son (all sons are accepting)
Existential node is accepting iff it has one acceptingSon; indeterminate and rejecting sons don’t matter
Negating node is accepting iff its son is rejecting
Requires Recursive Evaluation of computation tree !
Peter van Emde Boas: Games and Computer Science 1999
RECURSIVE EVALUATION
…. …. ….Indeterminate :
+ -
+ -
+ -
+ -
+ -
The proper way of Recursive evaluation ???
Peter van Emde Boas: Games and Computer Science 1999
RECURSIVE EVALUATION
…. …. ….
+ -
+ -
+ -
+ -
+ -
Recursive evaluation ==Solving LEAST FIXED
POINT EQUATION !
+ -Partial order ≤of definedness
Extends to functionsdefined on the tree:
F ≤ G iff x[F(x) ≤ G(x)]
OK NOK
Peter van Emde Boas: Games and Computer Science 1999
The Knaster Tarski Theorem
DOMAIN :=
SET U with partial order ≤ andleast element
Countable chains have least upper bounds
x0 ≤ x1 ≤ x2 ≤ ….. ≤ xn ≤ xn+1 ≤ …. ---> x =:i xi
i[xi ≤ x] and i[xi ≤ y] ==> x ≤ y
OPERATOR := FUNCTION which is:MONOTONE: x ≤ y ==> (x) ≤ (y)CONTINUOUS: ( i xi ) = i (xi)
Peter van Emde Boas: Games and Computer Science 1999
The Knaster Tarski Theorem
THEOREM: If is an operator defined over domain Uthen the equation X = ( X ) has a least solution .
This solution is obtained as the limit of the sequence ofiterates: ≤ ≤ ≤ ….
= i i ( )
APPLICATION: U := domain of evaluations of tree := single application of recursive rule
Peter van Emde Boas: Games and Computer Science 1999
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!
Peter van Emde Boas: Games and Computer Science 1999
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!)
top related