I took the Combinatorial Optimization class at AIT Budapest (Aquincum Institute of Technology) with David Szeszler, a Professor at the Budapest University of Technology and Economics. We touched on some Graph Theory, Linear Programming, Integer Programming, the Assignment Problem, and the Hungarian method. My favorite class in the course was focused on applying Linear Programming in Game Theory. I’ll summarize the most important aspects of that class in this blog post. I hope this piques your interest in Game Theory (and in attending AIT).
Basics of Linear Programming
First, I want to touch on some topics in Linear Programming for those who don’t know much about setting up a linear program (which is basically a system of linear inequalities with a maximization function or a minimization function). You can skip this section if you are confident about the subject.
Linear Programming is basically a field of mathematics that has to do with determining the optimum value in a feasible region. In determining the optimum value, one of two questions can be asked: find the minimum point/region or find the maximum point/region. The feasible region in a linear program is determined by a set of linear inequalities. For a feasible region to even exist, the set of linear inequalities must be solvable.
A typical linear program is given in this form: . is a row vector of dimension . is an matrix called the incidence matrix. is a column vector of dimension . This is called the primal program. The primal program is used to solve maximization problems. The dual of this primal program is of the form . are the same as previously defined. is a row vector of dimension . This is called the dual program. The dual is just a derivation of the primal program that is used to solve minimization problems.
Having introduced primal and dual programs, the next important theory in line is the duality theorem. The duality theorem states that = . In other words, the maximum of the primal program is equal to the minimum of the dual program (provided that the primal program is solvable and bounded from above). Using this “tool”, every minimization problem can be converted to a maximization problem and vice versa (as long as the initial problem involves a system of linear inequalities that can be set up as a linear program with a finite amount of linear constraints and one objective function).
There are linear program solvers out there (both open-source and commercial). Most linear program solvers are based on the simplex method. I acknowledge that the summary of Linear Programming given here is devoid of some details. Linear programming is a large field that cannot be wholly summarized in a few sentences. For more information on linear programming, check out this wikipedia page.
Sample Game Theory Problem
Suppose that I and my roommate Nick are playing a game called Yo!. The game rules are as follows: if we both say Yo!, I get $2. If I say Yo! but Nick says YoYo!, I lose $3. On the other hand, if we both say YoYo!, I get $4. If I say YoYo! but Nick says Yo!, I lose $3. The rules are summarized in the table below:
The values make up the payoff matrix. When Daniel gains, Nick loses. When Nick gains, Daniel loses. A negative value (e.g. $-3) indicates that Daniel loses but Nick gains. Now the question surfaces: is there a smart way of playing this game so that I always win? Of course, if I could predict Nick’s next move all the time, then I’ll certainly play to win. But I can’t. I must come up with a strategy that reduces the risk of me losing to a minimum and increases my chance of winning. In other words, I want to maximize my minimum expected value. So I wish to know how often I should say Yo! and how often I should say YoYo!. This problem is equivalent to trying to find a probability column vector of dimension 2 (for the two possible responses Yo!, YoYo!). Such a probability vector is called a mixed strategy. For example, a mixed strategy for Daniel could be the column vector: . This translates to saying YoYo! three-quarters of the time and saying Yo! a quarter of the time. My expected value is then . This mixed strategy doesn’t seem optimal! In fact, it’s not as we’ll see later!
This kind of Game Theory problem where we wish to obtain an optimal mixed strategy for the Column player (in this case, Daniel) and an optimal mixed strategy for the Row player (in this case, Nick) is called a Two-player, zero sum game. A mixed strategy for the Column player is an -dimensional probability vector ; that is, a column vector with nonnegative entries that add up to 1. The entry of the mixed strategy measures the probability that the Column player will choose the column. In any Two-player, zero sum game, the problem is to maximize the worst-case gain of the Column player which is equivalent to finding
is a probability vector where represents the payoff matrix
Analogously, the problem of minimizing the worst-case loss of the Row player is equivalent to finding
is a probability vector where is the payoff matrix
There’s a theorem that states that is a probability vector = is a probability vector = . We call the common value of the game. This theorem is called the Minimax Theorem.
The Minimax Theorem was proved by John von Neumann (one of the greatest polymaths of all time, I think). It states that “For every two-player, zero sum game the maximum of the minimum expected gain of the Column player is equal to the minimum of the maximum expected losses of the Row player”. In other words, there exists the optimum mixed strategies and for the Column player and the Row player respectively and a common value such that
- No matter how the Row player plays, guarantees an expected gain of at least to the Column player and
- No matter how the Column player plays, guarantees an expected loss of at most to the Row player
Solving the Two-Player, Zero Sum Game
Now let’s try to solve the Yo! game. First, we aim to obtain the mixed strategy for the Column player. Let be the mixed strategy where for which and . We wish to find the maximum of where is the payoff matrix. To make this into a linear program, we can say . So is worst-case gain of Daniel. We wish to maximize . Since is the minimum possible value of , we obtain the following linear constraints
Solving the linear program gives us and . So the optimal mixed strategy for the Column player is . This translates to saying that if Daniel says Yo! of the time and YoYo! of the time, his worst-case gain will be . In other words, Daniel will lose at most the value of the game no matter how Nick plays. According to the minimax theorem, this is optimal.
Note that this doesn’t mean that Daniel will always lose the game but that he can lose by at most the value of the game. If Nick doesn’t play optimally (Nick doesn’t use his optimal mixed strategy), Daniel will most likely win!
Nick could obtain his optimal strategy by solving the dual of the primal program to obtain the vector which will be his optimal mixed strategy.
The minimax theorem is an interesting and very useful application of Linear Programming in Game Theory. Two-player, zero sum games can also be solved using Nash Equilibrium which is very closely related to the minimax theorem but applies to two or more players. Nash Equilibrium was first proposed by John Nash. There are many Two-player games including Poker, Card games, Betting games, and so on. As a result, Linear Programming is used in the Casino!