mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
71 lines
3.1 KiB
TeX
71 lines
3.1 KiB
TeX
\documentclass[varwidth=true, border=2pt]{standalone}
|
|
\usepackage{tikz}
|
|
|
|
\tikzstyle{neuron}=[draw,circle,minimum size=12pt,inner sep=0pt, fill=white]
|
|
\tikzstyle{stateTransition}=[very thick]
|
|
\tikzstyle{learned}=[text=red]
|
|
\tikzstyle{input}=[draw,fill=red!50,circle,minimum size=10pt,inner sep=0pt]
|
|
|
|
\begin{document}
|
|
\newcommand\n{6}
|
|
\newcommand\xs{3}
|
|
\begin{tikzpicture}
|
|
\foreach \y in {1,...,\n}{
|
|
\foreach \x in {1,...,\n}{
|
|
\node (N-\y-\x)[neuron] at (0.55*\y + \x, 0.75*\y) {};
|
|
}
|
|
}
|
|
|
|
\foreach \x in {1,...,\xs}{
|
|
\node (x-\x)[input] at (3+\x, -1) {$x_\x$};
|
|
}
|
|
|
|
\foreach \y in {1,...,\n}{
|
|
\foreach \x in {1,...,\n}{
|
|
\foreach \t in {1,...,\xs}{
|
|
\draw[thin, dashed, black!50] (x-\t) -- (N-\y-\x) node [midway,above=-0.06cm,sloped] {};
|
|
}
|
|
}
|
|
}
|
|
|
|
\foreach \y in {1,...,\n}{
|
|
\foreach \x in {1,...,\n}{
|
|
\node (N-\y-\x)[neuron] at (0.55*\y + \x, 0.75*\y) {};
|
|
}
|
|
}
|
|
|
|
% Make it look more like a board
|
|
\draw[very thick, dashed, black!50] (N-1-1) -- (N-1-2)
|
|
-- (N-1-3)
|
|
-- (N-1-4)
|
|
-- (N-1-5)
|
|
-- (N-1-6)
|
|
-- (N-2-6)
|
|
-- (N-3-6)
|
|
-- (N-4-6)
|
|
-- (N-5-6)
|
|
-- (N-6-6)
|
|
-- (N-6-5)
|
|
-- (N-6-4)
|
|
-- (N-6-3)
|
|
-- (N-6-2)
|
|
-- (N-6-1)
|
|
-- (N-5-1)
|
|
-- (N-4-1)
|
|
-- (N-3-1)
|
|
-- (N-2-1)
|
|
-- (N-1-1);
|
|
|
|
|
|
% Neighborhood gets excited
|
|
\node (N-4-3)[neuron, fill=black!50] at (0.55*4 + 3, 0.75*4) {};
|
|
\node (N-4-2)[neuron, fill=black!10] at (0.55*4 + 2, 0.75*4) {};
|
|
\node (N-4-4)[neuron, fill=black!10] at (0.55*4 + 4, 0.75*4) {};
|
|
\node (N-5-2)[neuron, fill=black!10] at (0.55*5 + 2, 0.75*5) {};
|
|
\node (N-5-3)[neuron, fill=black!10] at (0.55*5 + 3, 0.75*5) {};
|
|
\node (N-5-4)[neuron, fill=black!10] at (0.55*5 + 4, 0.75*5) {};
|
|
\node (N-3-3)[neuron, fill=black!10] at (0.55*3 + 2, 0.75*3) {};
|
|
\node (N-3-3)[neuron, fill=black!10] at (0.55*3 + 3, 0.75*3) {};
|
|
\node (N-3-3)[neuron, fill=black!10] at (0.55*3 + 4, 0.75*3) {};
|
|
\end{tikzpicture}
|
|
\end{document}
|