1. Introduction
It has been well-established since Nash’s work [1] that the Nash equilibrium exists in mixed strategies for strategic games. However, the computational complexity of finding Nash equilibria belongs to the class of PPAD (Polynomial Parity Argument for Directed graphs) complete [2], for which no polynomial-time solution method is known, particularly for general, non-zero-sum games.
Bowling et al. [3] solved the Nash equilibrium for Poker—an incomplete information game and a repeated two-player zero-sum game—using an approximate computation method.
Monderer and Shapley [4] revealed that potential games consistently have Nash equilibria in pure strategies. Additionally, Moulin [5] and Friedman [6] examined the properties of Nash equilibrium in mixed strategies for non-zero-sum two-player games when the games are strictly competitive.
It is well-known that a zero-sum two-player game can be formulated as a pair of linear programming problems. Although linear programming problems are generally solved efficiently using the Simplex method, which moves along the vertices of the feasible polyhedron, there are rare instances where problems cannot be solved in polynomial time. To address this, various interior-point methods, which traverse the interior of the feasible polyhedron, have been developed since the mid-1980s. Among these, the primal-dual interior-point method, proposed by Kojima et al. [7] and others, which simultaneously solves both the primal and dual problems, is considered a powerful approach.
This study first indicates that for a fixed-sum two-player game, the Nash equilibrium can be efficiently solved in polynomial time using the principal-dual interior point method for linear programming. Furthermore, the study reveals that the Nash equilibrium forms a convex set in the mixed strategy for fixed-sum two-player games and that all Nash equilibria yield unique expected payoffs. Elementary computational experiments demonstrate the correctness of the methods presented.
2. Formulation
The Nash equilibrium is defined as (where
denotes a d-simplex), which satisfies
,
(1)
,
,
for the non-zero-sum two-player game
, where A and B are the payoff matrices of the two players.
Generally, the computational complexity of finding Nash equilibria belongs to a class of PPAD complete [2], for which no polynomial-time solution method is known, even in two-person games.
The fixed-sum two-player game, including the zero-sum two-player games, can be formalized as a linear programming problem, which can be solved in polynomial time.
We convert a fixed-sum two-player game
, where p is the sum of the payoffs of the two players, and
,
,
,
, to a zero-sum two-player game
, by subtracting
from all the entries. Let x and y denote the mixed strategy of player 1 and player 2, respectively, and 1 be the vector
.
Nash equilibrium is also referred to as “equilibrium,” particularly in the zero-sum two-player games.
In a zero-sum game
, player 2’s maximin strategy is equivalent to their minimax strategy.
The maximin strategy for player 1 is defined as
(2)
where x represents a mixed strategy.
The maximin strategy for player 2 is:
where y represents a mixed strategy.
Specifically,
(3)
which is known as the minimax strategy.
Therefore, the Nash equilibrium
is obtained by solving linear programming problems (2) and (3).
Theorem 1. For a fixed-sum two-person game
, there exists a Nash equilibrium
, which is the solution to the linear programming problems (2) and (3), and can be obtained in polynomial time in
. In this case, the payoffs of the two players are .
Proof. First, we show that
, the solution of (2), and
, the solution of (3), exist for the zero-sum two-player game
.
(2) is similar to
(4)
The duality problem of (4) can be expressed as
(5)
(3) is also a dual problem of (2) by considering that
. Note that (4) has a bounded optimal solution
because
. Therefore, from the strong duality theorem of linear programming, there exist bounded solutions
and
, and
, i.e.
.
Noting that
,
,
,
we have (1) is the same as
,
,
.
Thus, the Nash equilibrium
of the zero-sum two-player game also serves as a Nash equilibrium for the fixed-sum two-player game
, and can be obtained by solving the linear programming problem (2) and (3).
The linear programming problem can be solved using polynomial time methods such as those discussed in [8], which validates this approach.
In this case, the payoffs for the two players are . □
Note that it is not always the case that
in any zero-sum two-player game
, as is evident from the case that
,
when
.
Consider the following definition:
Definition. A fixed-sum two-player game
is assumed to be symmetric if
.
Example 1. Rock-Paper-Scissors
, ,
Notably, in a symmetric fixed-sum two-player game, the condition
holds by definition.
Competitions are typically symmetric zero-sum two-player games, such as Rock-Paper-Scissors, which represent a broad class of games.
In symmetric fixed-sum two-player games, solving only one linear programming problem is sufficient to obtain a Nash equilibrium solution.
Theorem 2. A symmetric fixed-sum two-player game
contains the Nash equilibrium
, where
contains the solution to the linear programming problem (2). In this case, the payoffs of both players are
.
Proof. In a symmetric fixed-sum two-player game
,
is the solution of (2) (
), and
is a solution of (3) (
).Note that (2) is a solution of the fixed-sum two-player game
, then (2) and (3) are equivalent for
. Thus,
, since (2) and (3) are the same problem.
In this case, the payoffs of the two players are . Now that , since and . Hence, the payoffs are
. □
Many efficient general-purpose libraries, such as Python’s PuLP, that implement polynomial-time methods for linear programming problems exist. These methods can effectively handle large scale problems with tens of thousands of strategies.
The convexity of Nash equilibria in zero-sum two-player games was examined by Friedman [6] in strictly competitive games where
.
This study extends the analysis to a more general setting.
Theorem 3. The Nash equilibrium of a finite-sum two-player game is a convex set of
and any solution of the Nash equilibrium determines the unique expected payoffs.
Proof.
of (2), which satisfies
is a convex polyhedron in
. On the other hand,
is
((
)-simplex).
Their common part
is a bounded convex set in
.
Therefore, as the solution set
of (2) is the intersection of the convex set S and the support hyperplane
, it is a convex set in
.
Thus, is also a convex set.
Similarly,
is also a convex set for the solution set
of (3).
Thus,
is a convex set.
As discussed in Theorem 1,
. Therefore, the expected payoff of each is uniquely determined. □
Example 2. Zero-sum two-player game
, , and
Example 3. Non-fixed-sum two-player game
,
The solution is not a convex set and
, respectively.
In a fixed-sum two-player game, as specified in Theorem 3, the Nash equilibrium solution forms a convex set; however, it may not be unique (e.g., when
). However, in a zero-sum two-player game, by definition, any Nash equilibrium solution is Pareto optimal. Furthermore, Theorem 3 indicates that any solution has a unique expected payoff, making all Nash equilibria equally desirable.
3. Solving a Fixed-Sum Two-Player Game
In non-symmetric general finite-sum two-player games, solving the Nash equilibrium requires addressing both problems (2) and (3). Therefore, we consider applying the primal-dual interior point method, which has been extended for use in linear programming, convex programming, and positive semi-definite programming.
In the primal-dual interior point method (see [9]), the primal linear programming problem is formulated as
(6)
where
, A:
matrix, and
. The dual problem to (6) is
(7)
where
,
. The duality gap is:
The optimal solution
of (6) and (7) is obtained as the solution of the following equations:
(8)
where
.
The primal-dual interior point method considers the following system of equations
.(9)
If we consider the Newton method as
, the search direction is obtained as a solution of
,(10)
where
,
.
Subsequently, the iteration process is
,(11)
where
and
are step widths.
The algorithm can be written as follows:
Algorithm PD
Input:
Iteration (
)
1. Set
and find the solution
of (10).
2. By (11), we obtain
.
3. If the convergence condition is satisfied, then
. Stop.
4.
. Go to 1.
Output:
Now let us consider its application to a fixed-sum two-player game.
We introduce a slack variable to (4).
(12)
The dual problem to (12) is
(13)
We denote
,
,
,
,
. (14)
The necessary and sufficient conditions for the main problem (12) and the dual problem (13) to be optimal solutions are
(15)
where
,
,
.
Therefore, the primal-dual interior point method can be applied.
We define L as a measure of the length of the input data [8], namely
(16)
Theorem 4. The Nash equilibrium
of the fixed-sum two-player game can be obtained by solving (15) using the sequence tracking method of the primal-dual interior point method in
iterations, where
is a measure of the length of the input data to (12).
Proof. In the sequence tracking method of Mizuno [10], which is part of the primal-dual interior point method, it has been proved that the solutions of the primal linear programming problem (6) and the dual problem (7) can be obtained in
iterations.
For the Nash equilibrium, the solutions of (12) and (13) can be obtained in
iterations, given that
. □
Considering that the computational effort of each iteration of the primal-dual interior point method primarily involves solving a simultaneous linear equation to determine the search direction, and given that this can be done in polynomial time, the Nash equilibrium
can be obtained in polynomial time.
4. Computational Results
The study performed elementary computational experiments on a fixed-sum two-player game
. It solved the Nash equilibrium of the following example where A is not a skew-symmetric matrix.
Example 4. A fixed-sum two-player game
Note that
: Example 2, where
.
The primal-dual interior point methods discussed in the previous section include the affine scaling method, path-following method, potential reduction method, and others.
The primal-dual path following algorithm is used in this section for efficiency reasons (see [11]), and is coded in Python and executed on a Windows PC.
Consider the following system of equations:
(17)
This system of equations with
satisfies all constraints (15) except the sign of
and
. Following Lustig et al. [12], the study employs
, where
, which was determined in an ad hoc manner, and
is set to as the minimization of
.
Newton Direction
is obtained by solving
,(18)
where
and
.
We denote the residuals for complementarity, linear constraints on the main problem, and linear constraints on the dual problem by
,
, and
, respectively.
Then, the right-hand side of (18) can be expressed as
.
This allows us to calculate the following in this order:
(19)
.
A line search is performed using
, if
, if
so that
.
Subsequently, the iteration step is
(20)
The algorithm can be written as follows:
Algorithm 1
Input:
,
,
Iteration (
)
1. Set
. Calculate the solution
by (19).
2. By (20), we obtain
.
3. If the convergence condition is satisfied, then
. Stop.
4.
. Go to 1.
Output:
The following is a summary of the results of the study.
Table 1 summarizes the sequence
generated by Algorithm 1 to solve the Nash equilibrium in Example 4.
Table 1. Solution by the principal-dual interior point method.
k |
x1 |
x2 |
x3 |
y1 |
y2 |
y3 |
0 |
1.0 |
1.0 |
1.0 |
0.0 |
0.0 |
0.0 |
1 |
0.6623576 |
0.6623576 |
0.1415717 |
−0.1125475 |
0.7458808 |
0.3166667 |
2 |
0.4368808 |
0.5696124 |
0.0509516 |
−0.0040950 |
0.7077344 |
0.2938607 |
3 |
0.3520076 |
0.6394974 |
0.0180646 |
0.0008768 |
0.6956012 |
0.3024998 |
4 |
0.3330301 |
0.6650078 |
0.0030526 |
0.0002386 |
0.6716897 |
0.3278449 |
5 |
0.3332779 |
0.6665529 |
0.0002351 |
0.0000310 |
0.6669522 |
0.3329941 |
6 |
0.3333300 |
0.6666585 |
0.0000153 |
2.89E−6 |
0.6666822 |
0.3333133 |
7 |
0.3333332 |
0.6666661 |
9.39E−7 |
2.30E−7 |
0.6666675 |
0.3333322 |
8 |
0.3333333 |
0.6666666 |
5.54E−8 |
1.64E−8 |
0.6666671 |
0.3333333 |
9 |
0.3333333 |
0.6666667 |
3.20E−9 |
1.09E−9 |
0.6666667 |
0.3333333 |
Figure 1 presents the change in the dual gap at each iteration of the obtained sequence on a semi-logarithmic graph.
Figure 1. Duality gap for Example 4.
During the initial iterations for
, although there is some influence from
, the logarithm of the duality gap gradually decreases with each iteration, albeit at a slow pace.
For
, we have
(C: constant)
relationship; hence, the sequence converges to the solution swiftly.
5. Conclusions
The study confirms that the Nash equilibrium of the fixed-sum two-player game forms a convex set. Additionally, all solutions within this set yield the unique expected payoffs.
The Nash equilibrium solution to the fixed-sum two-player game can be efficiently solved by using the primal-dual interior point method. This method solves the linear programming problems involved in polynomial time regarding the number of strategies, m and n.
In elementary computational experiments, the Nash equilibrium of the fixed-sum two-player game is efficiently determined using the primal-dual path following algorithm, a technique within the primal-dual interior point method.