Drawing Game Trees With Tikz: Department of Economics, Simon Fraser University January 7, 2013
Drawing Game Trees With Tikz: Department of Economics, Simon Fraser University January 7, 2013
Haiyun K. Chen∗
Department of Economics, Simon Fraser University
January 7, 2013
Abstract
Game trees, also known as extensive form games, are commonly used to represent
situations of strategic interactions. This document provides examples on how to
produce nice looking game trees in LATEX with the TikZ package.1
Contents
1 Preliminaries 2
Page 1 of 28
3 Examples 14
3.1 A 2 × 2 Tree with Information Set . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2 Asymmetric Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3 Sequential-Move Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4 Market Entry Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.5 Large Information Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.6 Centipede Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.7 Curved Information Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.8 Colored and Hybrid Game Tree . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1 Preliminaries
The TikZ package, which comes with standard LATEX distributions. In the preamble, load
the package with:
\usepackage{tikz}
It will be helpful also to use the calc library in TikZ for calculations of coordinates:
\usetikzlibrary{calc}
\usepackage[dvipsnames]{xcolor}
\begin{tikzpicture}[options]
\command_name [options] ... ; % This is a ‘path’ in TikZ.
\end{tikzpicture}
2 See the TikZ & PGF Manual for detail.
Page 2 of 28
A typical path in TikZ generally starts with \command_name, and ends with a semicolon
(;). It is permissible to have multiple commands (or operations, as they are called in the
manual) within a given path. Note, however, for the nested commands (e.g. the second
to fourth node{} command in Figure 1), the “\” sign must be omitted.
root \begin{tikzpicture}
\node(0){root}
child{node{child 1}}
child{node{child 2}
child 1 child 2 child{node{grandchild 1}}
child{node{grandchild 2}}
};
grandchild 1 grandchild 2 \end{tikzpicture}
The coordinate labels and drawing/style options are optional; at(coordinate) is also optional
and allows one to put the node at a specific position; node texts can be omitted, but the
braces {} are required. The coordinate label makes it easy to refer to the position of the
node in later drawing, e.g. to add payoff vectors or information sets. The coordinate label
can also be used to refer to the children of the node. For example, the root node in
Figure 1 is labeled “0”, and so the coordinate of child 1 can be referred to as (0-1), and
that of grandchild 1 can be referred to as (0-2-1).
The command child{} is used to specify a successor of a (parent) node. In Figure 1,
the first two child commands specify the successors of the root node, and the last two
specify the successors of child 2 (hence the grandchildren of the root node). Inside the
child{} command is usually another node{}, which determines the style of the child
node, and edge from parent, which governs the style of the branch that connects the
3 To draw other general trees with TikZ, see Section 18: Making Trees Grow of the manual.
Page 3 of 28
child to its parent. Note that if the style of a particular branch needs to be modified,
such as adding texts to the branch or changing its color, edge from parent must be put
after node{} and all of its children.
\tikzset{
style name 1/.style={style options}
style name 2/.style={style options}
}
Both of these commands can be used outside the tikzpicture environment, and so they
need not be suffixed with a semicolon (;). Also, if a TikZ style is going to be repeatedly
used throughout the same document, it can be set using \tikzset in the preamble. The
following example shows how this is implemented.
\begin{tikzpicture}
\tikzstyle{hollow node}=[circle,draw,inner sep=1.5]
\tikzstyle{solid node}=[circle,draw,inner sep=1.5,fill=black]
\tikzset{
red node/.style={circle,draw=red,fill=red,inner sep=1.2},
blue node/.style={rectangle,draw=blue,inner sep=2.5}
}
\node[hollow node]{}
child{node[solid node]{}}
child{node[red node]{}}
child{node[blue node]{}}
;
\end{tikzpicture}
4 Forexample, Mas-Colell, Whinston, and Green (1995, henceforth MWG) and Osborne and Rubinstein
(1994) use the hollow circle to indicate the initial node, while non-initial nodes are denoted by solid circles.
Page 4 of 28
In the code, circle (and rectangle) specifies the shape of a node; draw=color asks TikZ
to draw the boundary of the node with color;5 inner sep=parameter determines—for the
purpose of this article—the size of the node; 6 and fill=color fills the interior of a node
with color.
The coordinates can be referred to using coordinate labels of the node{} command; path
operation allows us to draw, for example, straight lines and curves from one coordinate
to the next (with the operation to), or rectangles with two diagonal angles at coordinate_1
and coordinate_2 (with the rectangle operation). In the following examples, let the initial
node be labeled “0”, so that the coordinate of its ith child (from the left) can be referred
to as (0-i). Here is a simple dash-line information set:
\draw[dashed](0-1)to(0-2)to(0-3);
\draw[dashed,bend right](0-1)to(0-3);
To have more flexible curvature, use the [out=angle,in=angle] option to specify the de-
grees at which the line starts and ends:
5 The default color is black, when color is not specified.
6 Infact, inner sep specifies the space between the texts within a node and its boundary. In the
examples presented in this article, most nodes within a tree will not have textual content. Therefore
inner sep is primarily used to determine the node sizes.
Page 5 of 28
\draw[dashed,out=45,in=300](0-1)to(0-3);
\draw[dashed,draw=red,line width=2pt]
(0-1)to(0-2)to[out=45,in=300](0-3);
Drawing a “circled” information set is more involved. The idea is to draw a rectangle
(with rounded corners) that encloses the nodes in the same information set. In the \draw
command, we use rectangle as the path operation. Suppose there are two nodes, left and
right, in an information set, with coordinate labels (0-1) and (0-2), respectively. We
want the northwest corner of the rectangle placed above and to the left of the left node,
and the southeast corner placed below and to the right of the right node. 7 The positions
of the northwest and southeast corners, to be used as coordinate_1 and coordinate_2 in
the \draw syntax, are relative to the positions of the two nodes. Hence, they can be
calculated as relative coordinates to (0-1) and (0-2).
The calc library provides a method for calculating relative coordinates. Suppose the
position ( a1 , a2 ) of a coordinate labeled (A) is known. Then the coordinate ( a1 + x, a2 + y)
is given by the syntax: ($(A)+(x,y)$), where x and y are any real numbers.
Therefore, a circled information set can be drawn as follows:
\draw[dashed,rounded corners=7]
($(0-1)+(-.25,.25)$)rectangle($(0-2)+(.25,-.25)$);
Here, the rounded corners=parameter determines how “rounded” the corner is. 8 Other
drawing options can be added as usual.
Sometimes we may want to circle a single node, e.g. node 0 in Figure 2, to indicate
that it is a singleton (or trivial) information set. This is more easily done using circle as
7 Alternatively,we could have the southwest corner of the rectangle positioned below and to the left of
the left node, and the northeast corner above and to the right of the right node.
8 Depending on the size of the rectangle, the parameter value may have to be manually adjusted.
Page 6 of 28
the path operation for the \draw command. When drawing a circle, coordinate_1 indicates
the center of the circle and coordinate_2 specifies its radius:
\draw[dashed](0)circle(.25cm);
\draw[dashed,rounded corners=7]
($(0-1)+(-.25,.25)$)rectangle($(0-2)+(.25,-.25)$);
The position parameter can take either string values such as above, left, right, below,
above right, above left, below right, below left, or numeric values indicating the
angle (relative to the center of the node) at which the label should be placed. Take
Figure 2 as an example. Suppose we want to specify movers at the two information sets,
with Nature moving at the top one and Bob moving at the bottom one.
To position the text “Nature” above the initial node, it is much easier to use the label
option:
Nature
\node(0)[hollow node,label=above:{Nature}]{}
child{node[solid node]{}}
child{node[solid node]{}}
;
The text “Bob” should be placed in the circle, centered between the two solid nodes.
But since there is no node defined at that position, we cannot use the label option
again. Instead, we will have to use the node{} command. Adding texts with the node{}
command is usually done after the tree is drawn and all its nodes properly labeled.
To put texts in a particular position, we can use the at(coordinate) option. While we
don’t know the exact coordinate where “Bob” needs to be placed, we know that it is
the midpoint between (0-1) and (0-2). Here the calc library proves handy again. If
we want to refer to the coordinate half of the way from (0-1) to (0-2), we simply use
Page 7 of 28
($(0-1)!.5!(0-2)$).9 As an aside, we can also see how “Nature” can be added using
node{}:
\node(0)[hollow node]{}
Nature
child{node[solid node]{}}
child{node[solid node]{}}
;
Bob \node[above]at(0){Nature};
\node at($(0-1)!.5!(0-2)$){Bob};
Notice that the option [above] is given to indicate that “Nature” is above point (0).
Other position options are similar to those used in the label option. Two very useful
position options are worth mentioning: xshift=parameter and yshift=parameter. These
options allows one to shift the node position horizontally and vertically by any unit, and
so are particularly useful when fine-tuning the figure.
Other texts such as payoff vectors can be added similarly. The next subsection goes
over how to format and to add texts to the branches.
Page 8 of 28
missing
` d
branch
\node(0)[hollow node]{}
child{node[solid node]{} edge from parent[red] node[left,xshift=-5]{$\ell$}}
child{node[solid node]{} edge from parent[draw=none] node[align=center]{missing\\branch}}
child{node[solid node]{} edge from parent[->,>=latex,dashed,thick] node[xshift=8]{$d$}}
child{node[solid node]{} edge from parent[<-o,blue,very thick]}
;
Often the style of the branches are uniform throughout the whole tree. Therefore, the
branch styles can be set at the beginning of the tikzpicture environment with
Note that unless you don’t want the branches to be drawn, you should always put draw
as one of the options to edge from parent.12
\node(0)[hollow node]{}
Nature
child{node[solid node]{}}
child{node[solid node]{}}
;
Alexander \node[above]at(0){Nature};
\node at($(0-1)!.5!(0-2)$){Alexander};
But the problem is that “Alexander” is too long a word to fit between the two solid
nodes. The solution: widen the distance between the two nodes! There are several ways
to do this using the [sibling distance=parameter] option.13
12 Incase you do want certain branches not to be drawn, you can simply pass the option [missing] to
the child command, instead of fiddling with edge from parent, which has more typing.
13 The default value for sibling distance is 15 mm.
Page 9 of 28
Method 1. Give the [sibling distance=parameter] option to each child{}:
\node(0)[hollow node]{}
Nature
child[sibling distance=25mm]{node[solid node]{}}
child[sibling distance=25mm]{node[solid node]{}}
;
Alexander \node[above]at(0){Nature};
\node at($(0-1)!.5!(0-2)$){Alexander};
A level style applies to all nodes in a particular level. Using the language in Figure 1,
all children of the root node are level 1 nodes, and all grandchildren are level 2 nodes.
Using the third method is, personally speaking, preferred, as it maintains a uniformity
of style across all nodes in the same level. Moreover, one can always override the level
style by giving options to any particular child{}, as exemplified in Method 1.
In addition to sibling distance, one can also specify level distance in a similar
manner.14
14 The default for level distance is also 15 mm.
Page 10 of 28
2.8 Miscellaneous Issues
2.8.1 Directions of “Growth”
One may, on occasion, find the need to make a game tree, or certain branches of the
tree, grow in other directions than downwards, such as in the Bayesian games or in
a centipede game. To make a particular branch grow in a certain direction, give the
option [grow=direction parameter] to the child{} to which that branch leads. The direction
parameter can take either numeric values from −360 to 360, indicating the angle towards
which the tree grows, or text strings such as up, down, left, right, north, south west,
north east, etc. For example,
\node(0)[hollow node]{}
child[grow=left]{node[solid node]{}}
child[grow=260]{node[solid node]{}}
child[grow=south east]{node[solid node]{}}
;
If, on the other hand, we want to whole tree to grow in a certain direction, then the
[grow=direction parameter] option can be put before the first child{}, as in Method 2:
\node[hollow node]{}
[grow=north west]
child{node[solid node]{}}
child{node[solid node]{}}
child{node[solid node]{}}
;
If the texts in a game tree, for example the payoffs, exhibit some regular pattern, we can
simplify the inputting process using loops. TikZ offers the \foreach loop:
Suppose we want to enter the payoff vectors below the six solid nodes in the following
tree:
Page 11 of 28
We know that if we call the hollow node (0), which we have been so far, then the solid
nodes can be referred to as (0-i) where i is the ith child of (0) from the left. Suppose
the payoff vectors are of the form ( ai , bi ) for the ith node. Then, instead of typing the
node{} command or the [label] option six times, we can use
to produce
( a1 , b1 ) ( a2 , b2 ) ( a3 , b3 ) ( a4 , b4 ) ( a5 , b5 ) ( a6 , b6 )
TikZ is very smart in figuring out the patterns in the {set of index values}, so we usu-
ally don’t need to spell out each individual index value. For instance, if we want TikZ
to perform an operation for all even numbers between 0 and 20, we need simply say
\foreach \x in {0,2,...,20} ...;. This of course works with decimals as well.
Suppose the payoff vectors are (1, 2), (3, 4), . . . , (11, 12) for the first to the sixth solid
nodes. We could, as before, ask TikZ to enter (2i − 1, 2i ) after each solid node i. TikZ is
equipped with a mathematical engine that enables this kind of calculations. 15 The two
commands we will be using in this case are \pgfmathsetmacro and \pgfmathprintnumber:
\pgfmathsetmacro\macro_name{math expression}
\pgfmathprintnumber{\macro_name}
The first command evaluates math expression and stores the result in \macro_name, and
the second command prints the result:
15 Infact, it is PGF, the back end program for TikZ, that makes this evaluation of mathematical ex-
pressions possible. The relationship between TikZ and PGF is similar to the one between LATEX and TEX.
Page 12 of 28
Alternatively, we can use the counter function in LATEX to accomplish the same goal:
The first line of the code initiates a new counter called payoff.16 In the fourth line,
\stepcounter{payoff} increases the counter payoff by one, and \arabic{payoff} prints
the counter value in Arabic numerals. Instead of numbers, one could also use \alph{}
or \Alph{} to print lower- and upper-case latin alphabets:
16 Theinitial value of all new counters is automatically set to zero. To change this initial value to some
other value, use \setcounter{counter_name}{new_value}.
Page 13 of 28
3 Examples
P1
A B
P2
C D C D
( a, b) (c, d) (e, f ) ( g, h)
\begin{tikzpicture}[scale=1.5,font=\footnotesize]
% Specify spacing for each level of the tree
\tikzstyle{level 1}=[level distance=15mm,sibling distance=35mm]
\tikzstyle{level 2}=[level distance=15mm,sibling distance=15mm]
% The Tree
\node(0)[solid node,label=above:{$P1$}]{}
child{node(1)[solid node]{}
child{node[hollow node,label=below:{$(a,b)$}]{} edge from parent node[left]{$C$}}
child{node[hollow node,label=below:{$(c,d)$}]{} edge from parent node[right]{$D$}}
edge from parent node[left,xshift=-3]{$A$}
}
child{node(2)[solid node]{}
child{node[hollow node,label=below:{$(e,f)$}]{} edge from parent node[left]{$C$}}
child{node[hollow node,label=below:{$(g,h)$}]{} edge from parent node[right]{$D$}}
edge from parent node[right,xshift=3]{$B$}
};
Page 14 of 28
% information set
\draw[dashed,rounded corners=10]($(1) + (-.2,.25)$)rectangle($(2) +(.2,-.25)$);
% specify mover at 2nd information set
\node at ($(1)!.5!(2)$) {$P2$};
\end{tikzpicture}
2. A TikZ picture can be scaled by giving the option scale=factor to the tikzpicture
environment.
3. Fonts within a TikZ picture can be changed using the font={attribute 1, attribute
2, ...} option. When there is only one attribute, the braces {} are not required.
Page 15 of 28
3.2 Asymmetric Tree
P1
A B
P2 P2
C D E F G
\node(0)[solid node,label=above:{$P1$}]{}
child{node[solid node,label=above left:{$P2$}]{}
child{node[hollow node,label=below:{$(1,2)$}]{} edge from parent node[left]{$C$}}
child{node[hollow node,label=below:{$(1,-1)$}]{} edge from parent node[left]{$D$}}
child{node[hollow node,label=below:{$(0,2)$}]{} edge from parent node[right]{$E$}}
edge from parent node[left,xshift=-5]{$A$}
}
child{node[solid node,label=above right:{$P2$}]{}
child{node[hollow node,label=below:{$(2,2)$}]{} edge from parent node[left]{$F$}}
child{node[hollow node,label=below:{$(1,3)$}]{} edge from parent node[right]{$G$}}
edge from parent node[right,xshift=5]{$B$}
};
\end{tikzpicture}
Page 16 of 28
3.3 Sequential-Move Game
P1 C
( p, q)
A
P2 B
D E
P2
P1
F G F G H I J
Page 17 of 28
child[missing]
child[level distance=30mm,sibling distance=25mm]{node[solid node]{}
[every child/.style={sibling distance=11mm}]
child{node[hollow node]{}edge from parent node[left]{$H$}}
child{node[hollow node]{}edge from parent node[left]{$I$}}
child{node[hollow node]{}edge from parent node[right]{$J$}}
edge from parent node[above right]{$B$}
}
child[grow=right,level distance=30mm]{node[hollow node]{}
edge from parent node[above]{$C$}
};
% information set
\draw[dashed,rounded corners=7]($(1-1)+(-.2,.25)$)rectangle($(1-2)+(.2,-.25)$);
% specify movers
\node[above]at(0){$P1$};
\node at ($.5*(1-1)+.5*(1-2)$) {$P1$};
\node[above left]at(1){$P2$};
\node[above right]at(0-3){$P2$};
% payoffs
\payoff{1-1-1}ab
\payoff{1-1-2}cd
\payoff{1-2-1}ef
\payoff{1-2-2}gh
\payoff{0-3-1}ij
\payoff{0-3-2}k{\ell}
\payoff{0-3-3}mn
\payoff[right]{0-4}pq
\end{tikzpicture}
All texts in this example are entered using the \node command after the tree is drawn.
Part of the reason for doing this is to showcase the feature that one can define LATEX
macros that cuts down on the typing.17 Since payoffs in a game tree usually involves
mathematical texts, the macro \payoff in this example saves us the trouble of having to
type, for every payoff vector, the $ signs, the parentheses (), and the comma separating
the players’ payoffs. While this may not seem like a huge reduction in typing, but as
Figure 6 shows, macros can be extremely helpful when the texts to be entered have a
certain pattern.
Page 18 of 28
3.4 Market Entry Game
Player 1
L M R
Player 2
T0
` r ` r
Player 1 Player 1
x y x y x y x y
T1 T2 T3 T4 T5 T6 T7 T8
Page 19 of 28
}
child[sibling distance=5*\tikzsiblingdistance]{node[solid node]{}
child{node[solid node]{}
child{node[solid node]{}edge from parent node[left]{$x$}}
child{node[solid node]{}edge from parent node[right]{$y$}}
edge from parent node[left]{$\ell$}
}
child{node[solid node]{}
child{node[solid node]{}edge from parent node[left]{$x$}}
child{node[solid node]{}edge from parent node[right]{$y$}}
edge from parent node[right]{$r$}
}
edge from parent node[right,xshift=15]{$R$}
};
% information sets
\draw[rounded corners=7]($(0-2)+(-.2,.25)$)rectangle($(0-3)+(.2,-.25)$);
\draw[rounded corners=7]($(0-2-1)+(-.2,.25)$)rectangle($(0-2-2)+(.2,-.25)$);
\draw[rounded corners=7]($(0-3-1)+(-.2,.25)$)rectangle($(0-3-2)+(.2,-.25)$);
% specifying movers
\draw[draw,<-,>=latex](0)--(32:8mm)node[right,inner sep=0]{Player 1};
\node at ($.5*(0-2)+.5*(0-3)$) {Player 2};
\node at ($.5*(0-2-1)+.5*(0-2-2)$) {Player 1};
\node at ($.5*(0-3-1)+.5*(0-3-2)$) {Player 1};
% specifying terminal nodes
\newcounter{tnode}
\setcounter{tnode}{0}
\term{0-1}{T_\arabic{tnode}}
\foreach \x in {2,3}
\foreach \y in {1,2}
\foreach \z in {1,2}
\stepcounter{tnode}
\term{0-\x-\y-\z}{T_\arabic{tnode}};
\end{tikzpicture}
Page 20 of 28
3.5 Large Information Set
Player 2
a b c d
Player 1
L R L R L R L R
1’s Payoff −1 +1 −1 −1 +1 +1 +1 −1
2’s Payoff +1 −1 +1 +1 −1 −1 −1 +1
Page 21 of 28
};
% information set
\draw[rounded corners=7]($(0-1)+(-.3,.25)$)rectangle($(0-4)+(.3,-.25)$);
% specifying movers
\draw[<-,>=latex](0)--(25:8mm)node[inner sep=0,right]{Player 2};
\node at($.5*(0-1)+.5*(0-4)$){Player 1};
% specifying payoffs
\node(payoff)[below]at(0-1-1){$\displaystyle\binom{-1}{+1}$};
\node[below]at(0-1-2){$\displaystyle\binom{+1}{-1}$};
\node[below]at(0-2-1){$\displaystyle\binom{-1}{+1}$};
\node[below]at(0-2-2){$\displaystyle\binom{-1}{+1}$};
\node[below]at(0-3-1){$\displaystyle\binom{+1}{-1}$};
\node[below]at(0-3-2){$\displaystyle\binom{+1}{-1}$};
\node[below]at(0-4-1){$\displaystyle\binom{+1}{-1}$};
\node[below]at(0-4-2){$\displaystyle\binom{-1}{+1}$};
\draw[<-](payoff)--+(-.9,0)node[left]
{$\displaystyle\binom{\text{$1$’s Payoff}}{\text{$2$’s Payoff}}$};
\end{tikzpicture}
Page 22 of 28
3.6 Centipede Game
1 C 2 C 1 C 2 C 1 C 2 C
6, 5
S S S S S S
1, 0 0, 2 3, 1 2, 4 5, 3 4, 6
This is a replica of Osborne & Rubinstein (1994), Fig 107.1. Codes that produce
Figure 8:
\begin{tikzpicture}[font=\footnotesize,scale=1]
% Two node styles: solid and hollow
\tikzstyle{solid node}=[circle,draw,inner sep=1.2,fill=black];
\tikzstyle{hollow node}=[circle,draw,inner sep=1.2];
% The Tree
\node(0)[hollow node]{}
child[grow=down]{node[solid node]{}edge from parent node[left]{$S$}}
child[grow=right]{node(1)[solid node]{}
child[grow=down]{node[solid node]{}edge from parent node[left]{$S$}}
child[grow=right]{node(2)[solid node]{}
child[grow=down]{node[solid node]{}edge from parent node[left]{$S$}}
child[grow=right]{node(3)[solid node]{}
child[grow=down]{node[solid node]{}edge from parent node[left]{$S$}}
child[grow=right]{node(4)[solid node]{}
child[grow=down]{node[solid node]{}edge from parent node[left]{$S$}}
child[grow=right]{node(5)[solid node]{}
child[grow=down]{node[solid node]{}edge from parent node[left]{$S$}}
child[grow=right]{node(6)[solid node]{}
edge from parent node[above]{$C$}
}
edge from parent node[above]{$C$}
}
edge from parent node[above]{$C$}
}
edge from parent node[above]{$C$}
}
edge from parent node[above]{$C$}
}
edge from parent node[above]{$C$}
};
% Movers
Page 23 of 28
\foreach \x in {0,2,4}
\node[above]at(\x){1};
\foreach \x in {1,3,5}
\node[above]at(\x){2};
% payoffs
\node[below]at(0-1){$1,0$};
\node[below]at(1-1){$0,2$};
\node[below]at(2-1){$3,1$};
\node[below]at(3-1){$2,4$};
\node[below]at(4-1){$5,3$};
\node[below]at(5-1){$4,6$};
\node[right]at(6){$6,5$};
\end{tikzpicture}
Page 24 of 28
3.7 Curved Information Set
L R
2 2
a b c d
m n s 1 t m 1 n s t
1, 0 2, 3 0, 1 −1, 0 1, 0 2, 3 0, 1 −1, 0
This is a replica of Fig 6 in Osborne’s “Manual for egameps.sty”. Codes that produce
Figure 9:
Page 25 of 28
child{node[below]{$1,0$} edge from parent node(m)[left]{$m$}}
child{node[below]{$2,3$} edge from parent node(n)[right]{$n$}}
edge from parent node[above left]{$c$}
}
child{node[solid node]{}
child{node[below]{$0,1$} edge from parent node[left]{$s$}}
child{node[below]{$-1,0$} edge from parent node[right]{$t$}}
edge from parent node[above right]{$d$}
}
edge from parent node[above right]{$R$}
};
% information sets
\draw[loosely dotted,very thick](0-1-1)to[out=-15,in=195](0-2-1);
\draw[loosely dotted,very thick](0-1-2)to[out=-15,in=195](0-2-2);
% movers
\node[above,yshift=2]at(0){1};
\foreach \x in {1,2} \node[above,yshift=2]at(0-\x){2};
\node at($.5*(s)+.5*(t)$){1};
\node at($.5*(m)+.5*(n)$){1};
\end{tikzpicture}
Page 26 of 28
3.8 Colored and Hybrid Game Tree
A B
X Y X Y
X 1, 1 2, 0 X 3, 1 2, 2
Y 0, 2 2, 2 Y 1, 1 1, 3
Page 27 of 28
\end{game}
};
\node[below,xshift=-15]at(0-2){
\gamemathfalse
\def\sgtextcolor{blue} % change text color
\def\sglinecolor{orange} % change matrix color
\arrayrulewidth.75pt
\begin{game}{2}{2}
& $X$ & $Y$\\
$X$ & $3,1$ & $2,2$\\
$Y$ & $1,1$ & $1,3$
\end{game}
};
\end{tikzpicture}
Page 28 of 28