Path: blob/master/tikz/decision_tree_oil_wildcatter_tikz.tex
1191 views
\documentclass[tikz, border=2pt]{standalone}1\usepackage[utf8]{inputenc}2\usepackage{tikz}3\usetikzlibrary{shapes.geometric}4\usetikzlibrary{positioning}5\newcommand{\specific}{rgb:orange,1;yellow,2;pink,5}6% \title{Decision_tree_oil_wildcatter_problem}7% \author{Vishal Ghoniya}8% \date{July 2022}910\begin{document}11\tikzstyle{chance variable}=[circle, draw=black, minimum size=3mm]12\tikzstyle{decision node}=[rectangle, draw=black, minimum height=4mm, minimum width=2cm]13\tikzstyle{decision}=[rectangle, draw=black, minimum height=4mm, minimum width=4mm]14\tikzstyle{higher utility}=[diamond, draw=black, fill=green, minimum width=3mm, minimum height=3mm]15\tikzstyle{lower utility}=[diamond, draw=black, fill=red, minimum width=3mm, minimum height=3mm]16\begin{tikzpicture}[font={\small}]1718\node [chance variable, fill=black] at (0,0) (root) {};1920\node[chance variable, fill=\specific, right=2cm of root] (s_1) {S = 1} edge (root);21\node[above right=0.2cm of s_1, yshift=-0.5cm] {0.35};22\node[decision, fill=black, right=1cm of s_1] (d_1) {} edge (s_1);23\node[decision node, fill=\specific, above right=0.75cm of d_1] (dd_1) {Drill} (dd_1.west) edge[-] (d_1.north);24\node[decision node, fill=\specific, below right=0.75cm of d_1] (ddn_1) {Don't Drill} (ddn_1.west) edge[-] (d_1.south);25\node [higher utility, right=2cm of dd_1] (u_1) {} edge (dd_1);26\node [right=0.3cm of u_1] {32.9};27\node [lower utility, right=2cm of ddn_1] (un_1) {} edge (ddn_1);28\node [right=0.3cm of un_1] {0};293031\node[chance variable, fill=\specific, above=2cm of s_1] (s_0) {S = 0} edge (root);32\node[above right=0.2cm of s_0, yshift=-0.5cm] {0.41};33\node[decision, fill=black, right=1cm of s_0] (d_0) {} edge (s_0);34\node[decision node, fill=\specific, above right=0.75cm of d_0] (dd_0) {Drill} (dd_0.west) edge[-] (d_0.north);35\node[decision node, fill=\specific, below right=0.75cm of d_0] (ddn_0) {Don't Drill} (ddn_0.west) edge[-] (d_0.south);36\node [lower utility, right=2cm of dd_0] (u_0) {} edge (dd_0);37\node [right=0.3cm of u_0] {-30.5};38\node [higher utility, right=2cm of ddn_0] (un_0) {} edge (ddn_0);39\node [right=0.3cm of un_0] {0};4041\node[chance variable, fill=\specific, below=2cm of s_1] (s_2) {S = 2} edge (root);42\node[above right=0.2cm of s_2, yshift=-0.5cm] {0.24};43\node[decision, fill=black, right=1cm of s_2] (d_2) {} edge (s_2);44\node[decision node, fill=\specific, above right=0.75cm of d_2] (dd_2) {Drill} (dd_2.west) edge[-] (d_2.north);45\node[decision node, fill=\specific, below right=0.75cm of d_2] (ddn_2) {Don't Drill} (ddn_2.west) edge[-] (d_2.south);46\node [higher utility, right=2cm of dd_2] (u_2) {} edge (dd_2);47\node [right=0.3cm of u_2] {87.5};48\node [lower utility, right=2cm of ddn_2] (un_2) {} edge (ddn_2);49\node [right=0.3cm of un_2] {0};505152\end{tikzpicture}5354\end{document}555657