Game Theory With Excel
Game Theory With Excel
D DAVID PUBLISHING
Giancarlo de França Aguiar1, Alessandro Brawerman2, 3, Barbara C. X. C. Aguiar4 and Volmir E. Wilhelm4
1. Department of Mathematics, Federal Institute of Paraná, Curitiba 82530-230, Brazil
2. Department of Computer Engineering, Positivo University, Curitiba 81280-330, Brazil
3. Sector of Professional and Technological Education, Federal University of Paraná, Curitiba 81520-260, Brazil
4. Department of Mathematics, Federal University of Paraná, Curitiba 80060-000, Brazil
Received: June 24, 2014 / Accepted: July 08, 2014 / Published: September 25, 2014.
Abstract: Understanding the behavior of companies in market conditions has been an important topic of studies for the economists
and mathematicians. Many companies have treated their relationship of service providers as a game. Thus, the attitudes of the players
can be endowed with rational thinking, which leads to the conclusion that the use of game theory as a tool to understand such
behavior is of great importance. Based on the previous studies, this paper presents a study on the cooperative game theory, discussing
the Nash equilibrium in pure and mixed strategies, treating solutions using the minimax John Von Neumann theorem and illustrating
a mathematical modeling of a game theory problem. Furthermore, a solution of linear programming using Microsoft Excel is also
proposed and presented. The methodology adopted to model the problem may help students to familiarize themselves to game theory.
Key words: Cooperative game theory, Nash equilibrium, linear programming, Microsoft Excel.
1. Introduction behavior.
Game theory has become of great importance for
Understanding the behavior of companies in market
the modern economic thinking. It can be considered as
conditions has been an important topic of studies for
a methodology and has been used in various fields of
the economists and mathematicians. According to Ref.
science, such as biology [3], engineering [4],
[1], the impact of decisions in organizations is
economics [5, 6], politics [7, 8] and among others, in
interdependent and has been widely discussed in the
order to organize mathematically possible decisions of
microeconomic literature since the 19th century.
players in the middle of a game.
Currently, many companies have treated their
Based on those studies, this work weaves a
relationship of service providers as a game, and the
theoretical basis on the Theory of Cooperative Games,
game, as such, takes into account the attitudes of their
illustrating the Nash equilibrium in pure and mixed
players who aim to maximize their interests.
strategies, addressing solutions to a game using the
According to Ref. [2], the game has achieved greater
minimax and maximin theorems of John Von
prominence as a methodology and should prepare
Neumann. Finally, a mathematical model (linear
players to make their companies competitive in
programming) of a problem with our solution is
relation to the market.
modeled in a Microsoft Excel spreadsheet.
In turn, as the attitudes of the players can be
The paper is organized as follows: Section 2
endowed with rational thinking, we conclude that the
presents a brief overview of fundamental theory;
game is about strategies, which leads us to moderate
Section 3 discusses a mathematical modeling of our
the use of game theory as a tool to understand such
proposed game and presents a model in an Excel
Corresponding author: Giancarlo de França Aguiar, M.Sc., spreadsheet; and Section 4 gives conclusions and
assistant professor, research fields: game theory, DEA. E-mail: presents future work.
[email protected].
748 A Game Theory Approach Using Excel
Minimax theorem: if mixed strategies are allowed, Table 1 The game of political campaign.
the pair of mixed strategies which is great according Politician 2
One day in each
to the minimax criterion provides a stable solution Two days in B Two days in FL
neighborhood
One day in each
, so that no player can improve their Politician 1 0 -2 2
neighborhood
Two days in B 5 4 -3
situation by changing its strategy.
Two days in FL 2 3 -4
Theorem: a strategy profile (p*, q*) is a Nash
equilibrium of a two-player game with constant sum minimum result of column two (-2) and the minimum
defined by the payoff matrix of the row player A = value from column three (-4), the maximum of the
(aij)mxn if and only if minimum is equal to 0, thus, maximin = 0. Since
, then the game does not have a
max min min max
solution in pure strategies. Let us try a linear
Theorem (Von Neumann minimax): for every programming approach to find the solution to this
zero-sum game with two players represented by the problem.
payoff matrix of the row player, there is always a According to Ref. [14], the linear programming
mixed strategy profile (p*, q*) ∆ ∆ satisfying problems are business situations (problems of production,
resource allocation, workforce planning and among
max min
∆ ∆ others) that can be described/modeled mathematically
in an organized manner through functions and equations,
min max
∆ ∆ and thus, with their solutions simulate real situations
In particular, it is a Nash equilibrium of the game and find alternatives with the needs of organizations.
[13]. So the problem of player A can be written as:
Max Z = v
3. Results and Discussion
such as:
We first begin by presenting/modeling a game of 0 5 2 0
two players (politicians), each with three strategies. 2 4 3 0
The players payoff matrix is shown in Table 1. 2 3 4 0
Considering the game is between two candidates for 1
mayor of a given city, it is fundamental that they plan , , 0
ahead the last two days of the campaign. Politicians v free
intend to campaign in two different neighborhoods (B The previous model can be solved using a linear
and FL). Each candidate may perform three strategies: programming software, however, this time, we will
campaign two days in B, campaign two days in FL or use an electronic Microsoft Excel tool to assist in the
campaign one day in each neighborhood. modeling and resolution (proposal of this paper).
With a brief analysis, it is concluded that this game Fig. 1 illustrates the data entered in a Microsoft Excel
does not have a minimax solution in pure strategies spreadsheet. The only cells that have formulas are:
because it is a game with no saddle point. According D3 cells (= G4), which is the objective function
to Table 1, selecting the maximum result from line of the cell and receives the value of the variable “v”;
one (2), the maximum result from line two (5) and the J9 (=D9*G4+E9*H4+F9*I4+G9*J4), which is
maximum from line three (3), the minimum of the the restriction of one model;
maximum is equal to 2, thus, minimax = 2. Now, J10 (=D10*G4+E10*H4+F10*I4+G10*J4),
selecting the minimum result of column one (0), the which is the second constraint model;
750 A Game Theory Approach Using Excel
J11 (=D11*G4+E11*H4+F11*I4+G11*J4),
which is the third constraint model;
J12 (=D12*G4+E12*H4+F12*I4+G12*J4),
which is the fourth constraint model.
Following, one can click in the Microsoft Excel
tool/data tab, and then tool/solver tab (if the tab Fig. 2 Tools solver.
solver exists, the user must customize his toolbar
from the main menu, looking for the commands tab,
then supplements and clicking solver). Fig. 2
illustrates the new window that pops up. The user
must define the purpose by clicking in cell D3, then
set up if the problem is the maximum or minimum
(maximum in this case). When changing the variable Fig. 3 Solution for the game.
cells, the user must place the cells of the variables
4. Conclusions
($G$4:$J$4), and then click add. A new window will
pop up and the user must click on cell reference in This work showed a theoretical treatment for
cell (J9), the inequality (<=) is already correct and in beginners who aim to know game theory, illustrating a
the restriction tab, the user must click in cell K9. game and a discussion of its solution (Nash
Click ok and perform the previous procedure to other equilibrium for pure strategies) and a game and a
restrictions. discussion of its solution (Nash equilibrium for mixed
Finally, one can click on the solve button and strategies).
then ok. The solution will appear as shown in According to Ref. [15], in game theory, if there are
Fig. 3. marked differences between the Nash equilibrium and
The spreadsheet shows the following solution for the predicted results, then probably there was some
the player A sort of misunderstanding on the part of players
, , , 0.1818; 0.6363; 0.3636; 0 (decision makers), or one of the players may not have
understood clearly the priorities of his opponent, or
, , , 0 , i.e., player A should use the strategy
one of them may not have understood the game or not
seven times in every 11 attempts, the strategy four being rational in their decisions.
times two in every 11 attempts and discard the third This work also illustrated the minimax theorem of
John von Neumann and an example problem with two
strategy, getting the payoff max . The solution
players and three strategies. Here we show how to
for player B may be constructed analogously. formalize the mathematical modeling of the problem
A Game Theory Approach Using Excel 751
and how to build a step-by-step modeling using a of Social Science 43 (3): 559-600.
[8] Mesquita, B. B. 2006. “The Evolution of Political
Microsoft Excel spreadsheet.
Science.” American Political Science Review 100 (4):
As future work we intend to implement a more 637-42.
generic game that may be accessed over the Internet. [9] Fiani, R. 2009. Game Theory with Applications in
Economics, Management and Social Sciences. 3rd ed.
References Rio de Janeiro: Elsevier.
[10] Camerer, C. F. 2011. Behavioral Game
[1] Leeflang, P. S. H. 2008. “Modeling Competitive Reaction
Theory—Experiments in Strategic Interaction. USA:
Effects.” Schmalenbach Business Review 60: 322-58.
Princeton University Press.
[2] Orti, P. S., Rodrigues, J. de S., and Albino, J. P. 2008.
“Critical Success Factors in Business Games.” Presented [11] SARTINI et al., “An Introduction to Game Theory”. II
at XV SIMPEP, UNESP, Bauru. Biennial SBM Federal University of Bahia, Oct. 25-29,
[3] Gatenby, R. A., and Vincent, T. L. 2003. “Application of 2004.
Quantitative Models from Population Biology and [12] Goeree, J. K., Holt, C. A., and Palfrey, T. R. 2003. “Risk
Evolutionary Game Theory to Tumor Therapeutic Averse Behavior in Generalized Matching Pennies
Strategies.” Molecular Cancer Therapeutics 2: 919-27. Games.” Games and Economic Behavior 45 (1):
[4] Peldschus, F. 2008. “Experience of the Game Theory 97-113.
Application in Construction Management.” [13] Oliveira, F. A., and Araújo, M. A. 2010. “The Minimax
Technological and Economic Development of Economy Theorem of von Neumann.” Presented at the XXXIII
14 (4): 531-45. CNMAC, Montpellier, France.
[5] Rabin, M. 1993. “Incorporating Fairness into Game [14] Aguiar, G. de F., Aguiar, B. de C. X. C., and Wilhelm, V.
Theory and Economics.” The American Economic Review E. 2006. “Obtaining Efficiency Ratios Methodology for
91 (4): 1180-3. Data Envelopment Analysis Using Microsoft Excel
[6] Roth, A. E. 2002. “The Economist as Engineer: Game spreadsheet.” DaVinci Magazine 3 (1): 157-70.
Theory, Experimentation, and Computation as Tools for [15] Silveira, L. T., and Burnquist, H. L. 2009. “Procedure for
Design Economics.” Econometrica 70 (4): 1341-78. Decision Analysis for the Prevention of Diseases in
[7] Munck, G. L. 2000. “Game Theory and Comparative Animals: An Application of Game Theory.” Journal of
Politics: New Perspectives, Old Interests.” DATA-Journal Economics and Rural Sociology 47 (2): 435-64.