32
1

COMPUTATIONAL TECHNIQUES

Embed Size (px)

DESCRIPTION

COMPUTATIONAL TECHNIQUES. 1.6 Computational Techniques. Some details on the Simplex Method approach 2x2 games 2x n and m x2 games Recall : First try pure strategies. If there are no saddle points use mixed strategies. Linear Programming. 1.6.1 Example (page 32). - PowerPoint PPT Presentation

Citation preview

Page 1: COMPUTATIONAL  TECHNIQUES

1

Page 2: COMPUTATIONAL  TECHNIQUES

2

• Some details on the Simplex Method approach

• 2x2 games

• 2xn and mx2 games

• Recall:

First try pure strategies.

If there are no saddle points use mixed strategies.

1.6 Computational Techniques

Page 3: COMPUTATIONAL  TECHNIQUES

3

Page 4: COMPUTATIONAL  TECHNIQUES

4

1.6.1 Example (page 32)

• L = max {-3,-1,-1} = -1

• U = min {3,1,2} = 1

• L < U thus no saddle points, need mixed strategies.

• The value of this game may not be positive, since L ≤ v ≤ U, we have –1 ≤ v ≤ 1.

V =

- 2 1 - 3

- 1 - 1 2

3 0 - 1

È

Î

Í

Í

˘

˚

˙

˙

Page 5: COMPUTATIONAL  TECHNIQUES

5

• Note that

–Adding a constant, r, to every element of a payoff matrix does not change the optimal strategies, but the new game given by this new matrix will have r added to the value of the game.

–Making one row strictly positive is sufficient (see problem sheet) to give a game with positive v.

• Thus we add to every element of the matrix say

r = 2 to make sure the value is strictly positive:

Page 6: COMPUTATIONAL  TECHNIQUES

6

V =

- 2 1 - 3

- 1 - 1 2

3 0 - 1

È

Î

Í

Í

˘

˚

˙

˙

V'V 20 3 11 1 4

5 2 1

Page 7: COMPUTATIONAL  TECHNIQUES

7

LP Formulations

• We prefer Player II’s formulation. Why?

max y '1

+ y '2

+ y '3

s . t .

3 y '2

- y '3£ 1

y '1

+ y '2

+ 4 y '3£ 1

5 y '1

+ 2 y '2

+ y '3£ 1

y '1

, y '2

, y '3

≥ 0

min x '1

+ x '2

+ x '3

s . t .

x '2

+ 5 x '3

≥ 1

3 x '1

+ x '2

+ 2 x '3

≥ 1

- x '1

+ 4 x '2

+ x '3

≥ 1

x '1

, x '2

, x '3

≥ 0

Player I Player II

Page 8: COMPUTATIONAL  TECHNIQUES

8

y ’ 1 y ’ 2 y ’ 3 y ’ 4 y ’ 5 y ’ 6

y ’ 4 0 3 - 1 1 0 0 1

y ’ 5 1 1 4 0 1 0 1

y ’ 6 5 2 1 0 0 1 1

z - 1 - 1 - 1 0 0 0 0

Page 9: COMPUTATIONAL  TECHNIQUES

9

y’1 y’2 y’3 y’4 y’5 y’6

y’4 0 3 -1 1 0 0 1

y’5 0 3/5 19/5 0 1 -1/5 4/5

y’1 1 2/5 1/5 0 0 1/5 1/5

z 0 -3/5 -4/5 0 0 1/5 1/5

Page 10: COMPUTATIONAL  TECHNIQUES

10

y’1 y’2 y’3 y’4 y’5 y’6

y’4 0 60/19 0 1 5/19 -1/19 23/19

y’3 0 3/19 1 0 5/19 -1/19 4/19

y’1 1 7/19 0 0 -1/19 4/19 3/19

z 0 -9/19 0 0 4/19 3/19 7/19

Page 11: COMPUTATIONAL  TECHNIQUES

11

• v’ = 60/33; y’* = (1/60, 23/60, 9/60)• y* = (60/33) (1/60, 23/60, 9/60) = (1/33, 23/33, 9/33)• x’* = (9/60, 1/4, 9/60); • x* = (60/33) (9/60, 1/4, 9/60) = (3/11, 5/11, 3/11). • v = 60/33 – 2 = –2/11.

