Compositional game theory Jules Hedges (University of Oxford) SYCO - - PowerPoint PPT Presentation

compositional game theory
SMART_READER_LITE
LIVE PREVIEW

Compositional game theory Jules Hedges (University of Oxford) SYCO - - PowerPoint PPT Presentation

Ordinary games The category PC Open games Examples Cool stuff Compositional game theory Jules Hedges (University of Oxford) SYCO 1, Birmingham 21 September 2018 Ordinary games The category PC Open games Examples Cool stuff A peek at


slide-1
SLIDE 1

Ordinary games The category PC Open games Examples Cool stuff

Compositional game theory

Jules Hedges

(University of Oxford)

SYCO 1, Birmingham 21 September 2018

slide-2
SLIDE 2

Ordinary games The category PC Open games Examples Cool stuff

A peek at where we’re going

A1,X AZ,Y f q X X X Z Y R R R R

slide-3
SLIDE 3

Ordinary games The category PC Open games Examples Cool stuff

Game theory

Mathematical theory of interacting “rational” agents Players make observations and then make choices Group choices determine payoffs “Local view” of rationality: players act to maximise payoff “Global view”: equilibrium strategies

slide-4
SLIDE 4

Ordinary games The category PC Open games Examples Cool stuff

Example: penalty shootout

a, b ∈ {L, R}

slide-5
SLIDE 5

Ordinary games The category PC Open games Examples Cool stuff

Example: penalty shootout

a, b ∈ {L, R} π(a, b) =

  • (+1, −1)

if a = b (−1, +1) if a = b

slide-6
SLIDE 6

Ordinary games The category PC Open games Examples Cool stuff

Example: penalty shootout

a, b ∈ {L, R} π(a, b) =

  • (+1, −1)

if a = b (−1, +1) if a = b Unique (probabilistic) equilibrium: a = b = 1

2 |L + 1 2 |R

slide-7
SLIDE 7

Ordinary games The category PC Open games Examples Cool stuff

Example: penalty shootout

a, b ∈ {L, R} π(a, b) =

  • (+1, −1)

if a = b (−1, +1) if a = b Unique (probabilistic) equilibrium: a = b = 1

2 |L + 1 2 |R

Nash’s theorem generalises this situation

slide-8
SLIDE 8

Ordinary games The category PC Open games Examples Cool stuff

Picturing game theory (1945 – 2018)

slide-9
SLIDE 9

Ordinary games The category PC Open games Examples Cool stuff

Game theory has some issues

Well known: equilibrium as behavioural prediction is experimentally falsified (e.g. ultimatum game)

slide-10
SLIDE 10

Ordinary games The category PC Open games Examples Cool stuff

Game theory has some issues

Well known: equilibrium as behavioural prediction is experimentally falsified (e.g. ultimatum game) Harsanyi type spaces are accurate but underfit (and mathematically hard!)

slide-11
SLIDE 11

Ordinary games The category PC Open games Examples Cool stuff

Game theory has some issues

Well known: equilibrium as behavioural prediction is experimentally falsified (e.g. ultimatum game) Harsanyi type spaces are accurate but underfit (and mathematically hard!) There is no accepted operational theory (or “equilibriating process”) (c.f. evolutionary game theory)

slide-12
SLIDE 12

Ordinary games The category PC Open games Examples Cool stuff

Game theory has some issues

Well known: equilibrium as behavioural prediction is experimentally falsified (e.g. ultimatum game) Harsanyi type spaces are accurate but underfit (and mathematically hard!) There is no accepted operational theory (or “equilibriating process”) (c.f. evolutionary game theory) Serious computability/complexity issues (algorithmic game theory)

slide-13
SLIDE 13

Ordinary games The category PC Open games Examples Cool stuff

Game theory has some issues

Well known: equilibrium as behavioural prediction is experimentally falsified (e.g. ultimatum game) Harsanyi type spaces are accurate but underfit (and mathematically hard!) There is no accepted operational theory (or “equilibriating process”) (c.f. evolutionary game theory) Serious computability/complexity issues (algorithmic game theory) Ordinary games do not compose/scale

slide-14
SLIDE 14

Ordinary games The category PC Open games Examples Cool stuff

The fundamental headache of social science

Beliefs have causal effects

slide-15
SLIDE 15

Ordinary games The category PC Open games Examples Cool stuff

Defining PC

PC is a category where: Objects are pairs of sets X

S

  • Morphisms λ :

X

S

Y

R

  • are pairs of functions:

vλ : X → Y uλ : X × R → S

λ is called a lens

slide-16
SLIDE 16

Ordinary games The category PC Open games Examples Cool stuff

Defining PC

PC is a category where: Objects are pairs of sets X

S

  • Morphisms λ :

X

S

Y

