\documentclass[margin=2pt]{standalone}

\usepackage{amsmath,amsfonts}
\usepackage{booktabs}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{calc,fit}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{snakes}

\begin{document}
\begin{tikzpicture}[every node/.style={inner sep=0pt}, var/.style={draw=black, minimum size=15pt, circle, font=\small, thick, anchor=center, fill=white}, factor/.style={fill=black, minimum size=5pt, rectangle, anchor=center}, edge/.style={thick, -latex}, modulation/.style={thick, -|}, zlabel/.style={font=\scriptsize, yshift=-2pt}, observed/.style={fill=gray!30}, flowlabel/.style={midway, font=\scriptsize}, rewardlabel/.style={pos=1, font=\scriptsize, right}, gfn_edge/.style={ultra thick, -latex}, gfn_node/.style={ultra thick, circle, draw, text height=3.5em, fill=gray!10}, gfn_other/.style={pos=1, anchor=west, inner sep=2pt}, adjacency/.style={minimum width=10pt, minimum height=10pt, rectangle, rounded corners=2pt, font=\bfseries\scriptsize}, y=12pt, x=50pt]

\node[] (gflownet) at (0, 0) {\begin{tikzpicture}

\node[gfn_node, label={[font=\small, inner sep=4pt]270:$G_{0}$}] (graph1) at (0, 0) {\begin{tikzpicture}
    \node[var] (A) {$A$};
    \node[var, above right=1em and 0.5em of A] (B) {$B$};
    \node[var, below right=1em and 0.5em of B] (C) {$C$};
    \node[below=0.1em of A] (D) {};
\end{tikzpicture}};

\node[gfn_node, above right=1em and 4em of graph1, label={[font=\small, inner sep=4pt]270:$G_{1}$}] (graph2) {\begin{tikzpicture}
    \node[var] (A) {$A$};
    \node[var, above right=1em and 0.5em of A] (B) {$B$};
    \node[var, below right=1em and 0.5em of B] (C) {$C$};
    \node[below=0.1em of A] (D) {};
    
    \draw[edge] (A) -- (B);
\end{tikzpicture}};

\node[gfn_node, below right=1em and 4em of graph1, label={[font=\small, inner sep=4pt]270:$G_{2}$}] (graph3) {\begin{tikzpicture}
    \node[var] (A) {$A$};
    \node[var, above right=1em and 0.5em of A] (B) {$B$};
    \node[var, below right=1em and 0.5em of B] (C) {$C$};
    \node[below=0.1em of A] (D) {};
    
    \draw[edge] (C) -- (A);
\end{tikzpicture}};

\node[gfn_node, below right=1em and 4em of graph2, label={[font=\small, inner sep=4pt]270:$G_{3}$}] (graph4) {\begin{tikzpicture}
    \node[var] (A) {$A$};
    \node[var, above right=1em and 0.5em of A] (B) {$B$};
    \node[var, below right=1em and 0.5em of B] (C) {$C$};
    \node[below=0.1em of A] (D) {};
    
    \draw[edge] (A) -- (B);
    \draw[edge] (C) -- (A);
\end{tikzpicture}};

\node[gfn_node, above right=1em and 4em of graph2, label={[font=\small, inner sep=4pt]270:$G_{4}$}] (graph5) {\begin{tikzpicture}
    \node[var] (A) {$A$};
    \node[var, above right=1em and 0.5em of A] (B) {$B$};
    \node[var, below right=1em and 0.5em of B] (C) {$C$};
    \node[below=0.1em of A] (D) {};
    
    \draw[edge] (A) -- (B);
    \draw[edge] (B) -- (C);
\end{tikzpicture}};

\node[gfn_node, above right=1em and 4em of graph4, fill=red!10, label={[font=\small, inner sep=4pt, red]270:Invalid state}] (graph6) {\begin{tikzpicture}
    \node[var] (A) {$A$};
    \node[var, above right=1em and 0.5em of A] (B) {$B$};
    \node[var, below right=1em and 0.5em of B] (C) {$C$};
    \node[below=0.1em of A] (D) {};
    
    \draw[edge] (A) -- (B);
    \draw[edge] (C) -- (A);
    \draw[edge, red] (B) -- (C);
\end{tikzpicture}};

\node[gfn_node, below right=1em and 4em of graph4, label={[font=\small, inner sep=4pt]270:$G_{5}$}] (graph7) {\begin{tikzpicture}
    \node[var] (A) {$A$};
    \node[var, above right=1em and 0.5em of A] (B) {$B$};
    \node[var, below right=1em and 0.5em of B] (C) {$C$};
    \node[below=0.1em of A] (D) {};
    
    \draw[edge] (A) -- (B);
    \draw[edge] (C) -- (A);
    \draw[edge] (C) -- (B);
\end{tikzpicture}};

\draw[gfn_edge] (graph1) -- (graph2) node[midway, sloped, above=5pt, scale=0.6] {Add $A \rightarrow B$} node[midway, sloped, below=5pt, scale=0.6] {$P_{\theta}(G_{1} \mid G_{0})$};
\draw[gfn_edge] (graph1) -- (graph3);
\draw[gfn_edge] (graph2) -- (graph4);
\draw[gfn_edge] (graph3) -- (graph4);
\draw[gfn_edge] (graph2) -- (graph5) node[midway, sloped, above=5pt, scale=0.6] {Add $B \rightarrow C$} node[midway, sloped, below=5pt, scale=0.6] {$P_{\theta}(G_{4} \mid G_{1})$};
\draw[gfn_edge] (graph4) -- (graph6) node[circle, minimum size=1.5em, pos=0.4, draw=none] (cross) {};
\draw[gfn_edge] (graph4) -- (graph7);

\draw[gfn_edge] (graph1.0) -- ++(0:2em) node[gfn_other] {$\ldots$};
\draw[gfn_edge] (graph2.0) -- ++(0:2em) node[gfn_other] {$\ldots$};
\draw[gfn_edge] (graph3.0) -- ++(0:2em) node[gfn_other] {$\ldots$};
\draw[gfn_edge] (graph3.330) -- ++(330:2em) node[gfn_other] {$\ldots$};
\draw[gfn_edge] (graph5.0) -- ++(0:2em) node[gfn_other] {$\ldots$};

% \draw[line width=3pt, red, shorten <= 5pt, shorten >= 5pt] (graph6.45) -- (graph6.225);
% \draw[line width=3pt, red, shorten <= 5pt, shorten >= 5pt] (graph6.135) -- (graph6.315);
\draw[line width=3pt, red] (cross.45) -- (cross.225);
\draw[line width=3pt, red] (cross.135) -- (cross.315);
% \node[below right=1em and 0.5em of cross.east, align=center, red] (invalid_label) {Invalid state};

\draw[ultra thick, NavyBlue, snake=coil, segment aspect=0, line after snake=1pt] (graph1.300) -- ++(300:2em) [snake=none, ultra thick, -latex, NavyBlue] -- ++(300:5pt) node[pos=1, anchor=north, inner sep=1pt, NavyBlue, font=\small] {$R(G_{0})$};
\draw[ultra thick, NavyBlue, snake=coil, segment aspect=0, line after snake=1pt] (graph2.300) -- ++(300:2em) [snake=none, ultra thick, -latex, NavyBlue] -- ++(300:5pt) node[pos=1, anchor=north, inner sep=1pt, NavyBlue, font=\small] {$R(G_{1})$};
\draw[ultra thick, NavyBlue, snake=coil, segment aspect=0, line after snake=1pt] (graph3.300) -- ++(300:2em) [snake=none, ultra thick, -latex, NavyBlue] -- ++(300:5pt) node[pos=1, anchor=north, inner sep=1pt, NavyBlue, font=\small] {$R(G_{2})$};
\draw[ultra thick, NavyBlue, snake=coil, segment aspect=0, line after snake=1pt] (graph4.300) -- ++(300:2em) [snake=none, ultra thick, -latex, NavyBlue] -- ++(300:5pt) node[pos=1, anchor=north, inner sep=1pt, NavyBlue, font=\small] {$R(G_{3})$};
\draw[ultra thick, NavyBlue, snake=coil, segment aspect=0, line after snake=1pt] (graph5.300) -- ++(300:2em) [snake=none, ultra thick, -latex, NavyBlue] -- ++(300:5pt) node[pos=1, anchor=north, inner sep=1pt, NavyBlue, font=\small] {$R(G_{4})$};
\draw[ultra thick, NavyBlue, snake=coil, segment aspect=0, line after snake=1pt] (graph7.300) -- ++(300:2em) [snake=none, ultra thick, -latex, NavyBlue] -- ++(300:5pt) node[pos=1, anchor=north, inner sep=1pt, NavyBlue, font=\small] {$R(G_{5})$};

\end{tikzpicture}};

\end{tikzpicture}
\end{document}