I am relatively new to latex and work in overleaf(not sure if that helps?). I am trying to create a game tree. I currently have a few problems.
I am not sure how to specify the size of the node (so that it is small enough to look like a node and not a huge circle).
I wanted to take the "Nature", "P1", "P2", and so on into circles (hallow).
I am not sure how to write the numbers in terminal nodes in columns rather than rows, and \ command doesn't help.
I would really like to tilt the second, 3rd and 4th level edges of the trees, the long ones, that lead to the last 2 "P2"s, so that the latters are closer to each other, but I don't seem to find a way to do this.
Is there a way to make a particular edge thicker or double it instead of colouring?
Thanks in advance.
Here is what I have so far:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amsthm,amssymb,amsfonts}
\usepackage{tikz} %for game theory stuff
\usetikzlibrary{calc}
\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu}
\newenvironment{problem}[2][Problem]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}
\title{Math 350 \\ Homework 4}
\author{Elen Khachatran}
\date\today
\begin{document}
\maketitle
\begin{figure}
\centering
\caption{Caption}
\begin{tikzpicture}[scale=1,font=\footnotesize]
\tikzstyle{solid node}=[circle,draw,inner sep=1.2,fill=black];
\tikzstyle{hollow node}=[circle,draw,inner sep=1.2];
\tikzstyle{level 1}=[level distance=30mm,sibling distance=30mm]
\tikzstyle{level 2}=[level distance=25mm,sibling distance=10mm]
\tikzstyle{level 3}=[level distance=20mm,sibling distance=10mm]
\tikzstyle{level 4}=[level distance=20mm,sibling distance=50mm]
\tikzstyle{level 5}=[level distance=28mm,sibling distance=25mm]
\tikzstyle{level 6}=[level distance=28mm,sibling distance=50mm]
\node {Nature}
child {node (1){P1}
child {node (7){$-1, 1$}
edge from parent
node[left, pos=0.6, xshift=-2] {c}
}
child {
child{
child{node(8)[right, pos=0.6, xshift=-5]{P2}
child {node(27){$1,-1$}
edge from parent
node[right, pos=0.6, xshift=-15] {f}}
child {node (28){$-2,2$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}}
edge from parent
node[right, pos=0.6, xshift=2] {r}}
}
edge from parent
node[left, pos=0.6, xshift=-5] {$JQK$}
node[left, pos=0.2, xshift=-5] {$ p_1 $}
}
child {node (2){P1}
child {node (9){$-1, 1$}
edge from parent
node[right, pos=0.6, xshift=-15] {c}}
child {node(10){P2}
child {node (19){$1,-1$}
edge from parent
node[right, pos=0.6, xshift=-15] {f}}
child {node (20){$-2,2$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}
edge from parent
node[right, pos=0.6, xshift=2] {r}}
edge from parent
node[right, pos=0.6, xshift=-5] {$JKQ$}
node[right, pos=0.2, xshift=-5] {$p$}
}
child {node (3){P1}
child {node (11){P2}
child {node (21){$1,-1$}
edge from parent
node[right, pos=0.6, xshift=-12] {f}}
child {node (22){$-2,2$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}
edge from parent
node[right, pos=0.6, xshift=-15] {r}}
child {node(12){$-1,1$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}
edge from parent
node[right, pos=0.6, xshift=-5] {$QKJ$}
node[right, pos=0.2, xshift=-5] {$p$}
}
child {node (4){P1}
child {node (13){$1,-1$}
edge from parent
node[right, pos=0.6, xshift=-15] {c}
}
child {node(14){P2}
child {node (23) {$1,-1$}
edge from parent
node[right, pos=0.6, xshift=-15] {f}}
child {node (24) {$2,-2$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}
edge from parent
node[right, pos=0.6, xshift=2] {r}}
edge from parent
node[right, pos=0.6, xshift=-5] {$QJK$}
node[right, pos=0.2, xshift=-5] {$ p$}
}
child {node (5){P1}
child {node (15){P2}
child {node (25) {$1,-1$}
edge from parent
node[right, pos=0.6, xshift=-15] {f}}
child {node (26) {$2,-2$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}
edge from parent
node[right, pos=0.6, xshift=-15] {r}}
child {node(16){$1,-1$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}
edge from parent
node[right, pos=0.6, xshift=-5] {$KJQ$}
node[right, pos=0.2, xshift=-5] {$p$}
}
child {node (6){P1}
child{
child{
child {node (17){P2}
child {node (27)[solid node]{$1,-1$}
edge from parent
node[right, pos=0.6, xshift=-15] {r}}
child {node{$2,-2$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}
}edge from parent
node[right, pos=0.6, xshift=-15] {r}}}
child {node(18){$1,-1$}
edge from parent
node[right, pos=0.6, xshift=2] {c}}
edge from parent
node[right, pos=0.6, xshift=-5] {$KQJ$}
node[right, pos=0.2, xshift=-5] {$p$}
};
\draw[dashed,-] (1) -- (2);
\draw[dashed,-] (3) -- (4);
\draw[dashed,-] (5) -- (6);
\draw[dashed,-] (10) -- (11);
\draw[dashed,-] (14) -- (15);
\draw[dashed,-] (8) -- (17);
\end{tikzpicture}
\end{figure}
\end{document}


