-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exercises to text book and clean up pdf output. (#226)
* Add exercises to docs and clean up pdf output. * Run black.
- Loading branch information
1 parent
64ae181
commit fbb567a
Showing
68 changed files
with
827 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,10 @@ build/ | |
env/ | ||
.tox/ | ||
*.DS_Store | ||
*.aux | ||
*.log | ||
*.fdb_latexmk | ||
*.fls | ||
*.xdv | ||
env* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...rm-game-example-with-perfect-information_one_step_backwards_induction/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Source files for an image used in the description of extensive form games. | ||
|
||
Compilation instructions: | ||
|
||
``` | ||
$ latexmk --xelatex main.tex | ||
$ convert -density 300 main.pdf -quality 90 main.png | ||
``` |
Binary file added
BIN
+9.35 KB
...xtensive-form-game-example-with-perfect-information_one_step_backwards_induction/main.pdf
Binary file not shown.
Binary file added
BIN
+8.89 KB
...orm-game-example-with-perfect-information_one_step_backwards_induction/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
...xtensive-form-game-example-with-perfect-information_one_step_backwards_induction/main.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
\documentclass{standalone} | ||
|
||
\usepackage{tikz} | ||
\usetikzlibrary{calc} | ||
|
||
\begin{document} | ||
|
||
\begin{tikzpicture} | ||
\node [draw, color=red] (A1) at (0, 0) {\(A_1\)}; | ||
\node [draw, color=blue] (B1) at ($(A1) + (-2.5, -2)$) {\(B_1\)}; | ||
\node [draw] (O1) at ($(B1) + (-1, -2)$) {\tiny{\(O_1\)}}; | ||
\node (SS) at ($(O1) + (0, -.5)$) {\((4, 1)\)}; | ||
\node [draw] (O2) at ($(B1) + (1, -2)$) {\tiny{\(O_2\)}}; | ||
\node (SC) at ($(O2) + (0, -.5)$) {\((3, 5)\)}; | ||
\node [draw, color=blue] (B2) at ($(A1) + (2.5, -2)$) {\(B_2\)}; | ||
\node [draw] (O3) at ($(B2) + (-1, -2)$) {\tiny{\(O_3\)}}; | ||
\node (CS) at ($(O3) + (0, -.5)$) {\((4, 2)\)}; | ||
\node [draw] (O5) at ($(B2) + (1, -2)$) {\tiny{\(O_5\)}}; | ||
\node (CC) at ($(O5) + (0, -.5)$) {\((2, 0)\)}; | ||
|
||
\draw (A1) -- node[left=3mm] {X} (B1); | ||
\draw (A1) -- node[right=3mm] {W} (B2); | ||
\draw (B1) -- node[left=3mm] {a} (O1); | ||
\draw (B1) -- node[right=3mm] {b} (O2); | ||
\draw (B2) -- node[left=3mm] {c} (O3); | ||
\draw (B2) -- node[right=3mm] {d} (O5); | ||
\end{tikzpicture} | ||
|
||
\end{document} |
8 changes: 8 additions & 0 deletions
8
...game-example-with-perfect-information_three_steps_backwards_induction/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Source files for an image used in the description of extensive form games. | ||
|
||
Compilation instructions: | ||
|
||
``` | ||
$ latexmk --xelatex main.tex | ||
$ convert -density 300 main.pdf -quality 90 main.png | ||
``` |
Binary file added
BIN
+7.85 KB
...nsive-form-game-example-with-perfect-information_three_steps_backwards_induction/main.pdf
Binary file not shown.
Binary file added
BIN
+4.25 KB
...-game-example-with-perfect-information_three_steps_backwards_induction/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
...nsive-form-game-example-with-perfect-information_three_steps_backwards_induction/main.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
\documentclass{standalone} | ||
|
||
\usepackage{tikz} | ||
\usetikzlibrary{calc} | ||
|
||
\begin{document} | ||
|
||
\begin{tikzpicture} | ||
\node [draw, color=red] (A1) at (0, 0) {\(A_1\)}; | ||
\node [draw] (O2) at ($(A1) + (-2.5, -2)$) {\tiny{\(O_2\)}}; | ||
\node (SC) at ($(O2) + (0, -.5)$) {\((3, 5)\)}; | ||
\node [draw] (O3) at ($(A1) + (2.5, -2)$) {\tiny{\(O_3\)}}; | ||
\node (CS) at ($(O3) + (0, -.5)$) {\((4, 2)\)}; | ||
|
||
\draw (A1) -- node[left=3mm] {X} (O2); | ||
\draw (A1) -- node[right=3mm] {W} (O3); | ||
\end{tikzpicture} | ||
|
||
\end{document} |
8 changes: 8 additions & 0 deletions
8
...m-game-example-with-perfect-information_two_steps_backwards_induction/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Source files for an image used in the description of extensive form games. | ||
|
||
Compilation instructions: | ||
|
||
``` | ||
$ latexmk --xelatex main.tex | ||
$ convert -density 300 main.pdf -quality 90 main.png | ||
``` |
Binary file added
BIN
+8.66 KB
...tensive-form-game-example-with-perfect-information_two_steps_backwards_induction/main.pdf
Binary file not shown.
Binary file added
BIN
+7.08 KB
...rm-game-example-with-perfect-information_two_steps_backwards_induction/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
...tensive-form-game-example-with-perfect-information_two_steps_backwards_induction/main.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
\documentclass{standalone} | ||
|
||
\usepackage{tikz} | ||
\usetikzlibrary{calc} | ||
|
||
\begin{document} | ||
|
||
\begin{tikzpicture} | ||
\node [draw, color=red] (A1) at (0, 0) {\(A_1\)}; | ||
\node [draw, color=blue] (B1) at ($(A1) + (-2.5, -2)$) {\(B_1\)}; | ||
\node [draw] (O1) at ($(B1) + (-1, -2)$) {\tiny{\(O_1\)}}; | ||
\node (SS) at ($(O1) + (0, -.5)$) {\((4, 1)\)}; | ||
\node [draw] (O2) at ($(B1) + (1, -2)$) {\tiny{\(O_2\)}}; | ||
\node (SC) at ($(O2) + (0, -.5)$) {\((3, 5)\)}; | ||
\node [draw] (O3) at ($(A1) + (2.5, -2)$) {\tiny{\(O_3\)}}; | ||
\node (CS) at ($(O3) + (0, -.5)$) {\((4, 2)\)}; | ||
|
||
\draw (A1) -- node[left=3mm] {X} (B1); | ||
\draw (A1) -- node[right=3mm] {W} (O3); | ||
\draw (B1) -- node[left=3mm] {a} (O1); | ||
\draw (B1) -- node[right=3mm] {b} (O2); | ||
\end{tikzpicture} | ||
|
||
\end{document} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
docs/_static/discussion/extensive-form-game-exercise-four/main.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
\documentclass[tikz]{standalone} | ||
\usepackage{tikz,amsmath} | ||
\begin{document} | ||
\tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3.5cm] | ||
\tikzstyle{level 2}=[level distance=3.5cm, sibling distance=2cm] | ||
\tikzstyle{player} = [text width=5em, draw, text centered, rectangle, fill=blue!20, inner sep=1pt] | ||
\tikzstyle{nature} = [minimum width=3pt,circle, draw, fill=red!20, inner sep=1pt] | ||
\tikzstyle{end} = [circle, minimum width=3pt, fill, inner sep=0pt, right] | ||
\begin{tikzpicture}[grow=right, sloped] | ||
\node[player]{a: 1} | ||
child {node (C2) [player] {b: 1} | ||
child {node[end] {} node[right] {$(3,2)$} edge from parent node[below] {A}} | ||
child {node[end] {} node[right] {$(1,1)$} edge from parent node[below] {B}} edge from parent node[below] {A}} | ||
child {node (1stC) (C1) [player] {c: 2} | ||
child {node[end] {} node[right] {$(0,0)$} edge from parent node[below] {A}} | ||
child {node[end] {} node[right] {$(4,0)$} edge from parent node[below] {B}} | ||
child {node[end] {} node[right] {$(2,3)$} edge from parent node[below] {C}} edge from parent node[below] {B}}; | ||
\end{tikzpicture} | ||
\end{document} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
docs/_static/discussion/extensive-form-game-exercise-one/main.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
\documentclass[tikz]{standalone} | ||
\usepackage{tikz,amsmath} | ||
\begin{document} | ||
\tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3.5cm] | ||
\tikzstyle{level 2}=[level distance=3.5cm, sibling distance=2cm] | ||
\tikzstyle{player} = [text width=5em, draw, text centered, rectangle, fill=blue!20, inner sep=1pt] | ||
\tikzstyle{nature} = [minimum width=3pt,circle, draw, fill=red!20, inner sep=1pt] | ||
\tikzstyle{end} = [circle, minimum width=3pt, fill, inner sep=0pt, right] | ||
\begin{tikzpicture}[grow=right, sloped] | ||
\node[player]{a: 1} | ||
child {node[player] {b: 2} | ||
child {node[player] {c: 1} | ||
child {node[player] {d: 2} | ||
child {node[player] {e: 1} | ||
child {node[end] {} node [right] {$(2,17)$} edge from parent node[below] {W}} | ||
child {node[end] {} node [right] {$(6,4)$} edge from parent node[below] {Y}} | ||
edge from parent node[below] {J} | ||
} | ||
child {node[end] {} node [right] {$(7,30)$} edge from parent node[below] {X}} | ||
edge from parent node[below] {F}} | ||
child {node[end] {} node [right] {$(70,3)$} edge from parent node[below] {Z}} | ||
edge from parent node[below] {D} | ||
edge from parent node[below] {D}} | ||
child {node[end] {} node [right] {$(1,6)$} | ||
edge from parent node[below] {C}} | ||
edge from parent node[below] {B}} | ||
child {node[end] {} node [right] {$(3,2)$} edge from parent node[below] {A}}; | ||
\end{tikzpicture} | ||
\end{document} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
docs/_static/discussion/extensive-form-game-exercise-three/main.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
\documentclass[tikz]{standalone} | ||
\usepackage{tikz,amsmath} | ||
\begin{document} | ||
\tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3.5cm] | ||
\tikzstyle{level 2}=[level distance=3.5cm, sibling distance=1cm] | ||
\tikzstyle{player} = [text width=5em, draw, text centered, rectangle, fill=blue!20, inner sep=1pt] | ||
\tikzstyle{nature} = [minimum width=3pt,circle, draw, fill=red!20, inner sep=1pt] | ||
\tikzstyle{end} = [circle, minimum width=3pt, fill, inner sep=0pt, right] | ||
\begin{tikzpicture}[grow=right, sloped] | ||
\node[player]{a: 1} | ||
child {node (C2) [player] {b: 2} | ||
child {node[end] {} node[right] {$(3,2,1)$} edge from parent node[below] {B}} | ||
child {node (C3)[player] {e: 3} | ||
child {node [end] {} node[right] {$(60,1,53)$} | ||
edge from parent node[below] {B}} | ||
child {node [end] {} node[right] {$(6,0,2)$} | ||
edge from parent node[below] {A}} | ||
edge from parent node[below] {A} | ||
} | ||
edge from parent node[below] {B}} | ||
child {node (1stC) (C1) [player] {c: 2} | ||
child {node (C4) [player] {d: 3} | ||
child {node [end] {} node[right] {$(20,50,80)$} | ||
edge from parent node[below] {B}} | ||
child {node [end] {} node[right] {$(30,40,50)$} | ||
edge from parent node[below] {A}} | ||
edge from parent node[below] {B} | ||
} | ||
child {node[end] {} node[right] {$(4,0,3)$} edge from parent node[below] {A}} | ||
edge from parent node[below] {A}}; | ||
\draw [dashed] (C2) -- (C1); | ||
\draw [dashed] (C3) -- (C4); | ||
\end{tikzpicture} | ||
\end{document} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions
31
docs/_static/discussion/extensive-form-game-exercise-two/main.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
\documentclass[tikz]{standalone} | ||
\usepackage{tikz,amsmath} | ||
\begin{document} | ||
\tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3.5cm] | ||
\tikzstyle{level 2}=[level distance=3.5cm, sibling distance=2cm] | ||
\tikzstyle{level 3}=[level distance=3.5cm, sibling distance=1cm] | ||
\tikzstyle{player} = [text width=5em, draw, text centered, rectangle, fill=blue!20, inner sep=1pt] | ||
\tikzstyle{nature} = [minimum width=3pt,circle, draw, fill=red!20, inner sep=1pt] | ||
\tikzstyle{end} = [circle, minimum width=3pt, fill, inner sep=0pt, right] | ||
\begin{tikzpicture}[grow=right, sloped] | ||
\node[player]{a: 1} | ||
child {node[player] {c: 2} | ||
child {node[player] {g: 1} | ||
child{node[end] {} node[right]{$(3,2)$} edge from parent node[below]{K}} | ||
child{node [end] {} node[right]{$(6,7)$} edge from parent node[below]{L}}edge from parent node[below] {B}} | ||
child {node[player] {f: 1} | ||
child{node[end] {} node[right]{$(1,3)$} edge from parent node[below]{K}} | ||
child{node [end] {} node[right]{$(5,10)$} edge from parent node[below]{L}}edge from parent node[below] {A}} | ||
edge from parent node[below] {W}} | ||
child {node[player] {b: 2} | ||
child {node[player] {e: 1} | ||
child {node[end] {} node [right] {$(2,3)$} edge from parent node[below] {Y}} | ||
child {node[end] {} node [right] {$(1,2)$} edge from parent node[below] {Z}} | ||
edge from parent node[below] {C}} | ||
child {node [player] {d: 1} | ||
child{node[end] {} node [right] {$(10,1)$} edge from parent node[below] {M}} | ||
child{node[end] {} node [right] {$(5,2)$} edge from parent node[below] {N}} | ||
edge from parent node[below] {D}} | ||
edge from parent node[below] {Y}}; | ||
\end{tikzpicture} | ||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 2 additions & 18 deletions
20
docs/text-book/degenerate-games.rst → docs/how-to/handle-degenerate-games.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.