R

  • are pairs of functions:

vλ : X → Y uλ : X × R → S

λ is called a lens We draw it like this: X Y R S λ

slide-17
SLIDE 17

Ordinary games The category PC Open games Examples Cool stuff

Intuition for PC

Approximately . . . First part: physical information

X and Y are sets of things an agent can observe or choose

slide-18
SLIDE 18

Ordinary games The category PC Open games Examples Cool stuff

Intuition for PC

Approximately . . . First part: physical information

X and Y are sets of things an agent can observe or choose

Second part: teleological or counterfactual information

R and S are sets of things an agent can optimise or have preferences about

slide-19
SLIDE 19

Ordinary games The category PC Open games Examples Cool stuff

Intuition for PC

Approximately . . . First part: physical information

X and Y are sets of things an agent can observe or choose

Second part: teleological or counterfactual information

R and S are sets of things an agent can optimise or have preferences about

A typical example: f : X → Y is a function Promote to λ : X

R

Y

R

  • with vλ = f

uλ : X × R → R is backpropagation of value If we know x and we know the value of f (x) then uλ tells us what the value of x was

slide-20
SLIDE 20

Ordinary games The category PC Open games Examples Cool stuff

Example: a decision process

(aka. a Markov decision process without the probability) Take a state space S, actions A, transition function f : S × A → S × R

slide-21
SLIDE 21

Ordinary games The category PC Open games Examples Cool stuff

Example: a decision process

(aka. a Markov decision process without the probability) Take a state space S, actions A, transition function f : S × A → S × R Every policy function σ : S → A determines a lens λ : S

R

S

R

  • by

vλ(s) = f (s, σ(s))1 uλ(s, u) = f (s, σ(s))2 + β · u 0 < β < 1 is discount factor

slide-22
SLIDE 22

Ordinary games The category PC Open games Examples Cool stuff

Composing lenses

Given X S

  • λ

− → Y R

  • µ

− → Z Q

  • we can compose them to µ ◦ λ :

X

S

Z

Q

  • (Important non-obvious fact: this is associative)
slide-23
SLIDE 23

Ordinary games The category PC Open games Examples Cool stuff

Composing lenses

Given X S

  • λ

− → Y R

  • µ

− → Z Q

  • we can compose them to µ ◦ λ :

X

S

Z

Q

  • (Important non-obvious fact: this is associative)

Given X1

S1

  • λ1

− → Y1

R1

  • and

X2

S2

  • λ2

− → Y2

R2

  • we can compose them to

X1 × X2 S2 × S1

  • λ1⊗λ2

− − − − → Y1 × Y2 R2 × R1

  • PC is a symmetric monoidal category
slide-24
SLIDE 24

Ordinary games The category PC Open games Examples Cool stuff

Special lenses

f : X → Y lifts to f : X

1

Y

1

  • r f ∗ :

1

Y

1

X

  • X

Y f X Y f

slide-25
SLIDE 25

Ordinary games The category PC Open games Examples Cool stuff

Special lenses

f : X → Y lifts to f : X

1

Y

1

  • r f ∗ :

1

Y

1

X

  • X

Y f X Y f Special case: Every X

1

  • is a comonoid, every

1

X

  • is a monoid
slide-26
SLIDE 26

Ordinary games The category PC Open games Examples Cool stuff

Special lenses

f : X → Y lifts to f : X

1

Y

1

  • r f ∗ :

1

Y

1

X

  • X

Y f X Y f Special case: Every X

1

  • is a comonoid, every

1

X

  • is a monoid

There is canonical εX : X

X

1

1

  • (but no η!)

X X

slide-27
SLIDE 27

Ordinary games The category PC Open games Examples Cool stuff

The counit law

Theorem: εY ◦ ((f , 1) ⊗ (1, idY )) = εX ◦ ((idX, 1) ⊗ (1, f )) aka: X Y f = X Y f

slide-28
SLIDE 28

Ordinary games The category PC Open games Examples Cool stuff

Interesting facts about PC

PC is a dialectica category over a 1-valued logic

hence, a sound model of linear logic

slide-29
SLIDE 29

Ordinary games The category PC Open games Examples Cool stuff

Interesting facts about PC

PC is a dialectica category over a 1-valued logic

hence, a sound model of linear logic

X

S

  • → X, λ → vλ is a fibration

It’s fibrewise opposite of Jacobs’ simple fibration

slide-30
SLIDE 30

Ordinary games The category PC Open games Examples Cool stuff

Interesting facts about PC

PC is a dialectica category over a 1-valued logic

hence, a sound model of linear logic

X

S

  • → X, λ → vλ is a fibration

It’s fibrewise opposite of Jacobs’ simple fibration

Hot off the press: PC is complete (if underlying cat is complete, cocomplete, cartesian closed, . . . )

