Skip to content
Graphviz (DOT) templates

Game Theory — Decision Tree

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

Template previewGraphviz (DOT)
Rendering…

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"];
}