Game Theory Explorer - Software for the Applied Game Theorist - - PowerPoint PPT Presentation

game theory explorer software for the applied game
SMART_READER_LITE
LIVE PREVIEW

Game Theory Explorer - Software for the Applied Game Theorist - - PowerPoint PPT Presentation

Purpose Usage Client/Server Algorithms Future Game Theory Explorer - Software for the Applied Game Theorist Bernhard von Stengel Department of Mathematics London School of Economics July 2013 1 Purpose Usage Client/Server Algorithms


slide-1
SLIDE 1

Purpose Usage Client/Server Algorithms Future

Game Theory Explorer - Software for the Applied Game Theorist Bernhard von Stengel

Department of Mathematics London School of Economics July 2013

1

slide-2
SLIDE 2

Purpose Usage Client/Server Algorithms Future

Overview

Explain and demonstrate GTE (Game Theory Explorer),

  • pen-source software, under development, for

creating and analyzing non-cooperative games in strategic form:

B

I II

l 1 4 3 r 6 5 4 2 T 3

and extensive form:

l 2 4 r r

II

l 6 B 3 3 5

I

T 1 4

2

slide-3
SLIDE 3

Purpose Usage Client/Server Algorithms Future

Intended users

Applied game theorists:

  • experimental economists (analyze game before running

experiment)

  • game-theoretic modelers in biology, political science, . . .
  • in general: non-experts in equilibrium analysis

⇒ design goal: ease of use Researchers in game theory:

  • testing conjectures about equilibria
  • as contributors: designers of game theory algorithms

3

slide-4
SLIDE 4

Purpose Usage Client/Server Algorithms Future

History: Gambit

GTE now part of the Gambit open-source software development, http://www.gambit-project.org 2011 and 2012 supported by Google Summer of Code (GSoC) Gambit software started ∼1990 with Richard McKelvey (Caltech) to analyze games for experiments, developed since 1994 with Andy McLennan into C++ package, since 2001 maintained by Ted Turocy (Norwich, UK).

  • Gambit must be installed on PC/Mac/Linux, with GUI

(graphical user interface) using platform-independent wxWidget

  • has collection of algorithms for computing Nash equilibria
  • offers scripting language, now developed using Python

4

slide-5
SLIDE 5

Purpose Usage Client/Server Algorithms Future

Features of GTE

GTE independent browser-based development:

  • no software installation needed, low barrier to entry
  • nicer GUI than Gambit
  • export to graphical formats

5

slide-6
SLIDE 6

Purpose Usage Client/Server Algorithms Future

Features of GTE

GTE independent browser-based development:

  • no software installation needed, low barrier to entry
  • nicer GUI than Gambit
  • export to graphical formats

Disadvantages:

  • manual storing / loading of files for security reasons
  • long computations require local server installation (same GUI)

5

slide-7
SLIDE 7

Purpose Usage Client/Server Algorithms Future

Features of GTE

GTE independent browser-based development:

  • no software installation needed, low barrier to entry
  • nicer GUI than Gambit
  • export to graphical formats

Disadvantages:

  • manual storing / loading of files for security reasons
  • long computations require local server installation (same GUI)

Contributors: David Avis (lrs), Rahul Savani (PhD 2006), Mark Egesdal (2011), Alfonso Gomez-Jordana, Martin Prause (GSoC 2011, 2012)

5

slide-8
SLIDE 8

Purpose Usage Client/Server Algorithms Future

Example of a game

2 × 2 game in strategic form:

B

I II

l 1 4 3 r 6 5 4 2 T 3

6

slide-9
SLIDE 9

Purpose Usage Client/Server Algorithms Future

Example of a game

2 × 2 game in strategic form:

B

I II

l 1 4 3 r 6 5 4 2 T 3

with pure best responses

6

slide-10
SLIDE 10

Purpose Usage Client/Server Algorithms Future

Example of a game

2 × 2 game in strategic form:

B

I II

l 1 4 3 r 6 5 4 2 T 3 1 1

with pure best responses and equilibrium probabilities

6

slide-11
SLIDE 11

Purpose Usage Client/Server Algorithms Future

