D2 5.5 - Games as linear programs

D2 5.5 - Games as linear programs

You will formulate a game as a linear program, use Simplex tableaux, and interpret and verify optimal mixed strategies in the original game.

Turn a guaranteed pay-off into linear constraints

If adding 22 to every pay-off makes a game easier to calculate, would adding 33 instead change how the players should play? The numbers in the optimisation change, but the original game and its best strategies do not.

You already know

A's mixed strategy assigns non-negative probabilities summing to one to its rows. Against each column, its expected pay-off is a probability-weighted sum. A maximises the least of those expectations; B tries to limit the largest response. A pay-off matrix is for row player A unless stated otherwise.

A linear program maximises or minimises a linear objective subject to linear constraints and stated variable domains. Here the decision variables are A's row probabilities and the expected pay-off it can guarantee. A game without a stable pure solution can be solved this way even when neither player has just two options.

A common augmentation

Add the same constant KK to every original matrix entry aija_{ij}, forming cij=aij+Kc_{ij}=a_{ij}+K. Every pair of mixed strategies then increases A's expected pay-off by exactly KK, because their probabilities sum to one.

Thus optimal strategies are unchanged. If the augmented game has value VV, the original value to A is v=V−Kv=V-K; B's original value is −v-v.

Choose KK as directed in a question. Making all entries non-negative is a common requirement. In our worked models choose every entry strictly positive, which also makes the Simplex starting construction below easy to justify. If the least original entry is −1-1, either K=2K=2 or K=3K=3 does this.

For three rows with probabilities p1,p2,p3p_1,p_2,p_3, a guarantee VV means that every column expectation is at least VV. There is one such constraint per column, not per row.

The probability model

For an augmented matrix C=(cij)\boldsymbol C=(c_{ij}), maximise P=VP=V, subject to

V−∑icijpi≤0for every column jV-\sum_i c_{ij}p_i\leq0\quad\text{for every column }j ∑ipi=1,pi≥0\sum_i p_i=1,\qquad p_i\geq0

When the augmented entries are non-negative, take V≥0V\geq0. Afterwards use

v=V−Kv=V-K

Not in the formula booklet: learn it.

For the positive augmented games used here, replace the probability equality temporarily by ∑ipi≤1\sum_i p_i\leq1 to obtain an easy starting tableau. These intermediate variables represent allocated probability mass, not a complete playable strategy until the sum is one. No optimum can leave mass unused: adding it to any row increases every column expectation, since all entries are positive. A feasible positive guarantee exists, so an optimum uses the full mass. The relaxed program therefore has the same optimum as the probability model.

This auxiliary starting point is useful: V=0V=0 and all pi=0p_i=0 satisfy its inequalities. Simplex moves between feasible tableaux until it reaches an optimal complete distribution.

Key idea

One row mixture must meet every column's guarantee constraint. Adding one common KK preserves strategy comparisons; subtract KK from A's final augmented value, then negate to obtain B's original value.

Check which quantity is preserved.

Construct the initial game tableau

A slack variable turns a less-than-or-equal constraint into an equation. Use non-negative r1,r2,r3r_1,r_2,r_3 for the three column constraints and uu for unused probability capacity:

V−∑icijpi+rj=0,∑ipi+u=1V-\sum_i c_{ij}p_i+r_j=0,\qquad \sum_i p_i+u=1

Write the objective as P−V=0P-V=0. The tableau lists coefficients of variables, with the right-hand side in the Value column. The objective row labelled PP has an implicit coefficient 11 on PP; no separate PP column is needed.

Worked example 1: one constraint per opponent response

Question. Form an initial Simplex tableau for the following game, augmenting every entry by 22:

A=(0−1110−1−110)\boldsymbol A=\begin{pmatrix}0&-1&1\\1&0&-1\\-1&1&0\end{pmatrix}

Plan. Check pure stability, augment, read down each column, and add the probability-capacity row and objective.

Row minima are all −1-1, column maxima all 11, so there is no stable pure solution. The augmented matrix is

C=(213321132)\boldsymbol C=\begin{pmatrix}2&1&3\\3&2&1\\1&3&2\end{pmatrix}

Maximise P=VP=V, subject to

V−2p1−3p2−p3≤0V−p1−2p2−3p3≤0V−3p1−p2−2p3≤0p1+p2+p3≤1\begin{aligned} V-2p_1-3p_2-p_3&\leq0\\ V-p_1-2p_2-3p_3&\leq0\\ V-3p_1-p_2-2p_3&\leq0\\ p_1+p_2+p_3&\leq1 \end{aligned}

with all variables non-negative. Adding slack variables gives:

Basic variableVVp1p_1p2p_2p3p_3r1r_1r2r_2r3r_3uuValue
r1r_111−2-2−3-3−1-11100000000
r2r_211−1-1−2-2−3-30011000000
r3r_311−3-3−1-1−2-20000110000
uu001111110000001111
PP−1-10000000000000000

Why use columns? Each column is one possible choice by B, against which A's same row distribution must guarantee VV.

Answer. The displayed tableau is the required initial tableau. Its basic variables are r1,r2,r3,ur_1,r_2,r_3,u.

Check. Their columns form an identity matrix in the constraint rows and have zero objective coefficients. Setting all non-basic variables to zero gives slack values 0,0,0,10,0,0,1, all feasible. The row probabilities do not yet sum to one at this auxiliary starting point.

Change only the original top-left entry from 00 to 11, keeping the augmentation 22.

Worked example 2: change just one tableau coefficient

Question. Construct the initial tableau for the changed game.

