Probabilistic Open Games Neil Ghani, Clemens Kupke, Alasdair - - PowerPoint PPT Presentation

probabilistic open games
SMART_READER_LITE
LIVE PREVIEW

Probabilistic Open Games Neil Ghani, Clemens Kupke, Alasdair - - PowerPoint PPT Presentation

Probabilistic Open Games Neil Ghani, Clemens Kupke, Alasdair Lambert, Fredrik Nordvall Forsberg University Of Strathclyde SYCO3, Oxford, 28 March 2019 Game Theory What is Game Theory? The mathematical study of strategic interaction between


slide-1
SLIDE 1

Probabilistic Open Games

Neil Ghani, Clemens Kupke, Alasdair Lambert, Fredrik Nordvall Forsberg

University Of Strathclyde

SYCO3, Oxford, 28 March 2019

slide-2
SLIDE 2

Game Theory

slide-3
SLIDE 3

What is Game Theory?

◮ The mathematical study of strategic interaction between rational agents

2 / 25

slide-4
SLIDE 4

What is Game Theory?

◮ The mathematical study of strategic interaction between rational agents ◮ Agents pick a strategy to play

2 / 25

slide-5
SLIDE 5

What is Game Theory?

◮ The mathematical study of strategic interaction between rational agents ◮ Agents pick a strategy to play ◮ The outcome is determined by collective action of all agents

2 / 25

slide-6
SLIDE 6

What is Game Theory?

◮ The mathematical study of strategic interaction between rational agents ◮ Agents pick a strategy to play ◮ The outcome is determined by collective action of all agents ◮ The outcome determines the utility each agent receives

2 / 25

slide-7
SLIDE 7

What is Game Theory?

◮ The mathematical study of strategic interaction between rational agents ◮ Agents pick a strategy to play ◮ The outcome is determined by collective action of all agents ◮ The outcome determines the utility each agent receives ◮ Analyse these games via equilibrium

2 / 25

slide-8
SLIDE 8

What is an equilibrium?

(σ0, σ1) Nash Equilibrium if ◮ σ0 ∈ arg max

σ′∈Σ0

{u0(σ′, σ1)}; and ◮ σ1 ∈ arg max

σ′′∈Σ1

{u1(σ0, σ′′)}

3 / 25

slide-9
SLIDE 9

Prisoner’s dilemma

Player 1 Player 2 C D C 3, 3 0, 4 D 4, 0 1, 1

4 / 25

slide-10
SLIDE 10

Prisoner’s dilemma

Player 1 Player 2 C D C 3, 3 0, 4 D 4, 0 1, 1 Only equilibrium: (D, D).

4 / 25

slide-11
SLIDE 11

Matching Pennies

Alice Bob H T H −1, 1 1, −1 T 1, −1 −1, 1

5 / 25

slide-12
SLIDE 12

Matching Pennies

Alice Bob H T H −1, 1 1, −1 T 1, −1 −1, 1 No equilibrium.

5 / 25

slide-13
SLIDE 13

Matching Pennies

Alice Bob H T H −1, 1 1, −1 T 1, −1 −1, 1 No pure equilibrium.

5 / 25

slide-14
SLIDE 14

Matching Pennies

Alice Bob H T H −1, 1 1, −1 T 1, −1 −1, 1 No pure equilibrium. Only mixed equilibrium: both play 1

2H + 1 2T.

5 / 25

slide-15
SLIDE 15

Problems with Game Theory

◮ Complexity issues ◮ Finding equilibria is computationally hard ◮ Games do not compose

6 / 25

slide-16
SLIDE 16

Pure Open Games

slide-17
SLIDE 17

Pure Open Games [Hedges 2016]

Neil Ghani, Jules Hedges, Viktor Winschel, Philipp Zahn Compositional game theory. LICS 2018. ◮ A framework for building games compositionally ◮ Applying Category Theory to Game Theory

7 / 25

slide-18
SLIDE 18

Pure open games: definition

X S Y R Σ Let X, Y , R and S be sets. A pure open game G : (X, S) → (Y , R) consists of:

8 / 25

slide-19
SLIDE 19

Pure open games: definition

X S Y R Σ Let X, Y , R and S be sets. A pure open game G : (X, S) → (Y , R) consists of: ◮ a set Σ of strategy profiles for G

8 / 25

slide-20
SLIDE 20

Pure open games: definition

X S Y R Σ Let X, Y , R and S be sets. A pure open game G : (X, S) → (Y , R) consists of: ◮ a set Σ of strategy profiles for G ◮ a play function P : Σ × X → Y

8 / 25

slide-21
SLIDE 21

Pure open games: definition

X S Y R Σ Let X, Y , R and S be sets. A pure open game G : (X, S) → (Y , R) consists of: ◮ a set Σ of strategy profiles for G ◮ a play function P : Σ × X → Y ◮ a coutility function C : Σ × X × R → S