Extensive (= tree) form of the game

Players move sequentially, information sets show lack of information about game state: l 2 4 r r

II

l 6 B 3 3 5

I

T 1 4

7

slide-12
SLIDE 12

Purpose Usage Client/Server Algorithms Future

Commitment (leadership) game

Changed game when player I can commit:

2 l 3 r 5 4

II

b T 1

I

a

II

4 6 B 3

8

slide-13
SLIDE 13

Purpose Usage Client/Server Algorithms Future

Commitment (leadership) game

Changed game when player I can commit:

2 l 3 r 5 4

II

b T 1

I

a

II

4 6 B 3

Subgame perfect equilibrium: (T, l-b)

8

slide-14
SLIDE 14

Purpose Usage Client/Server Algorithms Future

Commitment (leadership) game

Changed game when player I can commit:

2 l 3 r 5 4

II

b T 1

I

a

II

4 6 B 3

1 B 4

I

6 4 l−a 4 3 2 5 l−b r−a 3 4 5 3

II

2 1 3 T 6 r−b Subgame perfect equilibrium: (T, l-b)

8

slide-15
SLIDE 15

Purpose Usage Client/Server Algorithms Future

Commitment (leadership) game

Changed game when player I can commit:

2 l 3 r 5 4

II

b T 1

I

a

II

4 6 B 3

1 B 4

I

6 4 l−a 4 3 2 5 l−b r−a 3 4 5 3

II

2 1 3 T 6 r−b Subgame perfect equilibrium: (T, l-b)

8

slide-16
SLIDE 16

Purpose Usage Client/Server Algorithms Future

Commitment (leadership) game

Changed game when player I can commit:

2 l 3 r 5 4

II

b T 1

I

a

II

4 6 B 3

1 B 4

I

6 4 l−a 4 3 2 5 l−b r−a 3 4 5 3

II

2 1 3 T 6 r−b 1 1 Subgame perfect equilibrium: (T, l-b)

8

slide-17
SLIDE 17

Purpose Usage Client/Server Algorithms Future

Commitment (leadership) game

Changed game when player I can commit:

2 l 3 r 5 4

II

b T 1

I

a

II

4 6 B 3

1 B 4

I

6 4 l−a 4 3 2 5 l−b r−a 3 4 5 3

II

2 1 3 T 6 r−b 1 1 Subgame perfect equilibrium: (T, l-b) Other equilibria: (B, r-b)

8

slide-18
SLIDE 18

Purpose Usage Client/Server Algorithms Future

Commitment (leadership) game

Changed game when player I can commit:

2 l 3 r 5 4

II

b T 1

I

a

II

4 6 B 3

1 B 4

I

6 4 l−a 4 3 2 5 l−b r−a 3 4 5 3

II

2 1 3 T 6 r−b 1/2 1/2 1 Subgame perfect equilibrium: (T, l-b) Other equilibria: (B, r-b), (B, 1

2l-b 1 2r-b)

8

slide-19
SLIDE 19

Purpose Usage Client/Server Algorithms Future

Commitment (leadership) game

Changed game when player I can commit:

2 l 3 r 5 4

II

b T 1

I

a

II

4 6 B 3

1 B 4

I

6 4 l−a 4 3 2 5 l−b r−a 3 4 5 3

II

2 1 3 T 6 r−b 1/2 1/2 1 Subgame perfect equilibrium: (T, l-b) Other equilibria: (B, r-b), (B, 1

2l-b 1 2r-b), (T, 1 2l-a 1 2l-b)

8

slide-20
SLIDE 20

Purpose Usage Client/Server Algorithms Future

GTE output for the commitment game

9

slide-21
SLIDE 21

Purpose Usage Client/Server Algorithms Future

Demonstration of GTE

Preceding games:

  • 2 × 2 game in strategic form
  • extensive form of that game
  • commitment game, extensive and strategic form

10

slide-22
SLIDE 22

Purpose Usage Client/Server Algorithms Future

Demonstration of GTE

Preceding games:

  • 2 × 2 game in strategic form
  • extensive form of that game
  • commitment game, extensive and strategic form

