|
| 1 | +\documentclass[tikz, border=1cm]{standalone} |
| 2 | +% main document, called main.tex |
| 3 | +\usepackage{tikz} |
| 4 | +\usetikzlibrary{bayesnet} |
| 5 | + |
| 6 | +\begin{document} |
| 7 | +% \title{sequential_prediction} |
| 8 | +% \author{Dhruv Patel} |
| 9 | +% \date{July 2022} |
| 10 | +\tikzstyle{emptynode} = [rectangle, draw=black!0, minimum size=3mm] |
| 11 | +\tikzstyle{rect} = [rectangle, draw=black!90, minimum size=3mm] |
| 12 | +\tikzstyle{diam} = [diamond, draw=black!90, minimum width=1.5mm, minimum height = 1.5mm] |
| 13 | +\begin{tikzpicture} |
| 14 | + |
| 15 | + \node[latent] (s0) {$s_0$}; |
| 16 | + \node[latent, right= 2.4cm of s0](s1){$s_1$}; |
| 17 | + \node[latent, right= 2.4cm of s1](s2){$s_2$}; |
| 18 | + |
| 19 | + \node[obs, below= 2cm of s0](x0){$o_0$}; |
| 20 | + \node[obs, below= 2cm of s1](x1){$o_1$}; |
| 21 | + \node[obs, below= 2cm of s2](x2){$o_2$}; |
| 22 | + |
| 23 | + \node[latent, below= 1cm of x0](b0){$b_0$}; |
| 24 | + \node[latent, below= 1cm of x1](b1){$b_1$}; |
| 25 | + \node[latent, below= 1cm of x2](b2){$b_2$}; |
| 26 | + |
| 27 | + \node[obs, rect, right = 0.8cm of x0](a0){$a_0$}; |
| 28 | + \node[obs, rect, right = 0.8cm of x1](a1){$a_1$}; |
| 29 | + |
| 30 | + \node[obs, diam, above = 0.6 of a0](r0){$r_0$}; |
| 31 | + \node[obs, diam, above = 0.6 of a1](r1){$r_1$}; |
| 32 | + |
| 33 | + \node[emptynode, right= 2cm of s2](e1){$\cdots$}; |
| 34 | + \node[emptynode, right= 2cm of b2](e2){$\cdots$}; |
| 35 | + |
| 36 | + \edge{s0}{x0,s1,r0}; |
| 37 | + \edge{x0}{b0}; |
| 38 | + \edge{b0}{b1,a0}; |
| 39 | + \edge{b1}{b2}; |
| 40 | + \edge{a0}{r0,s1,x1}; |
| 41 | + \edge{s1}{r1, x1, s2}; |
| 42 | + \edge{b1}{b2, a1}; |
| 43 | + \edge{s2}{x2}; |
| 44 | + \edge{x2,r1,a1}{b2}; |
| 45 | + \edge{a1}{r1,s2,x2}; |
| 46 | + \edge{a0,r0,x1}{b1}; |
| 47 | + \edge{s2}{e1}; |
| 48 | + \edge{b2}{e2}; |
| 49 | + |
| 50 | + \node[draw=black,thin,fit=(s0)(s1)(s2), rectangle,inner sep=10pt](rect1) {}; |
| 51 | + \node[const, above = 2.9cm of a1](){environment state}; |
| 52 | + \node[draw=black,thin,fit=(b0)(b1)(b2), rectangle,inner sep=10pt](rect1) {}; |
| 53 | + \node[const, below = 1.9cm of a1](){agent state}; |
| 54 | + |
| 55 | +\end{tikzpicture} |
| 56 | +\end{document} |
0 commit comments