should a football team run or pass? a linear programming approach to game theory

35
Should a football team run or pass? A game theory approach Laura Albert McLay Badger Bracketology @lauramclay @badgerbrackets http://bracketology.engr.wisc.edu/ © 2015

Upload: laura-albert-mclay

Post on 19-Jan-2017

8.562 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Should a football team run or pass? A linear programming approach to game theory

Should a football team run or pass?

A game theory approach

Laura Albert McLayBadger Bracketology

@lauramclay@badgerbrackets

http://bracketology.engr.wisc.edu/

© 2015

Page 2: Should a football team run or pass? A linear programming approach to game theory

The problem

• An offense can run or pass the ball

• The defense anticipates the offense’s choice and

chooses a run or pass offense.

• Given this strategic interaction,

o what is the best mix of pass and run plays for the offense?

o what is the best mix of pass and run defenses?

Page 3: Should a football team run or pass? A linear programming approach to game theory

The solution:

Linear programming!

Page 4: Should a football team run or pass? A linear programming approach to game theory

Definitions

• Players

• Actions

• Information

• Strategies

• Payoffs

• Equilibria

Eventually we’ll relate this to linear programming!

Page 5: Should a football team run or pass? A linear programming approach to game theory

Definitions

• Players: we have 2

• Actions: discrete actions of actions available to each player and when they are available (order of play)

• Information: what each player knows about variables at each point in time

• Strategies: a rule that tells each player which action to choose at each decision point

• Payoffs: the expected utility/reward each player receives as a function of every players’ decisions

• Equilibria: strategy profiles consisting of best strategies for each of the players in the game

Page 6: Should a football team run or pass? A linear programming approach to game theory

Payoff matrix

• A two person game is between a row player R and a

column player C

• A zero-sum game is defined by a � × �payoff matrix

� where ��� is the payoff to C if C chooses action and R chooses action o R chooses from the rows ∈ {1,… ,�}o C chooses from the columns ∈ {1,… , �}o Note: deterministic strategies can be bad!

• Zero-sum: my gain is your loss. Examples?

Page 7: Should a football team run or pass? A linear programming approach to game theory

Rock-Paper-Scissors

• Payoff matrix?

� =� � �

���

Page 8: Should a football team run or pass? A linear programming approach to game theory

Rock-Paper-Scissors

Payoff matrix?

� =� � �

���

0 1 −1−1 0 11 −1 0

Why is this zero sum?

Strategies:

• Deterministic: pure strategies

• Random/stochastic: mixed strategies

Page 9: Should a football team run or pass? A linear programming approach to game theory

Strategies

Payoff matrix �• A strategy for a player is a probability vector

representing the portion of time each action is used

o R chooses with probability ��� = ��, ��, … , �� �

o C chooses with probability ��� = ��, �� , … , �� �

o We have: �� ≥ 0, = 1,… , �∑ ��� = 1

Page 10: Should a football team run or pass? A linear programming approach to game theory

Payoffs

Expected payoff from R to C:

�, � =!!���������

= ����

Note:

• � and � are our variables

Problem:

• We want to solve this as a linear program but �, � is a

quadratic function with two players with opposing goals.

Page 11: Should a football team run or pass? A linear programming approach to game theory

Solution

Game theory to the rescue!

Page 12: Should a football team run or pass? A linear programming approach to game theory

Theorem

Expected payoff from R to C:

�, � =!!���������

= ����

Theorem:

There exist optimal strategies �∗ and �∗such that for all strategies � and �:

�, �∗ ≤ �∗, �∗ ≤ [�∗, �]

Note we call �∗, �∗ the value of the

game.

Hipster mathematician

Page 13: Should a football team run or pass? A linear programming approach to game theory

Reflect on the inequality

�, �∗ ≤ �∗, �∗ ≤ [�∗, �]

• �∗, �∗ ≤ �∗, � : C guarantees a lower bound

(worst−case) on his/her payoff

• �, �∗ ≤ �∗, �∗ : R guarantees an upper bound

(worst-case) on how much he/she loses