Next: create from scratch a more complicated extensive game

  • imperfectly observable commitment

10

slide-23
SLIDE 23

Purpose Usage Client/Server Algorithms Future

Game with imperfectly observable commitment

l

II

6

II

3 r 6 3 1 1 a 3 4 l 1/100 99/100 a

I

r b 4 5 B 4 b 2 99/100 5 4 T 1/100 3 2

11

slide-24
SLIDE 24

Purpose Usage Client/Server Algorithms Future

Game tree drawn left to right

l T , 6

II

, 3 r , 1

II

3 1 , 6 , 3 4 l 1/100 b a ,

I

r b 4 5 a 4 , 99/100 2 1/100 B 5 4 , 99/100 3 2

12

slide-25
SLIDE 25

Purpose Usage Client/Server Algorithms Future

GTE output for imperfectly observable commitment

13

slide-26
SLIDE 26

Purpose Usage Client/Server Algorithms Future

More complicated signaling game, 5 equilibria

1/2 −2 yifN 1/2 8 1 yifY yifN yifY 10 −3 −1 1/2 nifY 1/2 Nn

1

−3 Yn

2 1

nifN nifY 1/2 5 1/2 −2 10 −1 −1 1/2 Ni 1/2 Yi 1/2

2

−2 −1 −5 −4 nifN 1/2 −3

14

slide-27
SLIDE 27

Purpose Usage Client/Server Algorithms Future

Some more strategic-form games

For studying more complicated games: generate game matrices as text files, copy and paste into strategic-form input. Future extension: Automatic generation via command lines or “worksheets” for scripting, connection with Python and Gambit

15

slide-28
SLIDE 28

Purpose Usage Client/Server Algorithms Future

GTE software architecture

Client (your computer with a browser):

  • GUI: JavaScript (Flash’s variant called ActionScript)
  • store and load game described in XML format
  • export to graphic formats (.png or XFIG → EPS, PDF)
  • for algorithm: send XML game description to server

16

slide-29
SLIDE 29

Purpose Usage Client/Server Algorithms Future

GTE software architecture

Client (your computer with a browser):

  • GUI: JavaScript (Flash’s variant called ActionScript)
  • store and load game described in XML format
  • export to graphic formats (.png or XFIG → EPS, PDF)
  • for algorithm: send XML game description to server

Server (hosting client program and equilibrium solvers):

  • converts XML to Java data structure (similar to GUI)
  • solution algorithms as binaries (e.g. C program lrs), send

results as text back to client ⇒ cannot use restrictive public servers like “Google App Engine”

16

slide-30
SLIDE 30

Purpose Usage Client/Server Algorithms Future

High usage of computation resources

Finding all equilibria takes exponential time ⇒ for large games, server should run on your computer, not a public one achieved by local server installation (“Jetty”), requires installation, but offers same user interface.

17

slide-31
SLIDE 31

Purpose Usage Client/Server Algorithms Future

Algorithm: Finding all equilibria

For two-player games in strategic form, all Nash equilibria can be found as follows:

  • payoffs define inequalities for “best response polyhedra”
  • compute all vertices of these polyhedra (using lrs by David

Avis, requires arbitrary precision integers)

  • match vertices for complementarity (LCP)
  • find maximal cliques of matching vertices for equilibrium

components

18

slide-32
SLIDE 32

Purpose Usage Client/Server Algorithms Future

Example

II

B 1 2 3 1

I

l 3 r 2 T

T 2

II

1 3 l B r

I

2

19

slide-33
SLIDE 33

Purpose Usage Client/Server Algorithms Future

Best response polyhedron of player I

B 1 2 3 1 l 3 r 2 T

II I prob(r)

1

payoff player I

20

slide-34
SLIDE 34

Purpose Usage Client/Server Algorithms Future

Best response polyhedron of player I

B 1 2 3 1 l 3 r 2 T

II I T prob(r)

1

payoff player I

20

slide-35
SLIDE 35

Purpose Usage Client/Server Algorithms Future

Best response polyhedron of player I

B 1 2 3 1 l 3 r 2 T