8 / 25

slide-22
SLIDE 22

Pure open games: definition

X S Y R Σ Let X, Y , R and S be sets. A pure open game G : (X, S) → (Y , R) consists of: ◮ a set Σ of strategy profiles for G ◮ a play function P : Σ × X → Y ◮ a coutility function C : Σ × X × R → S ◮ an equilibrium function E : X × (Y → R) → P(Σ) .

8 / 25

slide-23
SLIDE 23

Pure open games: parallel composition

X S Y R Σ ⊗ X’ Y’ R’ S’ Σ′

9 / 25

slide-24
SLIDE 24

Pure open games: parallel composition

X×X’ S×S’ Y×Y’ R×R’ Σ × Σ′

9 / 25

slide-25
SLIDE 25

Pure open games: sequential composition

X S Y R Y R Σ T Z Σ′

  • 10 / 25
slide-26
SLIDE 26

Pure open games: sequential composition

X S Z T Σ × Σ′

10 / 25

slide-27
SLIDE 27

Incorporating mixed strategies

◮ Want to also capture mixed strategies. ◮ Solution: use the distributions monad for categorical probability theory [Perrone 2018].

11 / 25

slide-28
SLIDE 28

Commutative Monads

slide-29
SLIDE 29

Monads and strength

◮ A strong monad on a monoidal category C is a monad (T, η, µ) with a left strength sl : A ⊗ TB → T(A ⊗ B).

12 / 25

slide-30
SLIDE 30

Monads and strength

◮ A strong monad on a monoidal category C is a monad (T, η, µ) with a left strength sl : A ⊗ TB → T(A ⊗ B). ◮ If C is symmetric monoidal, we can define a right strength sr : TA ⊗ B → T(A ⊗ B) by TA ⊗ B

γ

B ⊗ TA

sl

T(B ⊗ A)

Tγ T(A ⊗ B)

12 / 25

slide-31
SLIDE 31

Commutative monads

A strong monad on a symmetric monoidal category is commutative if TA ⊗ TB

sl

  • sr
  • T(TA ⊗ B)

Tsr TT(A ⊗ B) µ

  • T(A ⊗ TB)

Tsl TT(A ⊗ B) µ

T(A ⊗ B)

We call this map ℓ : TA ⊗ TB → T(A ⊗ B).

13 / 25

slide-32
SLIDE 32

The finite distribution monad D : Set → Set

Probability distribution on X: ◮ function ω : X → [0, 1] ◮

x

ω(x) = 1 ◮ finite support.

14 / 25

slide-33
SLIDE 33

The finite distribution monad D : Set → Set

Probability distribution on X: ◮ function ω : X → [0, 1] ◮

x

ω(x) = 1 ◮ finite support. D(X) collection of distributions on X. ◮ η : X → DX point distribution. ◮ µ : D2X → DX flattens distributions of distributions. ◮ ℓ : DX × DY → D(X × Y ) independent joint distribution. ◮ D-algebras: convex sets R, with “expectation” E : DR → R.

14 / 25

slide-34
SLIDE 34

Probabilistic Open Games

slide-35
SLIDE 35

Probabilistic Open Games

Let X and Y be sets, and R and S D-algebras. A probabilistic open game G : (X, S) → (Y , R) consists of

15 / 25

slide-36
SLIDE 36

Probabilistic Open Games

Let X and Y be sets, and R and S D-algebras. A probabilistic open game G : (X, S) → (Y , R) consists of ◮ a set Σ of strategies

15 / 25

slide-37
SLIDE 37

Probabilistic Open Games

Let X and Y be sets, and R and S D-algebras. A probabilistic open game G : (X, S) → (Y , R) consists of ◮ a set Σ of strategies ◮ a play function P : Σ × X → Y

15 / 25

slide-38
SLIDE 38

Probabilistic Open Games

Let X and Y be sets, and R and S D-algebras. A probabilistic open game G : (X, S) → (Y , R) consists of ◮ a set Σ of strategies ◮ a play function P : Σ × X → Y ◮ a coutility function C : Σ × X × R → S

15 / 25

slide-39
SLIDE 39

Probabilistic Open Games

Let X and Y be sets, and R and S D-algebras. A probabilistic open game G : (X, S) → (Y , R) consists of ◮ a set Σ of strategies ◮ a play function P : Σ × X → Y ◮ a coutility function C : Σ × X × R → S ◮ an equilibrium function E : X × (Y → R) → P(DΣ)

15 / 25

slide-40
SLIDE 40

Parallel composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (X ′, S′) → (Y ′, R′) we need to define the equilibrium EG⊗H : X × X ′ × (Y × Y ′ → R × R′) → P(D(Σ × Σ′))

16 / 25

slide-41
SLIDE 41