Work in progress: game theory using Span(PC)

slide-31
SLIDE 31

Ordinary games The category PC Open games Examples Cool stuff

Interesting facts about PC

PC is a dialectica category over a 1-valued logic

hence, a sound model of linear logic

X

S

  • → X, λ → vλ is a fibration

It’s fibrewise opposite of Jacobs’ simple fibration

Hot off the press: PC is complete (if underlying cat is complete, cocomplete, cartesian closed, . . . )

Work in progress: game theory using Span(PC)

Really hot off the press: PC can be defined over a monoidal category: homPC(C) X S

  • ,

Y R

  • =

A∈C homC(X, A⊗Y )×homC(A⊗R, S)

Needed for probabilistic open games etc Universal property: “freely adding counits” Mitchell Riley, Categories of Optics, arXiv

slide-32
SLIDE 32

Ordinary games The category PC Open games Examples Cool stuff

The context functors

V : PC → Set, (X, S) → X, ℓ → vℓ

It’s the view fibration of a lens V ∼ = homPC(I, −)

slide-33
SLIDE 33

Ordinary games The category PC Open games Examples Cool stuff

The context functors

V : PC → Set, (X, S) → X, ℓ → vℓ

It’s the view fibration of a lens V ∼ = homPC(I, −)

K : PCop → Set, (X, S) → X → S

The continuation functor K ∼ = homPC(−, I)

slide-34
SLIDE 34

Ordinary games The category PC Open games Examples Cool stuff

The context functors

V : PC → Set, (X, S) → X, ℓ → vℓ

It’s the view fibration of a lens V ∼ = homPC(I, −)

K : PCop → Set, (X, S) → X → S

The continuation functor K ∼ = homPC(−, I)

Slogan: points are states, continuations are effects

slide-35
SLIDE 35

Ordinary games The category PC Open games Examples Cool stuff

Defining open games

An open game G : X

S

Y

R

  • consists of:

A set ΣG of strategy profiles

slide-36
SLIDE 36

Ordinary games The category PC Open games Examples Cool stuff

Defining open games

An open game G : X

S

Y

R

  • consists of:

A set ΣG of strategy profiles For every σ : ΣG, a lens G(σ) : X

S

Y

R

slide-37
SLIDE 37

Ordinary games The category PC Open games Examples Cool stuff

Defining open games

An open game G : X

S

Y

R

  • consists of:

A set ΣG of strategy profiles For every σ : ΣG, a lens G(σ) : X

S

Y

R

  • For every context (h, k) : V

X

S

  • × K

Y

R

  • , a set EG(h, k) ⊆ ΣG
  • f Nash equilibria
slide-38
SLIDE 38

Ordinary games The category PC Open games Examples Cool stuff

Defining open games

An open game G : X

S

Y

R

  • consists of:

A set ΣG of strategy profiles For every σ : ΣG, a lens G(σ) : X

S

Y

R

  • For every context (h, k) : V

X

S

  • × K

Y

R

  • , a set EG(h, k) ⊆ ΣG
  • f Nash equilibria

Things that have been abstracted away: players, moves, payoffs, maximisation

slide-39
SLIDE 39

Ordinary games The category PC Open games Examples Cool stuff

Defining open games

An open game G : X

S

Y

R

  • consists of:

A set ΣG of strategy profiles For every σ : ΣG, a lens G(σ) : X

S

Y

R

  • For every context (h, k) : V

X

S

  • × K

Y

R

  • , a set EG(h, k) ⊆ ΣG
  • f Nash equilibria

Things that have been abstracted away: players, moves, payoffs, maximisation We draw it like this: X Y R S G

slide-40
SLIDE 40

Ordinary games The category PC Open games Examples Cool stuff

Special open games

A zero player open game has ΣG = 1 and EG(h, k) = {∗} for all (h, k) Zero-player open games X

S

Y

R

  • are in bijection with

lenses X

S

Y

R

slide-41
SLIDE 41

Ordinary games The category PC Open games Examples Cool stuff

Special open games

A zero player open game has ΣG = 1 and EG(h, k) = {∗} for all (h, k) Zero-player open games X

S

Y

R

  • are in bijection with

lenses X

S

Y

R

  • A scalar open game is an open game

1

1

1

1

  • They are determined by a set of strategy profiles, and a subset
  • f Nash equilibria

Every ordinary (eg. extensive form) game determines a scalar

  • pen game
slide-42
SLIDE 42

Ordinary games The category PC Open games Examples Cool stuff

Sequential play

Suppose we have open games X S

  • G

− → Y R

  • H

− → Z Q

  • We define H ◦ G :

X

S

Z

Q

  • like this:

ΣH◦G = ΣG × ΣH (H ◦ G)(σ, τ) = H(τ) ◦ G(σ) The magic part: EH◦G(h, k) =

  • (σ, τ)
  • σ ∈ EG(h, K(H(τ))(k))

τ ∈ EH(V(G(σ))(h), k)

slide-43
SLIDE 43

Ordinary games The category PC Open games Examples Cool stuff

Example

P1 P2 f q X X X Y R R R R G : (1, 1) → (X × Z, R) ΣG = X vG(x)(∗) = (x, f (x)) EG(∗, k) = arg maxx k(x, f (x)) H : (X × Z, R) → (1, 1) ΣH = Z → Y uH(σ)((x, z), ∗) = q1(x, σ(z)) EH((x, z), ∗) = {σ | σ(z) ∈ arg maxy q2(x, y)}

slide-44
SLIDE 44

Ordinary games The category PC Open games Examples Cool stuff

Simultaneous play

. . . is more complicated, cut for time

slide-45
SLIDE 45

Ordinary games The category PC Open games Examples Cool stuff

Finitely generated games

Define an open game AX,Y : X

1

Y

R

  • by

ΣAX,Y = X → Y vAX,Y (σ) = σ EAX,Y (h, k) = {σ | σ(h) ∈ arg max(k)} It’s (a single decision by) an agent N.B. This is the only place we mention R or arg max!

slide-46
SLIDE 46

Ordinary games The category PC Open games Examples Cool stuff

Finitely generated games

Define an open game AX,Y : X

1

Y

R

  • by

ΣAX,Y = X → Y vAX,Y (σ) = σ EAX,Y (h, k) = {σ | σ(h) ∈ arg max(k)} It’s (a single decision by) an agent N.B. This is the only place we mention R or arg max! Fundamental theorem of compositional game theory: The following are in (sensible) bijective correspondence:

1 Scalar open games finitely generated by zero-player open

games, AX,Y , ◦ and ⊗

2 Strategy profiles & pure Nash equilibria of finite-depth

extensive form games of imperfect information

slide-47
SLIDE 47

Ordinary games The category PC Open games Examples Cool stuff

Bimatrix game

A1,X1 A1,X2 q X1 X2 R R R R

slide-48
SLIDE 48

Ordinary games The category PC Open games Examples Cool stuff

Sequential game of perfect information

A1,X AX,Y q X X X Y R R R R

slide-49
SLIDE 49

Ordinary games The category PC Open games Examples Cool stuff

Sequential game of imperfect information

A1,X AZ,Y f q X X X Z Y R R R R

slide-50
SLIDE 50

Ordinary games The category PC Open games Examples Cool stuff

Hybrid sequential-simultaneous game

A1,X AX,Y1 AX,Y2 q X X X Y1 Y2 R R R R

slide-51
SLIDE 51

Ordinary games The category PC Open games Examples Cool stuff

Cool stuff in the past

Morphisms of open games, version 1:

infinitely repeated games are final coalgebras

slide-52
SLIDE 52

Ordinary games The category PC Open games Examples Cool stuff

Cool stuff in the past

Morphisms of open games, version 1:

infinitely repeated games are final coalgebras

Morphisms between open games, version 2:

Nash equilibria are states Subgame perfect equilibria are ⊗-separable states Products are external choice

slide-53
SLIDE 53

Ordinary games The category PC Open games Examples Cool stuff

Cool stuff in the past

Morphisms of open games, version 1:

infinitely repeated games are final coalgebras

Morphisms between open games, version 2:

Nash equilibria are states Subgame perfect equilibria are ⊗-separable states Products are external choice

Bayesian open games

(not released yet) Unexpectedly hard

slide-54
SLIDE 54

Ordinary games The category PC Open games Examples Cool stuff

Cool stuff in the future

Compositional economic modelling

slide-55
SLIDE 55

Ordinary games The category PC Open games Examples Cool stuff

Cool stuff in the future

Compositional economic modelling Composing numerical solution methods

slide-56
SLIDE 56

Ordinary games The category PC Open games Examples Cool stuff

Cool stuff in the future

Compositional economic modelling Composing numerical solution methods Connections with learning

Using deep learning to cheat complexity theory

slide-57
SLIDE 57

Ordinary games The category PC Open games Examples Cool stuff

Cool stuff in the future

Compositional economic modelling Composing numerical solution methods Connections with learning

Using deep learning to cheat complexity theory

Open graphical games

slide-58
SLIDE 58

Ordinary games The category PC Open games Examples Cool stuff

Cool stuff in the future

Compositional economic modelling Composing numerical solution methods Connections with learning

Using deep learning to cheat complexity theory

Open graphical games Getting a compact closed category

Version 1: PC ֒ → Int Version 2: PC ֒ → Span(PC)