Comments on using bimatrixgame.sty
version 1.1
These explanations 5 Nov 2012
Bernhard von Stengel
stengel@nash.lse.ac.uk
please send me email for any comments!
Load with:
\usepackage{color}
\usepackage{bimatrixgame}
see also example.tex for example usage.
The \bimatrixgame macro takes 8 parameters:
\bimatrixgame{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}
where
#1 dimension of the unitlength, typically 1em,
where each cell of the strategic form is 4x4
units wide. The top left corner of the grid
has coordinates (0,0), the cell to the right
of it (top left) coordinates (4,0), the cell
in the second row first column (0,-4) and so
on. This allows to use the \put command in
the main parameter #8 if needed.
#2 number of rows
#3 number of columns
#4 name of row player
#5 name of column player
#6 list of strategy names for rows
#7 list of strategy names for columns
#8 list of payoff entries
each of which is either
\payoffpairs{#1}{#2}{#3}
or
\singlepayoffs{#1}{#2}
where
#1 row for payoffs
#2 list of row player payoffs in row #1
#3 list of column player payoffs in row #1
and each list is a list of items that can be any LaTeX
expression, normally in {} unless it is a single digit
when the braces can be omitted.
Note that negative numbers have to be written as
{$-1$} (i.e. with $ $ so that the minus sign is long
and not just a dash when using {-1}.
Example:
\bimatrixgame{1em}{2}{3}{I}{II}%
{{T}{B}}%
{{l}{c}{r}}
{
\payoffpairs{1}{012}{421}
\payoffpairs{2}{301}{132}
}
which, because it has single digits only, is best seen
as displaying the payoff matrices to the two players next to
each other:
for player 1,
0 1 2
3 0 1
and for player 2
4 2 1
1 3 2
The start of the file has to be
\usepackage{color}
\usepackage{bimatrixgame}
The following can be changed with \renewcommand
before the \bimatrixgame macro, as in e.g.
\renewcommand{\bimatrixrowcolor}{Red}
\renewcommand{\bimatrixcolumncolor}{Blue}
and here are some sample changes of additional parameters:
\renewcommand{\bimatrixdiag}{1}
\renewcommand{\bimatrixpairfont}{\small}
\renewcommand{\bimatrixsinglefont}{\normalsize}
\definecolor{Green}{rgb}{0,1,0}
\renewcommand{\bimatrixrowcolor}{Green}
see also example.tex for example usage.