Parallel composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (X ′, S′) → (Y ′, R′) we need to define the equilibrium EG⊗H : X × X ′ × (Y × Y ′ → R × R′) → P(D(Σ × Σ′)) Φ ∈EG⊗H (x1, x2) k iff

16 / 25

slide-42
SLIDE 42

Parallel composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (X ′, S′) → (Y ′, R′) we need to define the equilibrium EG⊗H : X × X ′ × (Y × Y ′ → R × R′) → P(D(Σ × Σ′)) Φ ∈EG⊗H (x1, x2) k iff Φ = ℓ(φ1, φ2) and

16 / 25

slide-43
SLIDE 43

Parallel composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (X ′, S′) → (Y ′, R′) we need to define the equilibrium EG⊗H : X × X ′ × (Y × Y ′ → R × R′) → P(D(Σ × Σ′)) Φ ∈EG⊗H (x1, x2) k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG

16 / 25

slide-44
SLIDE 44

Parallel composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (X ′, S′) → (Y ′, R′) we need to define the equilibrium EG⊗H : X × X ′ × (Y × Y ′ → R × R′) → P(D(Σ × Σ′)) Φ ∈EG⊗H (x1, x2) k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x1

16 / 25

slide-45
SLIDE 45

Parallel composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (X ′, S′) → (Y ′, R′) we need to define the equilibrium EG⊗H : X × X ′ × (Y × Y ′ → R × R′) → P(D(Σ × Σ′)) Φ ∈EG⊗H (x1, x2) k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x1 E[D(π0) ◦ D(k) ◦ ℓ(η_, D(PH(_, x2))φ2)] and

16 / 25

slide-46
SLIDE 46

Parallel composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (X ′, S′) → (Y ′, R′) we need to define the equilibrium EG⊗H : X × X ′ × (Y × Y ′ → R × R′) → P(D(Σ × Σ′)) Φ ∈EG⊗H (x1, x2) k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x1 E[D(π0) ◦ D(k) ◦ ℓ(η_, D(PH(_, x2))φ2)] and φ2 ∈EH x2 E[D(π1) ◦ D(k) ◦ ℓ(D(PG(_, x1))φ1, η_)]

16 / 25

slide-47
SLIDE 47

Independent strategies

◮ Φ is an independent joint distribution Φ = ℓ(φ1, φ2): Φ(σ, σ′) = φ1(σ)φ2(σ′)

17 / 25

slide-48
SLIDE 48

Independent strategies

◮ Φ is an independent joint distribution Φ = ℓ(φ1, φ2): Φ(σ, σ′) = φ1(σ)φ2(σ′) ◮ No collusion between players.

17 / 25

slide-49
SLIDE 49

Independent strategies

◮ Φ is an independent joint distribution Φ = ℓ(φ1, φ2): Φ(σ, σ′) = φ1(σ)φ2(σ′) ◮ No collusion between players. ◮ Mathematically: needed for associativity of composition.

17 / 25

slide-50
SLIDE 50

Sequential composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (Y , R) → (Z, T) we need to define the equilibrium EH◦G : X × (Z → T) → P(ΣG × ΣH)

18 / 25

slide-51
SLIDE 51

Sequential composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (Y , R) → (Z, T) we need to define the equilibrium EH◦G : X × (Z → T) → P(ΣG × ΣH) Φ ∈EH◦G x k iff

18 / 25

slide-52
SLIDE 52

Sequential composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (Y , R) → (Z, T) we need to define the equilibrium EH◦G : X × (Z → T) → P(ΣG × ΣH) Φ ∈EH◦G x k iff Φ = ℓ(φ1, φ2) and

18 / 25

slide-53
SLIDE 53

Sequential composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (Y , R) → (Z, T) we need to define the equilibrium EH◦G : X × (Z → T) → P(ΣG × ΣH) Φ ∈EH◦G x k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG

18 / 25

slide-54
SLIDE 54

Sequential composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (Y , R) → (Z, T) we need to define the equilibrium EH◦G : X × (Z → T) → P(ΣG × ΣH) Φ ∈EH◦G x k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x

18 / 25

slide-55
SLIDE 55

Sequential composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (Y , R) → (Z, T) we need to define the equilibrium EH◦G : X × (Z → T) → P(ΣG × ΣH) Φ ∈EH◦G x k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x E[D(CH)ℓ(φ2, ℓ(η_, D(k)(PH ◦ ℓ(φ2, η_))))]) and

18 / 25

slide-56
SLIDE 56

Sequential composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (Y , R) → (Z, T) we need to define the equilibrium EH◦G : X × (Z → T) → P(ΣG × ΣH) Φ ∈EH◦G x k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x E[D(CH)ℓ(φ2, ℓ(η_, D(k)(PH ◦ ℓ(φ2, η_))))]) and φ2 ∈EH ? k

18 / 25

