Debian Codegraph @

texmf-dist/doc/latex/twoxtwogame/twoxtwogame_doc.tex

raw
1 \documentclass[10pt]{article}
2 \usepackage[utf8]{inputenc}
3 \usepackage{twoxtwogame}
4 \usepackage{subcaption}
5 \usepackage{hyperref}
6 \usepackage{cprotect}
7
8 % Optionally uncomment this code to cache figure generation.
9 % \usepackage{tikz}
10 % \usetikzlibrary{external}
11 % \tikzexternalize[prefix=cache/,up to date check=md5]
12
13 \usepackage[authoryear, sort&compress, round]{natbib}
14 \usepackage{booktabs,array}
15 \bibliographystyle{abbrvnat}
16
17 \title{twoxtwogame Package Documentation}
18 \author{Luke Marris}
19
20 % Make a tabular column suitable for verbatim code input.
21 \makeatletter
22 \newcolumntype{V}[1]{>{\@minipagetrue}p{#1}<{\vspace{-0.8\baselineskip}}}
23 \makeatother
24
25 \begin{document}
26
27 \maketitle
28
29 \section{Introduction}
30
31 2×2 normal-form games are widely studied in game theory and economics. They are the simplest type of normal-form game, consisting of only two players, each with two strategies. This package provides tools for representing, visualizing, tabulating, and naming such games and their equilibrium solutions in \LaTeX.
32
33
34 \section{Functionality}
35
36 \begin{table}[!b]
37 \centering
38 \begin{subtable}[t]{0.4\linewidth}
39 \centering
40 \payoffstable[label=$G$]{a}{b}{c}{d}{e}{f}{g}{h}
41 \caption{Payoffs arguments.}
42 \label{tab:2x2_payoffs_parameterization}
43 \end{subtable}
44 ~~~~
45 \begin{subtable}[t]{0.4\linewidth}
46 \centering
47 \jointtable[label=$\sigma$]{a}{b}{c}{d}
48 \caption{Joint arguments.}
49 \label{tab:2x2_joint_parameterization}
50 \end{subtable}
51 \caption{2×2 normal-form game function arguments.}
52 \label{tab:2x2_parameterization}
53 \end{table}
54
55 2×2 normal-form games are parameterized with 8 variables which describe the payoffs received by each player. Therefore, the majority of functions in the \verb!twoxtwogame! package have 8 mandatory arguments, \verb!{a}{b}{c}...{h}!, corresponding to these variables. The first four arguments, \verb!{a}{b}{c}{d}!, are payoffs of the row player in row-wise order, and the last four arguments, \verb!{e}{f}{g}{h}!, are the payoffs of the column player also in row-wise order. These payoffs, $G$, are often represented in a tabular form, where each player has strategies A and B (Table~\ref{tab:2x2_payoffs_parameterization}). The joint strategy distribution, $\sigma$, is parameterized with four arguments, \verb!{a}{b}{c}{d}! (Table~\ref{tab:2x2_joint_parameterization}). Some commands have additional optional keyword arguments.
56
57 \subsection{Payoffs Representations}
58
59 Traditionally payoffs can be represented as tables containing their raw payoff values and labeled actions. Additionally, payoffs can be represented graphically as either \emph{best-response graphs} or \emph{partial ordinal graphs}. These representations are compact enough to be inserted inline into text.
60
61 \subsubsection{Best-Response Graphs}
62
63 The best-response dynamics of 2×2 games are easily visualized. 2×2 games have been categorized according to these dynamics \citep{borm1987_classification_of_2x2_games,marris2023_equilibrium_invariant_embedding_2x2_arxiv}. \cite{marris2023_equilibrium_invariant_embedding_2x2_arxiv} proposed the best-response graphical representation used in this package.
64
65 The graph contains up to four directed edges: two for each player. The row player has up to two vertical directed edges which point from each of the column player's two strategies to the row player's corresponding best-response strategy (BR). Similarly, the column player has up to two horizontal edges which correspond to the best-response to each of the row player's two strategies. Self-loop edges are omitted from the graph and indicate indifference between two strategies. For example, when \verb!a! = \verb!c!. The graph can be placed inline using \verb!\brgraph{a}...{h}!, for example: Matching Pennies~\brgraph{1}{-1}{-1}{1}{-1}{1}{1}{-1}, Prisoner's Dilemma~\brgraph{1}{1}{0}{0}{1}{0}{1}{0}, and Null~\brgraph{0}{0}{0}{0}{0}{0}{0}{0}. The graphs inherit color from its surrounding text. The graphs are customizable with optional keyword arguments (Table~\ref{tab:brgraph}).
66
67 \begin{table}[t]
68 \centering
69 \footnotesize
70 \begin{tabular}{lll}
71 Keyword Argument & Description & Default \\ \hline
72 point offset & The distance of the points from the center & 0.38em \\
73 point color & Color of points & . \\
74 point radius & Radius of points (filled circles) & 0.06em \\
75 row player color & Color of row player's BR edges & . \\
76 column player color & Color of column player's BR edges & . \\
77 arrow width & Arrow head width & 0.25em \\
78 arrow length & Arrow head length & 0.35em \\
79 line width & Arrow line width & 0.05em \\
80 \end{tabular}
81
82 \vspace{1.0em}
83
84 \begin{tabular}{V{0.8\linewidth}l}
85 Command & Output \\ \hline
86 \begin{verbatim}
87 \brgraph{1}{-1}{-1}{1}{-1}{1}{1}{-1}
88 \end{verbatim}
89 & \brgraph{1}{-1}{-1}{1}{-1}{1}{1}{-1} \\
90 \begin{verbatim}
91 \brgraph[
92 point color=green
93 ]{1}{-1}{-1}{1}{-1}{1}{1}{-1}
94 \end{verbatim}
95 & \brgraph[point color=green]{1}{-1}{-1}{1}{-1}{1}{1}{-1} \\
96 \begin{verbatim}
97 \brgraph[
98 row player color=red,
99 column player color=blue
100 ]{1}{-1}{-1}{1}{-1}{1}{1}{-1}
101 \end{verbatim}
102 & \brgraph[row player color=red,column player color=blue]{1}{-1}{-1}{1}{-1}{1}{1}{-1}
103 \end{tabular}
104 \cprotect\caption{Parameterization, default values, and example usage of the \verb!\brgraph[...]{a}...{h}! command, which produces inline best-response graphs. Default period indicates inheritance from outer scope.}
105 \label{tab:brgraph}
106 \end{table}
107
108 The graphs belong to 15 equivalence classes which have been named \citep{marris2023_equilibrium_invariant_embedding_2x2_arxiv}. Names for any payoff can be determined using \verb!\brname{a}...{h}! (examples in Table~\ref{tab:brname}). It is common to have the equivalent class name appear along with the best-response graph. Canonical graphs for each equivalence class are given in Table~\ref{tab:namebrgraph}, and can be inserted using the commands \verb!\<name>brgraph!. This command also accepts the same optional keyword arguments as \verb!\brgraph[...]{a}...{h}!.
109
110 \begin{table}[t]
111 \centering
112 \footnotesize
113 \begin{tabular}{ll}
114 Example & Output \\ \hline
115 \verb!\brname{1}{2}{3}{4}{5}{6}{7}{8}! & \brname{1}{2}{3}{4}{5}{6}{7}{8} \\
116 \verb!\brname{1.1}{-1}{3.7}{4}{-1.2}{3}{1}{5}! & \brname{1.1}{-1}{3.7}{4}{-1.2}{3}{9}{5} \\
117 \verb!\brname{1}{-1}{-1}{1}{1}{-1}{-1}{1}! & \brname{1}{-1}{-1}{1}{1}{-1}{-1}{1} \\
118 \verb!\brname{-1}{1}{1}{-1}{-1}{1}{1}{-1}! & \brname{-1}{1}{1}{-1}{-1}{1}{1}{-1} \\
119 \verb!\brname{0}{0}{0}{0}{0}{0}{0}{1}! & \brname{0}{0}{0}{0}{0}{0}{0}{1} \\
120 \end{tabular}
121 \cprotect\caption{Example usage of the \verb!\brname{a}...{h}! command, which produces best-response equivalence class names. Many payoffs map to the same equivalence class.}
122 \label{tab:brname}
123 \end{table}
124
125 \begin{table}[t]
126 \centering
127 \footnotesize
128 \begin{tabular}{ll|ll|ll}
129 Graph Command & & Graph Command & & Graph Command & \\ \hline
130 \verb!\dominantbrgraph! & \dominantbrgraph & \verb!\safetybrgraph! & \safetybrgraph & \verb!\heistbrgraph! & \heistbrgraph \\
131 \verb!\coordinationbrgraph! & \coordinationbrgraph & \verb!\aidosbrgraph! & \aidosbrgraph & \verb!\ignorancebrgraph! & \ignorancebrgraph \\
132 \verb!\cyclebrgraph! & \cyclebrgraph & \verb!\picnicnbrgraph! & \picnicbrgraph & \verb!\horseplaybrgraph! & \horseplaybrgraph \\
133 \verb!\samaritanbrgraph! & \samaritanbrgraph & \verb!\daredevilbrgraph! & \daredevilbrgraph & \verb!\dressbrgraph! & \dressbrgraph \\
134 \verb!\hazardbrgraph! & \hazardbrgraph & \verb!\fossickbrgraph! & \fossickbrgraph & \verb!\nullbrgraph! & \nullbrgraph
135 \end{tabular}
136 \cprotect\caption{Example usage of the \verb!\<name>brgraph[...]{a}...{h}! commands, which produce the canonical graphs for the 15 equivalence classes proposed by \cite{borm1987_classification_of_2x2_games} and \cite{marris2023_equilibrium_invariant_embedding_2x2_arxiv}. These commands have the same key word arguments as \verb!\brgraph!.}
137 \label{tab:namebrgraph}
138 \end{table}
139
140
141 \subsubsection{Ordinal Graphs and Partial Ordinal Graphs}
142
143 It is also possible to visualize payoff orderings in graphical form using the \verb!\ordgraph[<keywords>]{a}...{h}! command. Ordinal games have a simple four edge directed graph representation for each player. The ``periodic table'' of ordinal games is shown in Table~\ref{tab:ordinal_games}. The command is also able to handle partial ordinal graphs. In the literature, these are categorized as triple, double, high, low, middle and basic ties. The representation consists of two directed graphs, one for each player. The row player's graph is black and shifted to the bottom left, by default. The column player's graph is gray and shifted to the top right, by default. Each graph then represents the partial ordering of the payoffs of each pure joint strategy. The ordinal representation of some common games is shown in Table~\ref{tab:ord_examples}. Examples of partially ordinal games are given in Table~\ref{tab:partial_ord_examples}.
144
145 \begin{table}[t!]
146 \centering
147 \footnotesize
148 \begin{tabular}{lll}
149 Keyword Argument & Description & Default \\ \hline
150 point offset & The distance of the points from the center & 0.38em \\
151 row player x offset & Additional horizontal offset applied to row player & -0.1e, \\
152 row player y offset & Additional vertical offset applied to row player & -0.5em \\
153 column player x offset & Additional horizontal offset applied to column player & 0.1em \\
154 column player y offset & Additional vertical offset applied to column player & 0.05em \\
155 point color & Color of points & . \\
156 point radius & Radius of points & 0.04em \\
157 row player color & Color of row player's BR edges & . \\
158 column player color & Color of column player's BR edges & gray \\
159 arrow width & Arrow head width & 0.25em \\
160 arrow length & Arrow head length & 0.35em \\
161 line width & Arrow line width & 0.04em \\
162 \end{tabular}
163
164 \vspace{1.0em}
165
166 \begin{tabular}{V{0.8\linewidth}l}
167 Command & Output \\ \hline
168 \begin{verbatim}
169 \ordgraph{1}{-1}{-1}{1}{-1}{1}{1}{-1}
170 \end{verbatim}
171 & \ordgraph{1}{-1}{-1}{1}{-1}{1}{1}{-1} \\
172 \begin{verbatim}
173 \ordgraph[
174 row player color=red,
175 column player color=blue
176 ]{1}{-1}{-1}{1}{-1}{1}{1}{-1}
177 \end{verbatim}
178 & \ordgraph[row player color=red,column player color=blue]{1}{-1}{-1}{1}{-1}{1}{1}{-1}
179 \end{tabular}
180
181 \cprotect\caption{Parameterization, default values, and example usage of the \verb!\ordgraph[...]{a}...{h}! command, which produces inline ordinal graphs. Default period indicates inheritance from outer scope.}
182 \label{tab:ordgraph}
183 \end{table}
184
185 \begin{table}[t]
186 \centering
187 \footnotesize
188 \begingroup
189 \renewcommand{\arraystretch}{1.3}
190 \addtolength{\tabcolsep}{-3pt}
191 \begin{tabular}{r|cccccccccccc}
192 Chicken \ordgraph{2}{3}{1}{4}{0}{0}{0}{0} &
193 \ordgraph{2}{3}{1}{4}{3}{4}{1}{2} &
194 \ordgraph{2}{3}{1}{4}{2}{4}{1}{3} &
195 \ordgraph{2}{3}{1}{4}{1}{4}{2}{3} &
196 \ordgraph{2}{3}{1}{4}{1}{4}{3}{2} &
197 \ordgraph{2}{3}{1}{4}{2}{4}{3}{1} &
198 \ordgraph{2}{3}{1}{4}{3}{4}{2}{1} &
199 \ordgraph{2}{3}{1}{4}{4}{3}{2}{1} &
200 \ordgraph{2}{3}{1}{4}{4}{2}{3}{1} &
201 \ordgraph{2}{3}{1}{4}{4}{1}{3}{2} &
202 \ordgraph{2}{3}{1}{4}{3}{1}{2}{4} &
203 \ordgraph{2}{3}{1}{4}{4}{2}{1}{3} &
204 \ordgraph{2}{3}{1}{4}{4}{3}{1}{2} \\
205 Battle \ordgraph{3}{2}{1}{4}{0}{0}{0}{0} &
206 \ordgraph{3}{2}{1}{4}{3}{4}{1}{2} &
207 \ordgraph{3}{2}{1}{4}{2}{4}{1}{3} &
208 \ordgraph{3}{2}{1}{4}{1}{4}{2}{3} &
209 \ordgraph{3}{2}{1}{4}{1}{4}{3}{2} &
210 \ordgraph{3}{2}{1}{4}{2}{4}{3}{1} &
211 \ordgraph{3}{2}{1}{4}{3}{4}{2}{1} &
212 \ordgraph{3}{2}{1}{4}{4}{3}{2}{1} &
213 \ordgraph{3}{2}{1}{4}{4}{2}{3}{1} &
214 \ordgraph{3}{2}{1}{4}{4}{1}{3}{2} &
215 \ordgraph{3}{2}{1}{4}{3}{1}{2}{4} &
216 \ordgraph{3}{2}{1}{4}{4}{2}{1}{3} &
217 \ordgraph{3}{2}{1}{4}{4}{3}{1}{2} \\
218 Hero \ordgraph{3}{1}{2}{4}{0}{0}{0}{0} &
219 \ordgraph{3}{1}{2}{4}{3}{4}{1}{2} &
220 \ordgraph{3}{1}{2}{4}{2}{4}{1}{3} &
221 \ordgraph{3}{1}{2}{4}{1}{4}{2}{3} &
222 \ordgraph{3}{1}{2}{4}{1}{4}{3}{2} &
223 \ordgraph{3}{1}{2}{4}{2}{4}{3}{1} &
224 \ordgraph{3}{1}{2}{4}{3}{4}{2}{1} &
225 \ordgraph{3}{1}{2}{4}{4}{3}{2}{1} &
226 \ordgraph{3}{1}{2}{4}{4}{2}{3}{1} &
227 \ordgraph{3}{1}{2}{4}{4}{1}{3}{2} &
228 \ordgraph{3}{1}{2}{4}{3}{1}{2}{4} &
229 \ordgraph{3}{1}{2}{4}{4}{2}{1}{3} &
230 \ordgraph{3}{1}{2}{4}{4}{3}{1}{2} \\
231 Compromise \ordgraph{2}{1}{3}{4}{0}{0}{0}{0} &
232 \ordgraph{2}{1}{3}{4}{3}{4}{1}{2} &
233 \ordgraph{2}{1}{3}{4}{2}{4}{1}{3} &
234 \ordgraph{2}{1}{3}{4}{1}{4}{2}{3} &
235 \ordgraph{2}{1}{3}{4}{1}{4}{3}{2} &
236 \ordgraph{2}{1}{3}{4}{2}{4}{3}{1} &
237 \ordgraph{2}{1}{3}{4}{3}{4}{2}{1} &
238 \ordgraph{2}{1}{3}{4}{4}{3}{2}{1} &
239 \ordgraph{2}{1}{3}{4}{4}{2}{3}{1} &
240 \ordgraph{2}{1}{3}{4}{4}{1}{3}{2} &
241 \ordgraph{2}{1}{3}{4}{3}{1}{2}{4} &
242 \ordgraph{2}{1}{3}{4}{4}{2}{1}{3} &
243 \ordgraph{2}{1}{3}{4}{4}{3}{1}{2} \\
244 Deadlock \ordgraph{1}{2}{3}{4}{0}{0}{0}{0} &
245 \ordgraph{1}{2}{3}{4}{3}{4}{1}{2} &
246 \ordgraph{1}{2}{3}{4}{2}{4}{1}{3} &
247 \ordgraph{1}{2}{3}{4}{1}{4}{2}{3} &
248 \ordgraph{1}{2}{3}{4}{1}{4}{3}{2} &
249 \ordgraph{1}{2}{3}{4}{2}{4}{3}{1} &
250 \ordgraph{1}{2}{3}{4}{3}{4}{2}{1} &
251 \ordgraph{1}{2}{3}{4}{4}{3}{2}{1} &
252 \ordgraph{1}{2}{3}{4}{4}{2}{3}{1} &
253 \ordgraph{1}{2}{3}{4}{4}{1}{3}{2} &
254 \ordgraph{1}{2}{3}{4}{3}{1}{2}{4} &
255 \ordgraph{1}{2}{3}{4}{4}{2}{1}{3} &
256 \ordgraph{1}{2}{3}{4}{4}{3}{1}{2} \\
257 Dilemma \ordgraph{1}{3}{2}{4}{0}{0}{0}{0} &
258 \ordgraph{1}{3}{2}{4}{3}{4}{1}{2} &
259 \ordgraph{1}{3}{2}{4}{2}{4}{1}{3} &
260 \ordgraph{1}{3}{2}{4}{1}{4}{2}{3} &
261 \ordgraph{1}{3}{2}{4}{1}{4}{3}{2} &
262 \ordgraph{1}{3}{2}{4}{2}{4}{3}{1} &
263 \ordgraph{1}{3}{2}{4}{3}{4}{2}{1} &
264 \ordgraph{1}{3}{2}{4}{4}{3}{2}{1} &
265 \ordgraph{1}{3}{2}{4}{4}{2}{3}{1} &
266 \ordgraph{1}{3}{2}{4}{4}{1}{3}{2} &
267 \ordgraph{1}{3}{2}{4}{3}{1}{2}{4} &
268 \ordgraph{1}{3}{2}{4}{4}{2}{1}{3} &
269 \ordgraph{1}{3}{2}{4}{4}{3}{1}{2} \\
270 Hunt \ordgraph{1}{4}{2}{3}{0}{0}{0}{0} &
271 \ordgraph{1}{4}{2}{3}{3}{4}{1}{2} &
272 \ordgraph{1}{4}{2}{3}{2}{4}{1}{3} &
273 \ordgraph{1}{4}{2}{3}{1}{4}{2}{3} &
274 \ordgraph{1}{4}{2}{3}{1}{4}{3}{2} &
275 \ordgraph{1}{4}{2}{3}{2}{4}{3}{1} &
276 \ordgraph{1}{4}{2}{3}{3}{4}{2}{1} &
277 \ordgraph{1}{4}{2}{3}{4}{3}{2}{1} &
278 \ordgraph{1}{4}{2}{3}{4}{2}{3}{1} &
279 \ordgraph{1}{4}{2}{3}{4}{1}{3}{2} &
280 \ordgraph{1}{4}{2}{3}{3}{1}{2}{4} &
281 \ordgraph{1}{4}{2}{3}{4}{2}{1}{3} &
282 \ordgraph{1}{4}{2}{3}{4}{3}{1}{2} \\
283 Assurance \ordgraph{1}{4}{3}{2}{0}{0}{0}{0} &
284 \ordgraph{1}{4}{3}{2}{3}{4}{1}{2} &
285 \ordgraph{1}{4}{3}{2}{2}{4}{1}{3} &
286 \ordgraph{1}{4}{3}{2}{1}{4}{2}{3} &
287 \ordgraph{1}{4}{3}{2}{1}{4}{3}{2} &
288 \ordgraph{1}{4}{3}{2}{2}{4}{3}{1} &
289 \ordgraph{1}{4}{3}{2}{3}{4}{2}{1} &
290 \ordgraph{1}{4}{3}{2}{4}{3}{2}{1} &
291 \ordgraph{1}{4}{3}{2}{4}{2}{3}{1} &
292 \ordgraph{1}{4}{3}{2}{4}{1}{3}{2} &
293 \ordgraph{1}{4}{3}{2}{3}{1}{2}{4} &
294 \ordgraph{1}{4}{3}{2}{4}{2}{1}{3} &
295 \ordgraph{1}{4}{3}{2}{4}{3}{1}{2} \\
296 Coordination \ordgraph{2}{4}{3}{1}{0}{0}{0}{0} &
297 \ordgraph{2}{4}{3}{1}{3}{4}{1}{2} &
298 \ordgraph{2}{4}{3}{1}{2}{4}{1}{3} &
299 \ordgraph{2}{4}{3}{1}{1}{4}{2}{3} &
300 \ordgraph{2}{4}{3}{1}{1}{4}{3}{2} &
301 \ordgraph{2}{4}{3}{1}{2}{4}{3}{1} &
302 \ordgraph{2}{4}{3}{1}{3}{4}{2}{1} &
303 \ordgraph{2}{4}{3}{1}{4}{3}{2}{1} &
304 \ordgraph{2}{4}{3}{1}{4}{2}{3}{1} &
305 \ordgraph{2}{4}{3}{1}{4}{1}{3}{2} &
306 \ordgraph{2}{4}{3}{1}{3}{1}{2}{4} &
307 \ordgraph{2}{4}{3}{1}{4}{2}{1}{3} &
308 \ordgraph{2}{4}{3}{1}{4}{3}{1}{2} \\
309 Peace \ordgraph{3}{4}{2}{1}{0}{0}{0}{0} &
310 \ordgraph{3}{4}{2}{1}{3}{4}{1}{2} &
311 \ordgraph{3}{4}{2}{1}{2}{4}{1}{3} &
312 \ordgraph{3}{4}{2}{1}{1}{4}{2}{3} &
313 \ordgraph{3}{4}{2}{1}{1}{4}{3}{2} &
314 \ordgraph{3}{4}{2}{1}{2}{4}{3}{1} &
315 \ordgraph{3}{4}{2}{1}{3}{4}{2}{1} &
316 \ordgraph{3}{4}{2}{1}{4}{3}{2}{1} &
317 \ordgraph{3}{4}{2}{1}{4}{2}{3}{1} &
318 \ordgraph{3}{4}{2}{1}{4}{1}{3}{2} &
319 \ordgraph{3}{4}{2}{1}{3}{1}{2}{4} &
320 \ordgraph{3}{4}{2}{1}{4}{2}{1}{3} &
321 \ordgraph{3}{4}{2}{1}{4}{3}{1}{2} \\
322 Harmony \ordgraph{3}{4}{1}{2}{0}{0}{0}{0} &
323 \ordgraph{3}{4}{1}{2}{3}{4}{1}{2} &
324 \ordgraph{3}{4}{1}{2}{2}{4}{1}{3} &
325 \ordgraph{3}{4}{1}{2}{1}{4}{2}{3} &
326 \ordgraph{3}{4}{1}{2}{1}{4}{3}{2} &
327 \ordgraph{3}{4}{1}{2}{2}{4}{3}{1} &
328 \ordgraph{3}{4}{1}{2}{3}{4}{2}{1} &
329 \ordgraph{3}{4}{1}{2}{4}{3}{2}{1} &
330 \ordgraph{3}{4}{1}{2}{4}{2}{3}{1} &
331 \ordgraph{3}{4}{1}{2}{4}{1}{3}{2} &
332 \ordgraph{3}{4}{1}{2}{3}{1}{2}{4} &
333 \ordgraph{3}{4}{1}{2}{4}{2}{1}{3} &
334 \ordgraph{3}{4}{1}{2}{4}{3}{1}{2} \\
335 Concord \ordgraph{2}{4}{1}{3}{0}{0}{0}{0} &
336 \ordgraph{2}{4}{1}{3}{3}{4}{1}{2} &
337 \ordgraph{2}{4}{1}{3}{2}{4}{1}{3} &
338 \ordgraph{2}{4}{1}{3}{1}{4}{2}{3} &
339 \ordgraph{2}{4}{1}{3}{1}{4}{3}{2} &
340 \ordgraph{2}{4}{1}{3}{2}{4}{3}{1} &
341 \ordgraph{2}{4}{1}{3}{3}{4}{2}{1} &
342 \ordgraph{2}{4}{1}{3}{4}{3}{2}{1} &
343 \ordgraph{2}{4}{1}{3}{4}{2}{3}{1} &
344 \ordgraph{2}{4}{1}{3}{4}{1}{3}{2} &
345 \ordgraph{2}{4}{1}{3}{3}{1}{2}{4} &
346 \ordgraph{2}{4}{1}{3}{4}{2}{1}{3} &
347 \ordgraph{2}{4}{1}{3}{4}{3}{1}{2} \\ \hline
348 &
349 \rotatebox[origin=tr]{90}{Concord \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{3}{4}{1}{2}} } &
350 \rotatebox[origin=tr]{90}{Harmony \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{2}{4}{1}{3}} } &
351 \rotatebox[origin=tr]{90}{Peace \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{1}{4}{2}{3}} } &
352 \rotatebox[origin=tr]{90}{Coordination \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{1}{4}{3}{2}} } &
353 \rotatebox[origin=tr]{90}{Assurance \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{2}{4}{3}{1}} } &
354 \rotatebox[origin=tr]{90}{Hunt \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{3}{4}{2}{1}} } &
355 \rotatebox[origin=tr]{90}{Dilemma \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{4}{3}{2}{1}} } &
356 \rotatebox[origin=tr]{90}{Deadlock \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{4}{2}{3}{1}} } &
357 \rotatebox[origin=tr]{90}{Compromise \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{4}{1}{3}{2}} } &
358 \rotatebox[origin=tr]{90}{Hero \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{3}{1}{2}{4}} } &
359 \rotatebox[origin=tr]{90}{Battle \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{4}{2}{1}{3}} } &
360 \rotatebox[origin=tr]{90}{Chicken \rotatebox[origin=c]{-90}{\ordgraph{0}{0}{0}{0}{4}{3}{1}{2}} }
361 \end{tabular}
362 \addtolength{\tabcolsep}{3pt}
363 \endgroup
364 \caption{Periodic table of ordinal games \citep{robinsonandgoforth2005_topology_of_2x2_games_book,goforth2005_periodic_table_of_games} with a naming scheme proposed by \cite{bruns2015_names_for_games}.}
365 \label{tab:ordinal_games}
366 \end{table}
367
368 \begin{table}[t!]
369 \centering
370 \begin{subtable}[t]{0.3\linewidth}
371 \centering
372 \begin{tabular}{c|cc}
373 \ordgraph{3}{0}{0}{2}{2}{0}{0}{3} & M & F \\ \hline
374 M & 3,2 & 0,0 \\
375 F & 0,0 & 2,3 \\
376 \end{tabular}
377 \caption{Battle of the Sexes}
378 \label{tab:ord_battle_of_the_sexes}
379 \end{subtable} \hfill
380 \begin{subtable}[t]{0.3\linewidth}
381 \centering
382 \begin{tabular}{c|cc}
383 \ordgraph{2}{7}{0}{4}{2}{0}{7}{4} & C & D \\ \hline
384 C & 2,2 & 7,0 \\
385 D & 0,7 & 4,4 \\
386 \end{tabular}
387 \caption{Prisoner's Dilemma}
388 \label{tab:ord_prisoners_dillema}
389 \end{subtable} \hfill
390 \begin{subtable}[t]{0.3\linewidth}
391 \centering
392 \begin{tabular}{c|cc}
393 \ordgraph{1}{-1}{-1}{1}{-1}{1}{1}{-1} & H & T \\ \hline
394 H & $+1$,$-1$ & $-1$,$+1$ \\
395 T & $-1$,$+1$ & $+1$,$-1$ \\
396 \end{tabular}
397 \caption{Matching Pennies}
398 \label{tab:ord_matching_pennies}
399 \end{subtable}
400 \caption{Ordinal and partial ordinal graphs for common normal-form games.}
401 \label{tab:ord_examples}
402 \end{table}
403
404 \begin{table}[t!]
405 \centering
406 \begin{subtable}[t]{0.22\linewidth}
407 \centering
408 \begin{tabular}{c|cc}
409 \ordgraph{1}{2}{3}{4}{2}{3}{1}{4} & A & B \\ \hline
410 A & 1,2 & 2,3 \\
411 B & 3,1 & 4,4 \\
412 \end{tabular}
413 \caption{Strict Tie}
414 \label{tab:strict_tie}
415 \end{subtable} \hfill
416 \begin{subtable}[t]{0.22\linewidth}
417 \centering
418 \begin{tabular}{c|cc}
419 \ordgraph{2}{2}{2}{1}{1}{0}{1}{1} & A & B \\ \hline
420 A & 2,1 & 2,0 \\
421 B & 2,1 & 1,1 \\
422 \end{tabular}
423 \caption{Triple Tie}
424 \label{tab:triple_tie}
425 \end{subtable} \hfill
426 \begin{subtable}[t]{0.22\linewidth}
427 \centering
428 \begin{tabular}{c|cc}
429 \ordgraph{1}{0}{1}{0}{1}{1}{0}{0} & A & B \\ \hline
430 A & 1,1 & 0,1 \\
431 B & 1,0 & 0,0 \\
432 \end{tabular}
433 \caption{Double Tie}
434 \label{tab:double_tie}
435 \end{subtable} \hfill
436 \begin{subtable}[t]{0.22\linewidth}
437 \centering
438 \begin{tabular}{c|cc}
439 \ordgraph{1}{0}{0}{0}{0}{0}{0}{1} & A & B \\ \hline
440 A & 1,0 & 0,0 \\
441 B & 0,0 & 0,1 \\
442 \end{tabular}
443 \caption{Basic Tie}
444 \label{tab:basic_tie}
445 \end{subtable}
446
447 \begin{subtable}[t]{0.22\linewidth}
448 \centering
449 \begin{tabular}{c|cc}
450 \ordgraph{0}{0}{0}{0}{1}{1}{1}{1} & A & B \\ \hline
451 A & 0,1 & 0,1 \\
452 B & 0,1 & 0,1 \\
453 \end{tabular}
454 \caption{Zero Tie}
455 \label{tab:zero_tie}
456 \end{subtable} \hfill
457 \begin{subtable}[t]{0.22\linewidth}
458 \centering
459 \begin{tabular}{c|cc}
460 \ordgraph{3}{3}{2}{1}{1}{3}{3}{2} & A & B \\ \hline
461 A & 3,1 & 3,3 \\
462 B & 2,3 & 1,2 \\
463 \end{tabular}
464 \caption{High Tie}
465 \label{tab:high_tie}
466 \end{subtable} \hfill
467 \begin{subtable}[t]{0.22\linewidth}
468 \centering
469 \begin{tabular}{c|cc}
470 \ordgraph{1}{0}{0}{-1}{2}{-1}{1}{0} & A & B \\ \hline
471 A & $1$,0 & 0,$-1$ \\
472 B & 0,$1$ & $-1$,0 \\
473 \end{tabular}
474 \caption{Middle Tie}
475 \label{tab:middle_tie}
476 \end{subtable} \hfill
477 \begin{subtable}[t]{0.22\linewidth}
478 \centering
479 \begin{tabular}{c|cc}
480 \ordgraph{2}{1}{0}{0}{0}{1}{2}{0} & A & B \\ \hline
481 A & 2,0 & 1,1 \\
482 B & 0,2 & 0,0 \\
483 \end{tabular}
484 \caption{Low Tie}
485 \label{tab:low_tie}
486 \end{subtable}
487 \caption{Examples of partial ordinal graphs for each of the possible ties.}
488 \label{tab:partial_ord_examples}
489 \end{table}
490
491
492 \subsubsection{Payoff Tables}
493
494 This package also provides commands for specifying payoff tables. The \verb!\smallpayoffstable[...]{a}...{h}! command produces inline payoff tables (Table~\ref{tab:smallpayoffstable}).
495
496 While the \verb!\payoffstable[...]{a}...{h}! command produces full tabular payoff tables with strategy labels.
497
498
499 For example, \verb!\smallpayoffstable{1}{+2}{9}{-4}{3}{2}{1}{0}! results in a small inline payoff table, \smallpayoffstable{1}{+2}{9}{-4}{3}{2}{1}{0}. It is also possible to modify the values with keyword arguments (Table~\ref{tab:smallpayoffstable}).
500
501 \begin{table}[t!]
502 \centering
503 \footnotesize
504 \begin{tabular}{lll}
505 Keyword Argument & Description & Default \\ \hline
506 row player color & Color of row player's payoffs & . \\
507 column player color & Color of column player's payoffs & . \\
508 row player first strategy color & Color of row player's first strategies & \verb!\empty! \\
509 row player second strategy color & Color of row player's second strategies & \verb!\empty! \\
510 column player first strategy color & Color of column player's first strategies & \verb!\empty! \\
511 column player second strategy color & Color of column player's second strategies & \verb!\empty! \\
512 \end{tabular}
513
514 \vspace{1.0em}
515
516 \begin{tabular}{V{0.8\linewidth}l}
517 Example & Output \\ \hline
518 \begin{verbatim}
519 \smallpayoffstable{1}{2}{9}{-4}{3}{2}{1}{0}
520 \end{verbatim}
521 & \smallpayoffstable{1}{2}{9}{-4}{3}{2}{1}{0} \\
522 \begin{verbatim}
523 \smallpayoffstable[
524 row player color=red,
525 column player color=blue
526 ]{1}{2}{9}{-4}{3}{2}{1}{0}
527 \end{verbatim}
528 & \smallpayoffstable[row player color=red,column player color=blue]{1}{2}{9}{-4}{3}{2}{1}{0} \\
529 \begin{verbatim}
530 \smallpayoffstable[
531 row player first strategy color=red,
532 row player second strategy color=orange,
533 column player first strategy color=purple,
534 column player second strategy color=blue
535 ]{1}{2}{9}{-4}{3}{2}{1}{0}
536 \end{verbatim}
537 & \smallpayoffstable[row player first strategy color=red,row player second strategy color=orange,column player first strategy color=purple,column player second strategy color=blue]{1}{2}{9}{-4}{3}{2}{1}{0} \\
538 \end{tabular}
539 \cprotect\caption{Parameterization, default values, and example usage of the \verb!\smallpayoffstable[...]{a}...{h}! command, which produces inline payoff tables. Default period indicates inheritance from outer scope.}
540 \label{tab:smallpayoffstable}
541 \end{table}
542
543
544 Larger payoff tables can be represented with the \verb!\payoffstable[...]{a}...{h}!, \verb!\brpayoffstable[...]{a}...{h}!, and \verb!\ordpayoffstable[...]{a}...{h}! commands. Examples are given in Table~\ref{fig:table_examples}.
545
546 \begin{table}[t!]
547 \centering
548 \begin{subtable}[t]{0.32\linewidth}
549 \centering
550 \payoffstable[row player color=red, column player color=blue]{1}{+2}{9}{-4}{3}{2}{1}{0}
551 \cprotect\caption{\verb!\payoffstable!}
552 \label{fig:empty_table}
553 \end{subtable} \hfill
554 \begin{subtable}[t]{0.32\linewidth}
555 \centering
556 \brpayoffstable[row player color=red, column player color=blue]{1}{+2}{9}{-4}{3}{2}{1}{0}
557 \cprotect\caption{\verb!\brpayoffstable!}
558 \label{fig:br_table}
559 \end{subtable} \hfill
560 \begin{subtable}[t]{0.32\linewidth}
561 \centering
562 \ordpayoffstable[row player color=red, column player color=blue]{1}{+2}{9}{-4}{3}{2}{1}{0}
563 \cprotect\caption{\verb!\ordpayoffstable!}
564 \label{fig:ord_table}
565 \end{subtable} \hfill
566 \caption{Examples of the three table commands.}
567 \label{fig:table_examples}
568 \end{table}
569
570
571 \subsection{Distribution Representations}
572
573 Distributions, including joint, marginal, and conditional distributions can be visualised using either small inline graphs, tables, or larger figures.
574
575
576 \subsubsection{Inline Distribution Graphs}
577
578 Inline graphs for joint, conditional, and marginal distributions can be produced using the commands in Table~\ref{tab:inline_dist_graphs}. All the commands take a joint distribution as arguments (Table~\ref{tab:2x2_joint_parameterization}). Optional arguments include \verb!color!, \verb!border color!, \verb!row player color!, and \verb!column player color!.
579
580 \begin{table}[h!]
581 \footnotesize
582 \noindent\begin{tabular}{llr}
583 Command Signature & Example Command & \\ \hline
584 \verb!\jointgraph[..]{a}..{d}! & \verb!\jointgraph{.4}{.3}{.1}{.2}! & \jointgraph{.4}{.3}{.1}{.2} \\
585 \verb!\rowcondgraph[..]{a}..{d}! & \verb!\rowcondgraph{.4}{.3}{.1}{.2}! & \rowcondgraph{.4}{.3}{.1}{.2} \\
586 \verb!\colcondgraph[..]{a}..{d}! & \verb!\colcondgraph{.4}{.3}{.1}{.2}! & \colcondgraph{.4}{.3}{.1}{.2} \\
587 \verb!\marginalgraph[..]{a}..{d}! & \verb!\marginalgraph{.4}{.3}{.1}{.2}! & \marginalgraph{.4}{.3}{.1}{.2} \\
588 \verb!\jmgraph[..]{a}..{d}! & \verb!\jmgraph{.4}{.3}{.1}{.2} ! & \jmgraph{.4}{.3}{.1}{.2}
589 \end{tabular}
590 \caption{Inline distribution graphs.}
591 \label{tab:inline_dist_graphs}
592 \end{table}
593
594 \subsubsection{Distribution Tables}
595
596 Tables can also be easily defined for joint distributions (Figure~\ref{fig:joint_table_examples}). Optional arguments include \verb!label!, \verb!color!, \verb!border color!, \verb!row player color!, and \verb!column player color!.
597
598 \begin{table}[h!]
599 \centering
600 \begin{subtable}[t]{0.3\linewidth}
601 \centering
602 \jgjointtable[row player color=red, column player color=blue]{0.1}{0.2}{0.3}{0.4}
603 \cprotect\caption{\verb!\jgjointtable!}
604 \label{fig:jg_joint_table}
605 \end{subtable} \hfill
606 \begin{subtable}[t]{0.3\linewidth}
607 \centering
608 \rcgjointtable[row player color=red, column player color=blue]{0.1}{0.2}{0.3}{0.4}
609 \cprotect\caption{\verb!\rcgjointtable!}
610 \label{fig:rcg_joint_table}
611 \end{subtable} \hfill
612 \begin{subtable}[t]{0.3\linewidth}
613 \centering
614 \ccgjointtable[row player color=red, column player color=blue]{0.1}{0.2}{0.3}{0.4}
615 \cprotect\caption{\verb!\ccgjointtable!}
616 \label{fig:ccg_joint_table}
617 \end{subtable} \hfill
618
619 \begin{subtable}[t]{0.3\linewidth}
620 \centering
621 \mgjointtable[row player color=red, column player color=blue]{0.1}{0.2}{0.3}{0.4}
622 \cprotect\caption{\verb!\mgjointtable!}
623 \label{fig:mg_joint_table}
624 \end{subtable} \hfill
625 \begin{subtable}[t]{0.3\linewidth}
626 \centering
627 \jmgjointtable[row player color=red, column player color=blue]{0.1}{0.2}{0.3}{0.4}
628 \cprotect\caption{\verb!\jmgjointtable!}
629 \label{fig:jmg_joint_table}
630 \end{subtable} \hfill
631 \begin{subtable}[t]{0.3\linewidth}
632 \centering
633 \jointtable[row player color=red, column player color=blue]{0.1}{0.2}{0.3}{0.4}
634 \cprotect\caption{\verb!\jointtable!}
635 \label{fig:empty_joint_table}
636 \end{subtable}
637
638 \caption{Examples of joint distribution table commands. The naming convention is: ``jg'' for ``joint graph'', ``rcg'' for ``row conditional graph'', ``ccg'' for ``column conditional graph'', ``mg'' for ``marginal graph'', and ``jmg'' for ``joint-marginal graph''.}
639 \label{fig:joint_table_examples}
640 \end{table}
641
642
643
644 \subsubsection{Marginal Simplex}
645
646 Marginals, $\sigma_r = [\sigma_r^A, \sigma_r^B]$ and $\sigma_c = [\sigma_c^A, \sigma_c^B]$, can be plotted in two dimensions and the product of two 1-simplices. Points, images, heatmaps, and quiver plots can be generated from data (Figure~\ref{fig:marginal_simplex}).
647
648 \begin{figure}[t]
649 \centering
650 \footnotesize
651 \begin{subfigure}[t]{0.32\linewidth}
652 \marginalsimplex[width=\linewidth,points=doc_data/marginal_simplex/points.dat]
653 \caption{Points}
654 \label{fig:marginal_simplex_points}
655 \end{subfigure}\hfill
656 \begin{subfigure}[t]{0.32\linewidth}
657 \marginalsimplex[width=\linewidth,heatmap=doc_data/marginal_simplex/heatmap.dat]
658 \caption{Heatmap}
659 \label{fig:marginal_simplex_heatmap}
660 \end{subfigure}\hfill
661 \begin{subfigure}[t]{0.32\linewidth}
662 \marginalsimplex[width=\linewidth,quiver=doc_data/marginal_simplex/quiver.dat,quiver scale arrows=0.1]
663 \caption{Quiver}
664 \label{fig:marginal_simplex_quiver}
665 \end{subfigure}
666
667 \caption{Marginal Simplex Plots}
668 \label{fig:marginal_simplex}
669 \end{figure}
670
671
672 \subsubsection{Joint Simplex}
673
674 The joint of a 2×2 normal-form game is described by four probabilities, $\{\sigma(\text{AA}),\allowbreak\sigma(\text{AB}),\allowbreak\sigma(\text{BA}),\allowbreak\sigma(\text{BB})\}$. Due to the constraint that $\sum_{a \in \mathcal{A}} \sigma(a) = 1$, there is redundancy in this parameterization. Therefore probability distributions (a 4-dimensional barycentric coordinate system) can be visualized on a 3-simplex in 3-dimensional Cartesian coordinates.
675
676 A joint distribution is a point within this simplex, with pure joint strategies corresponding to the vertices of the simplex. Sets of points can also be visualized. In particular, convex polytope sets can be visualized by tracing the edges of the polytope. Games permit a convex polytope of (C)CE equilibria, and therefore these can be easily visualized. In fact, in two-strategy games, CEs and CCEs are equivalent. NEs are equilibria that are (C)CEs and also factorize, $\sigma(a_1,a_2)=\sigma_1(a_1)\sigma_2(a_2)$. In 2×2 normal-form games, NEs can be either points, lines, or in a degenerate case a manifold which stretches across all the vertices of the simplex. These polytopes can be visualized using the \verb!polytope[...]{a}...{h}! command.
677
678 \begin{figure}[t]
679 \centering
680 \begin{subfigure}[t]{0.24\linewidth}
681 \polytope[width=\linewidth]{1}{1}{0}{0}{1}{0}{1}{0}
682 \vspace{-1.5em}
683 \caption{\footnotesize\brgraph{1}{1}{0}{0}{1}{0}{1}{0}~\brname{1}{1}{0}{0}{1}{0}{1}{0}}
684 \label{fig:simplex_dominant}
685 \end{subfigure}\hfill
686 \begin{subfigure}[t]{0.24\linewidth}
687 \polytope[width=\linewidth]{0}{1}{1}{0}{0}{1}{1}{0}
688 \vspace{-1.5em}
689 \caption{\footnotesize\brgraph{0}{1}{1}{0}{0}{1}{1}{0}~\brname{0}{1}{1}{0}{0}{1}{1}{0}}
690 \label{fig:simplex_coordination}
691 \end{subfigure}\hfill
692 \begin{subfigure}[t]{0.24\linewidth}
693 \polytope[width=\linewidth]{1}{-1}{-1}{1}{-1}{1}{1}{-1}
694 \vspace{-1.5em}
695 \caption{\footnotesize\brgraph{1}{-1}{-1}{1}{-1}{1}{1}{-1}~\brname{1}{-1}{-1}{1}{-1}{1}{1}{-1}}
696 \label{fig:simplex_cycle}
697 \end{subfigure}\hfill
698 \begin{subfigure}[t]{0.24\linewidth}
699 \polytope[width=\linewidth]{1}{0}{0}{1}{1}{0}{1}{0}
700 \vspace{-1.5em}
701 \caption{\footnotesize\brgraph{1}{0}{0}{1}{1}{0}{1}{0}~\brname{1}{0}{0}{1}{1}{0}{1}{0}}
702 \label{fig:simplex_samaritan}
703 \end{subfigure}
704
705 \begin{subfigure}[t]{0.24\linewidth}
706 \polytope[width=\linewidth]{+1}{-1}{-1}{+1}{0}{0}{+1}{-1}
707 \vspace{-1.5em}
708 \caption{\footnotesize\brgraph{+1}{-1}{-1}{+1}{0}{0}{+1}{-1}~\brname{+1}{-1}{-1}{+1}{0}{0}{+1}{-1}}
709 \label{fig:simplex_hazard}
710 \end{subfigure}\hfill
711 \begin{subfigure}[t]{0.24\linewidth}
712 \polytope[width=\linewidth]{+1}{-1}{-1}{+1}{+1}{-1}{0}{0}
713 \vspace{-1.5em}
714 \caption{\footnotesize\brgraph{+1}{-1}{-1}{+1}{+1}{-1}{0}{0}~\brname{+1}{-1}{-1}{+1}{+1}{-1}{0}{0}}
715 \label{fig:simplex_safety}
716 \end{subfigure}\hfill
717 \begin{subfigure}[t]{0.24\linewidth}
718 \polytope[width=\linewidth]{+1}{+1}{-1}{-1}{0}{0}{+1}{-1}
719 \vspace{-1.5em}
720 \caption{\footnotesize\brname{+1}{+1}{-1}{-1}{0}{0}{+1}{-1}~\brgraph{+1}{+1}{-1}{-1}{0}{0}{+1}{-1}}
721 \label{fig:simplex_aidos}
722 \end{subfigure}\hfill
723 \begin{subfigure}[t]{0.24\linewidth}
724 \polytope[width=\linewidth]{+1}{0}{-1}{0}{+1}{-1}{+1}{-1}
725 \vspace{-1.5em}
726 \caption{\footnotesize\brname{+1}{0}{-1}{0}{+1}{-1}{+1}{-1}~\brgraph{+1}{0}{-1}{0}{+1}{-1}{+1}{-1}}
727 \label{fig:simplex_picnic}
728 \end{subfigure}
729
730 \begin{subfigure}[t]{0.24\linewidth}
731 \polytope[width=\linewidth]{0}{+1}{0}{-1}{0}{0}{+1}{-1}
732 \vspace{-1.5em}
733 \caption{\footnotesize\brgraph{0}{+1}{0}{-1}{0}{0}{+1}{-1}~\brname{0}{+1}{0}{-1}{0}{0}{+1}{-1}}
734 \label{fig:simplex_daredevil}
735 \end{subfigure}\hfill
736 \begin{subfigure}[t]{0.24\linewidth}
737 \polytope[width=\linewidth]{+1}{0}{-1}{0}{+1}{-1}{0}{0}
738 \vspace{-1.5em}
739 \caption{\footnotesize\brgraph{+1}{0}{-1}{0}{+1}{-1}{0}{0}~\brname{+1}{0}{-1}{0}{+1}{-1}{0}{0}}
740 \label{fig:simplex_fossick}
741 \end{subfigure}\hfill
742 \begin{subfigure}[t]{0.24\linewidth}
743 \polytope[width=\linewidth]{+1}{0}{-1}{0}{0}{0}{+1}{-1}
744 \vspace{-1.5em}
745 \caption{\footnotesize\brgraph{+1}{0}{-1}{0}{0}{0}{+1}{-1}~\brname{+1}{0}{-1}{0}{0}{0}{+1}{-1}}
746 \label{fig:simplex_heist}
747 \end{subfigure}\hfill
748 \begin{subfigure}[t]{0.24\linewidth}
749 \polytope[width=\linewidth]{+1}{+1}{-1}{-1}{0}{0}{0}{0}
750 \vspace{-1.5em}
751 \caption{\footnotesize\brname{+1}{+1}{-1}{-1}{0}{0}{0}{0}~\brgraph{+1}{+1}{-1}{-1}{0}{0}{0}{0}}
752 \label{fig:simplex_ignoreance}
753 \end{subfigure}
754
755 \begin{subfigure}[t]{0.24\linewidth}
756 \polytope[width=\linewidth]{+1}{-1}{-1}{+1}{0}{0}{0}{0}
757 \vspace{-1.5em}
758 \caption{\footnotesize\brgraph{+1}{-1}{-1}{+1}{0}{0}{0}{0}~\brname{+1}{-1}{-1}{+1}{0}{0}{0}{0}}
759 \label{fig:simplex_horseplay}
760 \end{subfigure}\hfill
761 \begin{subfigure}[t]{0.24\linewidth}
762 \polytope[width=\linewidth]{+1}{0}{-1}{0}{0}{0}{0}{0}
763 \vspace{-1.5em}
764 \caption{\footnotesize\brgraph{+1}{0}{-1}{0}{0}{0}{0}{0}~\brname{+1}{0}{-1}{0}{0}{0}{0}{0}}
765 \label{fig:simplex_dress}
766 \end{subfigure}\hfill
767 \begin{subfigure}[t]{0.24\linewidth}
768 \polytope[width=\linewidth]{0}{0}{0}{0}{0}{0}{0}{0}
769 \vspace{-1.5em}
770 \caption{\footnotesize\brgraph{0}{0}{0}{0}{0}{0}{0}{0}~\brname{0}{0}{0}{0}{0}{0}{0}{0}}
771 \label{fig:simplex_zero}
772 \end{subfigure}\hfill
773 \hspace{0.24\linewidth}
774
775 \caption{Equilibrium polytopes of the canonical games introduced by \cite{marris2023_equilibrium_invariant_embedding_2x2_arxiv}. The black lines represent edges of the joint probability simplex. The solid purple lines represent the edges of the (C)CE polytope. The dashed blue lines represent a continuum of NE. Points with respective colours represent (C)CE and NE point solutions.}
776 \label{fig:polytopes}
777 \end{figure}
778
779
780 \subsection{Embeddings}
781
782 The equilibrium-invariant embeddings introduced by \cite{marris2023_equilibrium_invariant_embedding_2x2_arxiv} can be visualized using the \verb!\nontrivialembedding[...]! command.
783
784 \begin{table}[t]
785 \centering
786 \footnotesize
787 \begin{tabular}{lll}
788 Keyword Argument & Description & Default \\ \hline
789 width & Width of plot & \verb!\linewidth! \\
790 image & File path to background image & empty \\
791 matrix & File path to background matrix data & empty \\
792 points & File path to background points data & empty \\
793 axis color & & black \\
794 partial trivial & & false \\
795 symmetric strategies & & false \\
796 symmetric players & & false \\\
797 no class boundaries & Suppress class boundaries & false\\
798 no equilibrium boundaries & Suppress equilibrium boundaries & false\\
799 no best-response graphs & Suppress false best-response graphs & false \\
800 best-response graph color & & black\\
801 best-response graph font size & & \verb!\scriptsize! \\
802 no best-response names & Suppress best-response names & false \\
803 best-response name orientation & & -90 \\
804 best-response name distance & & -0.1em \\
805 best-response name color & & black!70 \\
806 best-response name font size & & \verb!\tiny! \\
807 no axes labels & Suppress axes labels & false \\
808 no tick labels & Suppress tick labels & false \\
809 \end{tabular}
810 \cprotect\caption{\verb!embedding[...]! command parameterization.}
811 \label{tab:embedding_command_args}
812 \end{table}
813
814 \begin{figure}[t]
815 \nontrivialembedding[no axes labels,no tick labels]
816 \caption{Embeddings plot.}
817 \end{figure}
818
819 \begin{figure}
820 \centering
821 \begin{subfigure}[t]{0.49\linewidth}
822 \nontrivialembedding[matrix=doc_data/embedding/heatmap.dat,no axes labels,no tick labels,no best-response names]
823 \caption{Heatmap. Data from \cite{liu2024_nfgtransformer}.}
824 \end{subfigure}\hfill
825 \begin{subfigure}[t]{0.49\linewidth}
826 \nontrivialembedding[points=doc_data/embedding/points.dat,no axes labels,no tick labels,no best-response names]
827 \caption{Points}
828 \end{subfigure}
829
830 \caption{Embedding plots with different backgrounds.}
831 \label{fig:embedding}
832 \end{figure}
833
834 \begin{figure*}[!t]
835 \centering
836
837 \begin{subfigure}[b]{0.49\linewidth}
838 \centering
839 \nontrivialembedding[width=1.0\linewidth,no axes labels,no tick labels,no best-response names]
840 \vspace{-1.0em}
841 \caption{Embedding}
842 \label{fig:example_embedding}
843 \end{subfigure}\hfill
844 \begin{subfigure}[b]{0.49\linewidth}
845 \centering
846 \nontrivialembedding[width=1.0\linewidth,no axes labels,no tick labels,no best-response names]
847 \vspace{-1.0em}
848 \caption{Non-trivial Embedding}
849 \label{fig:example_nontrivial_embedding}
850 \end{subfigure}
851
852 \begin{subfigure}[b]{0.49\linewidth}
853 \centering
854 \nontrivialembedding[width=1.0\linewidth,no axes labels,no tick labels,no best-response names]
855 \vspace{-1.0em}
856 \caption{Symmetric Embedding}
857 \label{fig:example_symmetric_embedding}
858 \end{subfigure}\hfill
859 \begin{subfigure}[b]{0.49\linewidth}
860 \centering
861 \nontrivialembedding[width=1.0\linewidth,no axes labels,no tick labels,no best-response names]
862 \vspace{-1.0em}
863 \caption{Zero-Sum Embedding}
864 \label{fig:example_zero_sum_embedding}
865 \end{subfigure}
866
867 \caption{Embedding Visualizations.}
868 \label{fig:embedding_visualizations}
869 \end{figure*}
870
871
872 \section{Tips and Tricks}
873
874 \paragraph{Slow Builds or Out of Memory Errors}
875
876 Some of the figures created by this package can take time to compile, and may slow down compile times for your project. Consider using the externalize command of TikZ/PFGplots to mitigate this issue:
877
878 \begin{verbatim}
879 \usepackage{tikz}
880 \usetikzlibrary{external}
881 \tikzexternalize[prefix=cache/, up to date check=md5]
882 \end{verbatim}
883
884 This will sequentially build each each TikZ picture individually and cache it. Subsequent project builds will use the cache rather than rebuild the picture each time. When modifying commands, it may be necessary to clear the cache to regenerate the pictures. Some setups may require manually making the cache directory and adding a dummy file in that directory. This process may be slower on the first build run. If your build times out trying again may work (because it will reuse the pictures that were cached on the first run).
885
886 \section{Acknowledgements}
887
888 Thank you to Ian Gemp, Georgios Piliouras, and Siqi Liu for their helpful feedback.
889
890 \bibliography{twoxtwogame_bibtex}
891
892 \end{document}