Plan. Augment the changed entry and locate its column constraint.

C=(313321132)\boldsymbol C=\begin{pmatrix}3&1&3\\3&2&1\\1&3&2\end{pmatrix}

Only the first constraint changes, to

V−3p1−3p2−p3≤0V-3p_1-3p_2-p_3\leq0

The complete initial tableau is:

Basic variableVVp1p_1p2p_2p3p_3r1r_1r2r_2r3r_3uuValue
r1r_111−3-3−3-3−1-11100000000
r2r_211−1-1−2-2−3-30011000000
r3r_311−3-3−1-1−2-20000110000
uu001111110000001111
PP−1-10000000000000000

Why does just one coefficient change? The altered entry is the contribution of row 1 to B's first-column response. Other response expectations are unaffected.

Answer. Use the displayed tableau; its only change from worked example 1 is −2-2 to −3-3 in the r1r_1 row, p1p_1 column.

Check. The basis, Value column, probability-capacity equation and objective are unchanged. Pure row minima remain −1-1 and column maxima 11, so the changed game still lacks a stable pure solution.

A tableau contains signs as well as magnitudes: the guarantee term is positive in a constraint row, while the expected-pay-off terms are subtracted.

Watch out

Wrong: use one expected-pay-off constraint per row, or enter positive pay-off coefficients beside VV. Right: read down each augmented column and write V−expected pay-off+slack=0V-\text{expected pay-off}+\text{slack}=0.

Change the same original entry once more.

Use Simplex pivots, including zero-ratio ties

A basic variable has an identity column: one 11 in its own constraint row and zeros in all other constraint rows and the objective row. Set non-basic variables to zero, then read basic values from the Value column. A pivot swaps one non-basic variable into the basis and one basic variable out, using equivalent row equations.

Simplex for these maximisation tableaux

Use this procedure with the objective written in the form P−objective expression=0P-\text{objective expression}=0.

  1. Choose a negative coefficient in the objective row as the entering column; use the most negative if instructed, as in our examples.
  2. In constraint rows with a strictly positive entering-column entry, calculate Value/entry\text{Value}/\text{entry}. Choose the least non-negative ratio. A zero ratio is eligible; a tie can be resolved by a stated choice.
  3. Divide the entire leaving row by its pivot entry. Rename its basic variable as the entering variable.
  4. Eliminate the entering variable from every other row, including the objective, using the new pivot row. Update every column, including Value.
  5. Repeat. When every variable coefficient in the objective row is non-negative, the current feasible basic solution is optimal.

Not in the formula booklet: learn it.

The ratio test prevents a basic value becoming negative. A zero-ratio pivot may change the basis while leaving the current point and objective unchanged. That is common at a game's auxiliary starting point; excluding zero would give an incorrect pivot.

Worked example 3: solve a complete small game

Question. Solve (1−1−11)\left(\begin{smallmatrix}1&-1\\-1&1\end{smallmatrix}\right) by Simplex, augmenting by 22. Use the most negative objective coefficient and take the first row in a ratio tie.

Plan. Use augmented matrix (3113)\left(\begin{smallmatrix}3&1\\1&3\end{smallmatrix}\right), form the starting tableau, and pivot until the objective row has no negative coefficient.

Basic variableVVp1p_1p2p_2r1r_1r2r_2uuValue
r1r_111−3-3−1-111000000
r2r_211−1-1−3-300110000
uu00111100001111
PP−1-1000000000000

First pivot. VV enters. The first two ratios are both 0/1=00/1=0; uu's VV coefficient is zero, so that row is ineligible. Choose r1r_1 to leave. Its pivot is already 11. Subtract this row from the second row and add it to PP; uu is unchanged.

Basic variableVVp1p_1p2p_2r1r_1r2r_2uuValue
VV11−3-3−1-111000000
r2r_20022−2-2−1-1110000
uu00111100001111
PP00−3-3−1-111000000

Second pivot. p1p_1 enters. Eligible ratios are 0/2=00/2=0 in r2r_2, and 1/1=11/1=1 in uu. Thus r2r_2 leaves. Divide that row by 22. Add three new pivot rows to VV and PP, and subtract one from uu.

Basic variableVVp1p_1p2p_2r1r_1r2r_2uuValue
VV1100−4-4−1/2-1/23/23/20000
p1p_10011−1-1−1/2-1/21/21/20000
uu0000221/21/2−1/2-1/21111
PP0000−4-4−1/2-1/23/23/20000

Third pivot. p2p_2 enters; only uu has a positive entry in that column, giving ratio 1/21/2. Divide uu's row by 22; add four new pivot rows to VV and PP, and one to p1p_1.

Basic variableVVp1p_1p2p_2r1r_1r2r_2uuValue
VV1100001/21/21/21/22222
p1p_1001100−1/4-1/41/41/41/21/21/21/2
p2p_20000111/41/4−1/4-1/41/21/21/21/2
PP0000001/21/21/21/22222

Why stop? The objective equation is

P+12r1+12r2+2u=2P+\tfrac12 r_1+\tfrac12 r_2+2u=2

All variables on the left besides PP are non-negative, so P≤2P\leq2. The current solution attains that upper bound.

Answer. p1=p2=1/2p_1=p_2=1/2, V=2V=2; the original value is 2−2=02-2=0. B also uses its two columns equally.

Check. Each original column gives expectation zero against A's mixture; each original row gives zero against B's mixture. Thus both game guarantees agree. The two initial zero-ratio pivots left PP at zero; the final pivot raised it to 22.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account