slide-57
SLIDE 57

Sequential composition

Play, coplay same as in pure case. For games G : (X, S) → (Y , R) and H : (Y , R) → (Z, T) we need to define the equilibrium EH◦G : X × (Z → T) → P(ΣG × ΣH) Φ ∈EH◦G x k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x E[D(CH)ℓ(φ2, ℓ(η_, D(k)(PH ◦ ℓ(φ2, η_))))]) and φ2 ∈EH ? k how do we produce a state for the second game?

18 / 25

slide-58
SLIDE 58

Condition for second game

EH : Y × (Z → T) → P(DΣH)

19 / 25

slide-59
SLIDE 59

Condition for second game

EH(_, k) : Y → P(DΣH)

19 / 25

slide-60
SLIDE 60

Condition for second game

EH(_, k) : Y → P(DΣH) D(P1(_, x))φ1 : DY

19 / 25

slide-61
SLIDE 61

Condition for second game

EH(_, k) : Y → P(DΣH) D(P1(_, x))φ1 : DY Want to “lift” EH(_, k) from inputs in Y to inputs in DY .

19 / 25

slide-62
SLIDE 62

Kleisli relational lifting

R : X → P(DY ) D#(R) : DX → P(DY ) Compare: Kleisli lifting Relational lifting f : X → DY f # : DX → DY R ∈ P(X × Y ) D(R) ∈ P(DX × DY )

20 / 25

slide-63
SLIDE 63

Constructing D#(R)

R : X → P(DY ) D#(R) : DX → P(DY ) DX

DR

DPDY

λ

PD2Y

Pµ P(DY )

21 / 25

slide-64
SLIDE 64

Constructing D#(R)

R : X → P(DY ) D#(R) : DX → P(DY ) DX

DR

DPDY

λ

PD2Y

Pµ P(DY )

Here λ : DP → PD distributive law of functors (not of monads! [Zwart and Marsden 2018]).

21 / 25

slide-65
SLIDE 65

Sequential composition, take 2

Φ ∈EH◦G x k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x E[D(CH)ℓ(φ2, ℓ(η_, D(k)(PH ◦ ℓ(φ2, η_))))]) and

22 / 25

slide-66
SLIDE 66

Sequential composition, take 2

Φ ∈EH◦G x k iff Φ = ℓ(φ1, φ2) and φ1 ∈EG x E[D(CH)ℓ(φ2, ℓ(η_, D(k)(PH ◦ ℓ(φ2, η_))))]) and φ2 ∈D#(E k) (D(P1(_, x))φ1)

22 / 25

slide-67
SLIDE 67

Compositional game theory with mixed strategies

Theorem

Probabilistic open games are the morphisms of a monoidal category, with ⊗ and ◦ given by parallel and sequential composition.∗

∗ Some details still to be checked.

23 / 25

slide-68
SLIDE 68

Matching pennies compositionally

Two (identical) component games P1, P2 : (1, R) → ({H, T}, R) with

24 / 25

slide-69
SLIDE 69

Matching pennies compositionally

Two (identical) component games P1, P2 : (1, R) → ({H, T}, R) with ◮ Strategies Σ = {H, T}

24 / 25

slide-70
SLIDE 70

Matching pennies compositionally

Two (identical) component games P1, P2 : (1, R) → ({H, T}, R) with ◮ Strategies Σ = {H, T} ◮ play and coutility functions trivial

24 / 25

slide-71
SLIDE 71

Matching pennies compositionally

Two (identical) component games P1, P2 : (1, R) → ({H, T}, R) with ◮ Strategies Σ = {H, T} ◮ play and coutility functions trivial ◮ equilibrium maximising expected utility φ ∈ E(u) iff φ ∈ arg max

φ′∈DΣ

{E[D(u)φ′]}

24 / 25

slide-72
SLIDE 72

Matching pennies compositionally

Two (identical) component games P1, P2 : (1, R) → ({H, T}, R) with ◮ Strategies Σ = {H, T} ◮ play and coutility functions trivial ◮ equilibrium maximising expected utility φ ∈ E(u) iff φ ∈ arg max

φ′∈DΣ

{E[D(u)φ′]}

Theorem

MP = P1 ⊗ P2.

24 / 25

slide-73
SLIDE 73

Conclusions

◮ Open games with mixed strategies. ◮ Parallel and sequential composition. In the future: ◮ Infinite games ◮ Universal properties and adjunctions via 2-cells ◮ Other commutative monads (quitting games) ◮ Monad transformers and other solution concepts

25 / 25

slide-74
SLIDE 74

Conclusions

◮ Open games with mixed strategies. ◮ Parallel and sequential composition. In the future: ◮ Infinite games ◮ Universal properties and adjunctions via 2-cells ◮ Other commutative monads (quitting games) ◮ Monad transformers and other solution concepts

Thank you!

25 / 25