y ’ 1 y ’ 2 y ’ 3 y ’ 4 y ’ 5 y ’ 6

y ’ 2 0 1 0 1 9 / 6 0 1 / 1 2 - 1 /6 0 2 3 /6 0

y ’ 3 0 0 1 - 1 /2 0 1 / 4 - 1 /2 0 9 / 6 0

y ’ 1 1 0 0 - 7 /2 0 - 1 /1 9 1 3 / 6 0 1 / 6 0

z 0 0 0 9 / 6 0 1 / 4 9 / 6 0 3 3 /6 0

Page 12: COMPUTATIONAL  TECHNIQUES

12

Page 13: COMPUTATIONAL  TECHNIQUES

13

1.6.3 2xn and mx2 Games

• If there are only two pure strategies to one of the players, the decision making problem is “one dimensional” (why?).

• Thus, it is easy to describe and solve the problem graphically.

• We shall assume a 2xn game.

• There are many important problems of this kind: “Yes” vs “No”.

Page 14: COMPUTATIONAL  TECHNIQUES

14

• We look at player 1, as only two choices.• v1 = max {min {xV.j : j = 1,...,n}: x in S}• = max {min {(x1, x2)(v1j,v2j)t: j = 1,...,n}

x1+x2 = 1, x1,x2 ≥ 0}• = max {min (x1,1– x1 )(v1j,v2j)t: j = 1,...,n},

0 ≤ x1 ≤ 1}• = max {min{x1(v1j – v2j) + v2j}: j = 1,...,n}

0 ≤ x1 ≤ 1}How do we solve optimization problems of this

kind?

Analysis for 2xn

Page 15: COMPUTATIONAL  TECHNIQUES

15

v1 = max {min{x1(v1j – v2j) + v2j}: j = 1,...,n}

0 ≤ x1 ≤ 1}

v1 = max { g(x1): 0 ≤ x1 ≤ 1}where

g(x1):= min{x1(v1j – v2j) + v2j } : j = 1,...,n}Observation:• g(x1) is piecewise linear with x1, with vertices where

two or more linear functions intersect.• The maximum of this function will therefore be

attained at one of these vertices • or at x1 = 0 or x1 = 1.• Identifying this vertex will yield a 2x2 subgame

which we can then easily solve.

Page 16: COMPUTATIONAL  TECHNIQUES

16

1.6.4 Example (page 41)

• Note that this is an mx2 case, so here we will look at player 2, thus will have min max. (compare with previous analysis)

• There are no saddle points

• No dominated pure strategies

V =

0 8

9 4

8 6

È

Î

Í

Í

˘

˚

˙

˙

Page 17: COMPUTATIONAL  TECHNIQUES

17

v2 = min{max{Vi.y: i = 1,2,3}, y1+y2 = 1, y1,y2 ≥ 0}

• = min{max{8y2, 9y1+4y2, 8y1+6y2},

•for y1+y2 = 1, y1,y2 ≥ 0}

• = min{max{8 – 8y1, 5y1 + 4, 2y1 + 6}, y1 ≥ 0}

• = min{g(y1): 0 ≤ y1 ≤ 1}

g(y1): = max{8 – 8y1, 5y1 + 4, 2y1 + 6}:

• We can plot g(y1) and identify the linear segments that define the optimal solution.

Page 18: COMPUTATIONAL  TECHNIQUES

18

01

23

4

5

6

0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1

y1

7

8

g(y1):=max{8 – 8y1, 5y1+ 4, 2y1 + 6}

Page 19: COMPUTATIONAL  TECHNIQUES

19

01

23

4

5

6

0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1

y1

7

8

g(y1):=max{8 – 8y1, 5y1+ 4, 2y1 + 6}

Page 20: COMPUTATIONAL  TECHNIQUES

20

01

23

4

5

6

0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1

y1

7

8

g(y1):=max{8 – 8y1, 5y1+ 4, 2y1 + 6}