II I B prob(r)

1

payoff player I

20

slide-36
SLIDE 36

Purpose Usage Client/Server Algorithms Future

Best response polyhedron of player I

B 1 2 3 1 l 3 r 2 T

II I B T prob(r)

1

payoff player I

20

slide-37
SLIDE 37

Purpose Usage Client/Server Algorithms Future

Best response polyhedron of player II

B 1 2 3 1 l 3 r 2 T

II I l payoff player II

1

prob(B) B T prob(r)

1

payoff player I

20

slide-38
SLIDE 38

Purpose Usage Client/Server Algorithms Future

Best response polyhedron of player II

B 1 2 3 1 l 3 r 2 T

II I r payoff player II

1

prob(B) B T prob(r)

1

payoff player I

20

slide-39
SLIDE 39

Purpose Usage Client/Server Algorithms Future

Best response polyhedron of player II

B 1 2 3 1 l 3 r 2 T

II I r l payoff player II

1

prob(B) B T prob(r)

1

payoff player I

20

slide-40
SLIDE 40

Purpose Usage Client/Server Algorithms Future

Label with best responses and unplayed strategies

B 1 2 3 1 l 3 r 2 T

II I l=0 r=0 B=0 T=0 r l payoff player II

1

prob(B) B T prob(r)

1

payoff player I

20

slide-41
SLIDE 41

Purpose Usage Client/Server Algorithms Future

Equilibrium = all labels T, B, l, r present

B 1 2 3 1 l 3 r 2 T

II I l=0 r=0 B=0 T=0 r l payoff player II

1

prob(B) B T prob(r)

1

payoff player I

20

slide-42
SLIDE 42

Purpose Usage Client/Server Algorithms Future

Equilibrium with multiple label r (degeneracy)

B 1 2 3 1 l 3 r 2 T

II I l=0 r=0 B=0 T=0 r l payoff player II

1

prob(B) B T prob(r)

1

payoff player I

20

slide-43
SLIDE 43

Purpose Usage Client/Server Algorithms Future

Equilibrium with multiple label B (degeneracy)

B 1 2 3 1 l 3 r 2 T

II I l=0 r=0 B=0 T=0 r l payoff player II

1

prob(B) B T prob(r)

1

payoff player I

20

slide-44
SLIDE 44

Purpose Usage Client/Server Algorithms Future

⇒ equilibrium component with labels T and B, l, r

B 1 2 3 1 l 3 r 2 T

II I l=0 r=0 B=0 T=0 r l payoff player II

1

prob(B) B T prob(r)

1

payoff player I

20

slide-45
SLIDE 45

Purpose Usage Client/Server Algorithms Future

Equilibrium components via cliques

In degenerate games (= vertices with zero basic variables, occur for game trees), get convex combinations of “exchangeable”

  • equilibria. Recognized as cliques of matching vertex pairs:

1 2 3 4 1 2 3 4

v v v v u u u u

table of extreme equilibria geometry

21

slide-46
SLIDE 46

Purpose Usage Client/Server Algorithms Future

Algorithm: Sequence form for game trees

Example of game tree:

10 L V

2

a q C 20 c U t s d 20 50 b

1

5 t 15 V s

1 2

D U R 20

1

p 10 30

2

D C 5 15 −5

22

slide-47
SLIDE 47

Purpose Usage Client/Server Algorithms Future

Exponentially large strategic form

Strategy of a player: specifies a move for every information set of that player (except for unspecified moves ∗ at unreachable information sets) ⇒ exponential number of strategies ap∗ aq∗ b∗∗ c∗s c∗t d∗∗ L∗C 5 5 10 20 50 5 L∗D 5 5 20 30 15 5 RUC 10 20 10 20 50 5 RUD 10 20 20 30 15 5 RVC 15 –5 10 20 50 5 RVD 15 –5 20 30 15 5

23

slide-48
SLIDE 48

Purpose Usage Client/Server Algorithms Future

Sequences instead of strategies