• Fundamental problem: finding �∗ and �∗

Both R and C play

optimal strategies

C plays optimal,

R plays suboptimal

R plays optimal,

C plays suboptimal

Page 14: Should a football team run or pass? A linear programming approach to game theory

Objective function analysis

• Suppose C adopts strategy �• Then, R’s best strategy is to find the � that minimizes

����:min* ����

• And therefore, C should choose the � that maximizes

these possibilities:

max- min* ����This will give us �∗ and �∗.This is hard!

Page 15: Should a football team run or pass? A linear programming approach to game theory

Useful result

• Let’s focus on the inner optimization problem: min* ����o This is easy since it treats � as “fixed” so we have a linear

problem.

Lemma: min* ���� = min� /����where /�� is the pure vector of only selecting action (e.g., /�� = [100 …0])

Idea: a weighted average of things is no bigger than the largest of them.

Page 16: Should a football team run or pass? A linear programming approach to game theory

Put it together

We now have:

max- min� /����subject to ∑ ��� = 1

�� ≥ 0, = 1,2, … , �

This is a linear program!!

Page 17: Should a football team run or pass? A linear programming approach to game theory

Reduction to a linear program

• Now introduce a scalar 1 representing the value of

the inner minimization (min� /����):

max2,3 1subject to 1 ≤ /����, = 1,2, … ,�

∑ ��� = 1�� ≥ 0, = 1,2, … , �1 free

Page 18: Should a football team run or pass? A linear programming approach to game theory

Reduction to a linear program

Matrix-vector notation

max11/ − �� ≤ 0/�� = 1� ≥ 0

/ is the vector of all 1’s

Block matrix form

max 01

� �1

−� //� 0

�1≤=

01

� ≥ 01 free

Page 19: Should a football team run or pass? A linear programming approach to game theory

Now do the same from R’s perspective

Everything is analogous to what we did before!

• R solves this problem:

min* max- ����• Lemma: max2 ���� = max� ���/�• That gives us the following linear program:

min* max� ���/�subject to ∑ ��� = 1

�� ≥ 0, = 1,2,… ,�• Introduce a scalar 4 representing the value of the inner

maximization (max� ���/� ):

Page 20: Should a football team run or pass? A linear programming approach to game theory

Reduction to a linear program

Matrix-vector notation

min44/ − ��� ≥ 0/�� = 1� ≥ 0

/ is the vector of all 1’s

Block matrix form

min 01

� �4

−�� //� 0

�4≥=

01

� ≥ 04 free

Page 21: Should a football team run or pass? A linear programming approach to game theory

OK, so now we have two ways to solve

the same problem

Let’s examine how these solutions are related.

Page 22: Should a football team run or pass? A linear programming approach to game theory

Minimax Theorem

• Let �∗ denote C’s solution to the max-min problem

• Let �∗ denote R’s solution to the min-max problem

• Then:

max2 �∗��� = min* ����∗

Proof:

From strong duality, we have 4∗ = 1∗. Also

1∗ = min� /����∗ = min* ����∗ from C’s problem

4∗ = max2 �∗��/� = max2 �∗��� from R’s problem

Page 23: Should a football team run or pass? A linear programming approach to game theory

We did it!

Page 24: Should a football team run or pass? A linear programming approach to game theory

Let’s work on an example

Example from Mathletics by Wayne Winston (2009), Princeton University Press, Princeton, NJ.

Page 25: Should a football team run or pass? A linear programming approach to game theory

Football example: offense vs. defense

5(7, 8) Offense runs (7:) Offense passes (;< = 1 − �:)

Run defense (��) -5 10

Pass defense (�� = 1 − ��) 5 0

The offense wants the most yards. The defense wants the offense to

have the fewest yards. This is a zero sum game.

Using this information, answer the following two questions:

(1) What fraction of time should the offense run the ball?

(2) If they adopt this strategy, how many yards will they achieve per

play on average?

Idealized payoffs (yards)

Page 26: Should a football team run or pass? A linear programming approach to game theory

Case 1: Look at the offense

• The offense chooses a mixed strategy