Page 21: COMPUTATIONAL  TECHNIQUES

21

01

23

4

5

6

0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1

y1

7

8

g(y1):=max{8 – 8y1, 5y1+ 4, 2y1 + 6}

Page 22: COMPUTATIONAL  TECHNIQUES

22

01

23

4

5

6

0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1

y1

7

8

g(y1):=max{8 – 8y1, 5y1+ 4, 2y1 + 6}

Page 23: COMPUTATIONAL  TECHNIQUES

23

01

23

4

5

6

0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1

y1

7

8

v2 = min {g(y1): 0 ≤ y1 ≤ 1}

g(y1):=max{8 – 8y1, 5y1+ 4, 2y1 + 6}

minmax

Page 24: COMPUTATIONAL  TECHNIQUES

24

01

23

4

5

6

0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1

y1

7

8

v2 = min {g(y1): 0 ≤ y1 ≤ 1}

g(y1):=max{8 – 8y1, 5y1+ 4, 2y1 + 6}

Page 25: COMPUTATIONAL  TECHNIQUES

25

01

23

4

5

6

0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1

y1

7

8

v2 = min {g(y1): 0 ≤ y1 ≤ 1}

•Optimal y1: 8 – 8y1 = 2y1 + 6 , y1 = 0.2,

• y2 = 1– y1 = 0.8, • y* = (0.2, 0.8)

g(y1):=max{8 – 8y1, 5y1+ 4, 2y1 + 6}

Page 26: COMPUTATIONAL  TECHNIQUES

26

Player I

• Since the optimal solution to Player II involves the 1st and 3rd rows of V, we conclude that the optimal solution to Player I can be obtained from the reduced payoff matrix consisting of these two rows.

• We thus set x2 = 0.

Page 27: COMPUTATIONAL  TECHNIQUES

27

V ' =

0 8

8 6

È

Î Í

˘

˚ ˙

• By Theorem 1.6.2, (recipe for 2x2 games)

x’ = (0.2, 0.8)

v’ = 32/5

• Thus, the optimal strategy for the “full” game is

x* = (0.2, 0, 0.8)

y* = (0.2, 0.8)

• Also see notes about evaluating all 2x2 subgames as another approach.

Page 28: COMPUTATIONAL  TECHNIQUES

28

Page 29: COMPUTATIONAL  TECHNIQUES

29

Overview zero-sum two-person games• Assumption - play from pessimistic viewpoint.

• L = Player I’s largest security level

= lower value of game.

• U = Player II’s lowest security level

= upper value of game.

• In general L ≤ U.

• Iff L = U we have a saddle point, say (ai*, Aj*) which gives stable (equilib.) solution, and value

v = L = U.

• Solution - pure strategies:

• X* = (0, 0, ...0, 1, 0 ..., 0), Y* = (0, ...0, 1, 0, ... 0)

• Player I can choose row i* and II choose column j* and play these all the time and be happy.

Page 30: COMPUTATIONAL  TECHNIQUES

30

• Case L < U. Not possible to find a pair of pure strategies with the solution in equilibrium.

• We determine an optimal strategy based on what a person will gain on average - thinking of playing game repeatedly many times.

• Players mix up the strategies they use to maximize their expected payoff.

• Expected payoff E(X, Y) = XVY.

• v1= I’s largest security level

=maxX in S minY in T XVY

• v2 = II’s largest sec level

= minY in T maxX in S XVY

• v1 and v2 compare to L and U in the case L = U.

Page 31: COMPUTATIONAL  TECHNIQUES

31

• There is always an X* & Y* pair such that

v1 = v2 = v = X*VY*, the value of the game

and this pair is in equilibrium,

• i.e. XVY* ≤ X*VY* ≤ X*VY for all X in S and all Y in T.

Page 32: COMPUTATIONAL  TECHNIQUES

32

• To solve a 2-person, zero-sum game

• Check for saddle point.

• If saddle, give saddle point and value of game.

• If no saddle

• Try to reduce size using dominance.

• If reduced game of size 2x2, use formulae.

• If 2xm or nx2 use graph + formulae or LP.

• Otherwise use linear programming methods.