games and computer science l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
GAMES AND COMPUTER SCIENCE PowerPoint Presentation
Download Presentation
GAMES AND COMPUTER SCIENCE

Loading in 2 Seconds...

play fullscreen
1 / 35

GAMES AND COMPUTER SCIENCE - PowerPoint PPT Presentation


  • 307 Views
  • Uploaded on

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+)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'GAMES AND COMPUTER SCIENCE' - Olivia


Download Now 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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
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
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
slide4

Game Theory

  • Theory of Strategic Interaction
  • Attributes
    • Discrete vs. Continuous
    • Cooperative vs. Non-Cooperative
    • Full Information vs. Incomplete Information (Knowledge Theory)
discrete continuous
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

other aspects
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
computer science
Computer Science
  • Computation Theory
  • Complexity Theory
  • Machine Models
  • Algorithms
  • Knowledge Theory
  • Information Theory
computation
COMPUTATION
  • Deterministic
  • Nondeterministic
  • Probabilistic
  • Alternating
  • Interactive protocols
  • Concurrency
computation9
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
slide10

Introducing the Opponents

© Games Workshop

© Games Workshop

URGAT

THORGRIM

a game
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

questions about this game
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?
games as recognizers
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 ?
games as recognizers14
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
game trees
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

game trees16
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

game trees17
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

game trees18
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

backward induction
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

backward induction20
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

backward induction21
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

analysis of the dd game
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

backward induction table
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

what is the strategy
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.....
alternating computation
Alternating Computation

Configuration Type

Existential

Universal

Negating

+

-

+

Accepting

-

-

+

+

-

+

-

Rejecting

Computation Tree

alternating computation26
Alternating Computation

+

Configuration Type

+

-

-

+

+

Existential

+

-

Universal

+

+

+

-

-

-

Negating

-

+

-

+

+

-

+

Accepting

-

-

+

+

-

+

-

Rejecting

Evaluation Full Computation Tree

This Tree Accepts

alternating computation27
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

alternating computation28
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 !

recursive evaluation
RECURSIVE EVALUATION

+

-

^

The proper way of

Recursive evaluation ???

+

-

^

^

+

-

+

-

^

+

-

^

….

….

….

Indeterminate : ^

recursive evaluation30
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

the knaster tarski theorem
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 :=

the knaster tarski theorem32
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

back to alternation
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!
negating nodes
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!)
eliminating negating nodes
Eliminating Negating Nodes

+

+

+

-

-

+

-

-

+

+

+

-

+

+

-

-

+

+

+

-

-

-

+

+

+

-

-

-

-

+

-

+

+

-

-

+

-

+

+

+

-

-

+

+

-

+

-

-

+

-

+

-

+

-

-

Dualized nodes

-