Skip to content
Graphviz (DOT) templates

Game Theory — Decision Tree

Two-player extensive-form game with payoffs at terminal nodes.

Template previewGraphviz (DOT)
gt P1 P1 P2L P2 P1->P2L L P2R P2 P1->P2R R L1 (3, 2) P2L->L1 l L2 (1, 4) P2L->L2 r L3 (0, 0) P2R->L3 l L4 (2, 1) P2R->L4 r

What this template contains

Graph
Directed
Edges
6
Source
18 lines

Make it your own.

digraph gt {
  rankdir=TB;
  graph [bgcolor=transparent];
  node [shape=circle, style=filled, fontname=Inter, fontsize=10];

  P1 [label="P1", fillcolor="#dbeafe"];
  P2L [label="P2", fillcolor="#fef3c7"];
  P2R [label="P2", fillcolor="#fef3c7"];

  L1 [shape=plain, label="(3, 2)"];
  L2 [shape=plain, label="(1, 4)"];
  L3 [shape=plain, label="(0, 0)"];
  L4 [shape=plain, label="(2, 1)"];

  P1 -> P2L [label="L"];
  P1 -> P2R [label="R"];
  P2L -> L1 [label="l"];
  P2L -> L2 [label="r"];
  P2R -> L3 [label="l"];
  P2R -> L4 [label="r"];
}