Sequence specifies moves only along path in game tree ⇒ linear number of sequences, sparse payoff matrix A ∅ a b c d ap aq cs ct ∅ 5 L 5 R RU 10 20 RV 15 –5 C 10 20 50 D 20 30 15 Expected payoff x⊤Ay, play rows with x ≥ 0 subject to Ex = e, play columns with y ≥ 0 subject to Fy = f.

24

slide-49
SLIDE 49

Purpose Usage Client/Server Algorithms Future

Play as behavior strategy

Given: x ≥ 0 with Ex = e. Move L is last move of unique sequence, say PQL, where one row of Ex = e says xPQL + xPQR = xPQ ⇒ behavior-probability(L) = xPQL xPQ

P R L R

1 1 2

L Q

1

25

slide-50
SLIDE 50

Purpose Usage Client/Server Algorithms Future

Play as behavior strategy

Given: x ≥ 0 with Ex = e. Move L is last move of unique sequence, say PQL, where one row of Ex = e says xPQL + xPQR = xPQ ⇒ behavior-probability(L) = xPQL xPQ

P R L R

1 1 2

L Q

1 Required assumption of perfect recall [Kuhn 1953, Selten 1975]: Each node in an information set is preceded by same sequence, here PQ,

  • f the player’s own earlier moves.

25

slide-51
SLIDE 51

Purpose Usage Client/Server Algorithms Future

Linear-sized sequence form

Input: Two-person game tree with perfect recall. Theorem [Romanovskii 1962, vS 1996] The equilibria of a zero-sum game are the solutions to a Linear Program (LP) of linear size in the size of the game tree.

26

slide-52
SLIDE 52

Purpose Usage Client/Server Algorithms Future

Linear-sized sequence form

Input: Two-person game tree with perfect recall. Theorem [Romanovskii 1962, vS 1996] The equilibria of a zero-sum game are the solutions to a Linear Program (LP) of linear size in the size of the game tree. Theorem [Koller/Megiddo/vS 1996, vS/Elzen/Talman 2002] The equilibria of a non-zero-sum game are the solutions to a Linear Complementarity Problem (LCP) of linear size. A sample equilibrium is found by Lemke’s algorithm. This algorithm mimicks the Harsanyi–Selten tracing procedure and finds a normal-form perfect equilibrium.

26

slide-53
SLIDE 53

Purpose Usage Client/Server Algorithms Future

Planned Extensions

Improve and convert GUI to pure JavaScript (Flash is phased out) Further solution algorithms:

  • EEE [Audet/Hansen/Jaumard/Savard 2001], needs exact

arithmetic

  • Path-following algorithms (Lemke-Howson, variants of Lemke)
  • n-player games: simplicial subdivision, polynomial inequalities

Scripting features:

  • connect with Gambit and Python
  • database of reproducible computational experiments

27

slide-54
SLIDE 54

Purpose Usage Client/Server Algorithms Future

Implementation challenges

Demonstrating that an algorithm works (for a publication)

  • does not usually create robust and easy-to-use software

28

slide-55
SLIDE 55

Purpose Usage Client/Server Algorithms Future

Implementation challenges

Demonstrating that an algorithm works (for a publication)

  • does not usually create robust and easy-to-use software

Who should write such software?

  • MSc thesis: not enough time
  • PhD thesis / research grant: not scientific enough
  • ideal: researcher creating “showcase” of their work

Example: Rahul Savani’s http://banach.lse.ac.uk/

  • student programmers with Google Summer of Code: insecure

funding, but helps find volunteer open-source contributors.

28

slide-56
SLIDE 56

Purpose Usage Client/Server Algorithms Future

Summary

GTE – Game theory explorer

  • helps create, draw, and analyze game-theoretic models
  • user-friendly, browser-based, low barriers to entry
  • open-source, work in progress, needs contributors

https://github.com/gambitproject/gte/wiki/_pages

29

slide-57
SLIDE 57

Purpose Usage Client/Server Algorithms Future

Summary

GTE – Game theory explorer

  • helps create, draw, and analyze game-theoretic models
  • user-friendly, browser-based, low barriers to entry
  • open-source, work in progress, needs contributors

https://github.com/gambitproject/gte/wiki/_pages

Thank you!

29