o Run with probability ��o Pass with probability �� = 1 − ��

• Solve the linear program:

max1subject to

1 ≤ −5�� + 10��1 ≤ 5��

�� + �� = 1��, �� ≥ 0

Page 27: Should a football team run or pass? A linear programming approach to game theory

Case 1: Look at the offense

We know that �� = 1 − ��, which simplifies the

formulation to:

max1subject to

1 ≤ −5�� + 10(1 − ��) = 10 − 15��1 ≤ 5����, �� ≥ 0

Let’s solve the problem visually.

Page 28: Should a football team run or pass? A linear programming approach to game theory

Case 1: Look at the offense

We want the largest value of 1 that is “under” both lines.

This happens when �� = 1/2 (and �� = 1/2): run half the time,

pass half the time.

1∗ = min� /����∗ = 2.5 yards per play, on average.

Expected payoff

��, proportion of time offense runs the ball

Rundefense10 − 15��

Passdefense5��

Page 29: Should a football team run or pass? A linear programming approach to game theory

Case 2: Look at the defense

• We still do not know the optimal defensive strategy.

• The defense chooses a mixed strategy

o Run defense with probability ��o Pass defense with probability �� = 1 − ��

• Solve the linear program:

min4subject to

4 ≥ −5�� + 5�� = 5 − 10��4 ≥ 10���� + �� = 1��, �� ≥ 0

Page 30: Should a football team run or pass? A linear programming approach to game theory

Case 2: Look at the defense

We want the smallest value of 4 that is “over” both lines.

This happens when �� = 1/4 (and �� =3/4): prepare for run a quarter of the

time, prepare for a pass three quarters of the time.

This yields 4∗ = 2.5 yards per attempt (on average). The offense gain and

defensive loss are always identical!

Expected payoff

Runoffense5 − 10��

Passoffense10��

��, proportion of time defense prepares for run

Page 31: Should a football team run or pass? A linear programming approach to game theory

Football example #2:

offense vs. defense

5(7, 8) Offense runs (7:) Offense passes (;< = 1 − �:)

Run defense (��) I − J K +�J

Pass defense (�� = 1 − ��) I + J K −�J

Suppose the defense chooses run and pass defenses with equal

likelihoods.

The offense would gain r yards per run, on average.

The offense would gain p yards per pass, on average.

The correct choice on defense has m times more effect on passing

as it does on running (range of 2�J vs. 2J)

Idealized payoffs (yards)

Page 32: Should a football team run or pass? A linear programming approach to game theory

Football example #2:

offense vs. defense

Offense problem Defense problem

min4subject to

4 ≥ (I − J)�� + (I + J)��4 ≥ (K +�J)�� + (K −�J)��

�� + �� = 1��, �� ≥ 0

max 1subject to

1 ≤ (I − J)�� + (K +�J)��1 ≤ (I + J)�� + (K −�J)��

�� + �� = 1��, �� ≥ 0

Page 33: Should a football team run or pass? A linear programming approach to game theory

Football example #2:

offense problem

After a lot of algebra…

�� = �/(� + 1)[Does not depend on I or K!]

Likewise, �� = 1/2 +(I − K)/(2J� +�)for the defense

Expected

payoff

��, proportion of time offense runs the ball

RundefenseK + �J + (I − K − (� + 1)J)��

PassdefenseK − �J + (I − K + (� + 1)J)��

K + �J

K +�J

Page 34: Should a football team run or pass? A linear programming approach to game theory

Intuition

The correct choice on defense has � times more effect on passing as it does on running

• For � = 1o Offense runs pass and run plays equally

• For � > 1o Offense runs more since the defensive call has more of an

effect on passing plays

• For � < 1o Offense passes more since the defensive call has less of an

effect on passing plays

Page 35: Should a football team run or pass? A linear programming approach to game theory

Related blog posts

• Happiness is assuming the world is linear

• Why the Patriots’ decision to let the

Giants score a touchdown makes sense

• Introducing Badger Bracketology 1.0

• Some thoughts on the College Football

Playoff