-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.tex
83 lines (70 loc) · 2.09 KB
/
example.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
\documentclass[12pt]{article}
% 15 May 2012
\usepackage{color}
\usepackage{bimatrixgame}
\oddsidemargin=.46cm
\textwidth=15cm
\textheight=232mm
\topmargin=-.2cm
\usepackage{mathptmx} % italics fonts text and maths
\pagestyle{empty} % no page numbers
\parindent0pt
\begin{document}
{\Large Illustration of the \verb@\bimatrixgame@ macro}
\vskip2ex
Example: $2\times 3$ game with typical strategy names;
note $-1$ written as \verb.{$-1$}., not needed for single
integer payoffs which can even miss surrounding \verb.{ }..
For the whole game, surrounding \verb.\[ \]. gives displayed
equation. Slightly larger boxes (5mm instead of 4mm).
\[
\bimatrixgame{5mm}{2}{3}{I}{II}%
{{T}{B}}%
{{l}{c}{r}}
{
\payoffpairs{1}{012}{42{$-1$}}
\payoffpairs{2}{301}{132}
}
\]
\vfill
Example: $4\times 6$ game with strategy names referring to
game tree, and boxes around best-response payoffs.
Naked display without surrounding \verb.\[ \]..
Note \verb.{$\frac{1}{2}$}.\,.
Long diagonal in top left.
\renewcommand{\bimatrixrowcolor}{Red}%
\renewcommand{\bimatrixcolumncolor}{Blue}%
\renewcommand{\bimatrixdiag}{3}%
\renewcommand{\bimatrixpairfont}{\large}%
\bimatrixgame{4mm}{4}{6}{I}{II}%
{{$X*$}{$Y*$}{$ZP$}{$ZQ$}}%
{{$ad$}{$ae$}{$bd$}{$be$}{$cd$}{$ce$}}
{
\payoffpairs{1}{{\fbox 3}3{\fbox 2}2{\fbox 4}{\fbox 4}}{44{\fbox 5}{\fbox 5}{\fbox 5}{\fbox 5}}
\payoffpairs{2}{22{\fbox 2}222}{{\fbox 3}{\fbox 3}{\fbox 3}{\fbox 3}{\fbox 3}{\fbox 3}}
\payoffpairs{3}{{$\frac{1}{2}$}01010}{3{\fbox 5}3{\fbox 5}3{\fbox 5}} \payoffpairs{4}{1{\fbox 4}1{\fbox 4}1{\fbox 4}}{{\fbox 3}2{\fbox 3}2{\fbox 3}2}
}
\vfill
Example: zero-sum game, also with
no players and no diagonal in top left, smaller font.
\strut\hfill
\renewcommand{\bimatrixdiag}{2}%
\bimatrixgame{3.7mm}{2}{2}{Max}{min}%
{{$R_L$}{$F_L$}}%
{{$m_M$}{$p_M$}}%
{
\singlepayoffs{1}{{$-1/3$}{0}}
\singlepayoffs{2}{{0}{$-1/6$}}
}
\hskip 3cm
\renewcommand{\bimatrixdiag}{0}%
\renewcommand{\bimatrixsinglefont}{\small}%
\bimatrixgame{3.7mm}{2}{2}{}{}%
{{$R_L$}{$F_L$}}%
{{$m_M$}{$p_M$}}%
{
\singlepayoffs{1}{{$-1/3$}{0}}
\singlepayoffs{2}{{0}{$-1/6$}}
}
\hfill\strut
\end{document}