2

This is a follow up question to this.

Code:

\documentclass[12pt]{article}
\usepackage{istgame}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows.meta, positioning}

\begin{document}    
    \begin{center}
        \begin{istgame}
            \setistNewNodeStyle{max}
            [regular polygon, regular polygon sides = 3]{1.5cm}
            \setistNewNodeStyle{min}
            [regular polygon, regular polygon sides = 3, shape border rotate = 180]{1.5cm}
            \setistNewNodeStyle{chance}
            [circle]{1.2cm}
            %\xtShowTerminalNodes[box node, minimum size = 1cm]
            \def\distFactor{20};
            \xtdistance{\distFactor mm}{4*\distFactor mm}
            \setxtarrowtips[blue, thick]
            \istroot(0)[max]<center, blue>{1.5}
            \istb[blue, ->-] \istb \endist
            \xtdistance{\distFactor mm}{2*\distFactor mm}
            \istroot(1)(0-1)[chance]<center, purple>{1.5}
            \istb{0.5}[al] \istb{0.5}[ar] \endist
            \istroot(2)(0-2)[chance]<center, purple>{$\leq 1$}
            \istb{0.5}[al] \istb{0.5}[ar] \endist
            \xtdistance{\distFactor mm}{\distFactor mm}
            \istroot(3)(1-1)[min]<center, red>{2}
            \istb{}{2} \istb{}{5000}[[circle, draw, yshift = 2pt, minimum size = 0.75cm] below] \endist
            \istroot(4)(1-2)[min]<center, red>{1}
            \istb{}{1} \istb{}{100}[[circle, draw, yshift = 2pt, minimum size = 0.75cm] below] \endist
            \istroot(5)(2-1)[min]<center, red>{0}
            \istb{}{0} \istb{}{2}[[circle, draw, yshift = 2pt, minimum size = 0.75cm] below] \endist
            \istroot(6)(2-2)[min]
            \istb{}{-1}[[circle, draw, yshift = 2pt, minimum size = 0.75cm] below] \istb{}{0}[[circle, draw, yshift = 2pt, minimum size = 0.75cm] below] \endist
        \end{istgame}
    \end{center}
\end{document}

Output:

enter image description here

minimum size is part of the solution, but is there any way to align the terminal values with that inside the biggest circle? (Note that the terminal values are listed incorrectly for the sake of getting this output)

2

One way of doing this is to use \xtShowEndPoints followed by xtShowTerminalNodes:

enter image description here

\documentclass[12pt,border=2pt]{standalone}
\usepackage{istgame}
%\usepackage{tikz}
%\usetikzlibrary{shapes,arrows.meta, positioning}

\begin{document}    

\begin{istgame}
\setistNewNodeStyle{max}
  [regular polygon, regular polygon sides = 3]{1.5cm}
\setistNewNodeStyle{min}
  [regular polygon, regular polygon sides = 3, shape border rotate = 180]{1.5cm}
\setistNewNodeStyle{chance}
  [circle]{1.2cm}
\def\distFactor{20};
\xtdistance{\distFactor mm}{4*\distFactor mm}
\setxtarrowtips[blue, thick]
\istroot(0)[max]<center, blue>{1.5}
  \istb[blue, ->-] 
  \istb 
  \endist
\xtdistance{\distFactor mm}{2*\distFactor mm}
\istroot(1)(0-1)[chance]<center, purple>{1.5}
  \istb{0.5}[al] 
  \istb{0.5}[ar] 
  \endist
\istroot(2)(0-2)[chance]<center, purple>{$\leq 1$}
  \istb{0.5}[al] 
  \istb{0.5}[ar] 
  \endist
%% terminal nodes with or without circles (TRICK!!)
\xtShowEndPoints[circle,draw,minimum size=1.1cm] % comes before \xtShowTerminalNodes
\xtShowTerminalNodes[circle,draw=none,minimum size=1.1cm]
\xtdistance{\distFactor mm}{\distFactor mm}
\istroot(3)(1-1)[min]<center, red>{2}
  \istbt{}{2}[center]   %
  \istb{}{5000}[center] 
  \endist
\istroot(4)(1-2)[min]<center, red>{1}
  \istbt{}{1}[center]   %
  \istb{}{100}[center] 
  \endist
\istroot(5)(2-1)[min]<center, red>{0}
  \istbt{}{0}[center]   %
  \istb{}{2}[center] 
  \endist
\istroot(6)(2-2)[min]
  \istb{}{-1}[center] 
  \istb{}{0}[center] 
  \endist
\end{istgame}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.