Skip to content

Instantly share code, notes, and snippets.

@daanklijn
Created March 22, 2021 14:13
Show Gist options
  • Save daanklijn/e9dc32376bac0e84373dc289b8850b40 to your computer and use it in GitHub Desktop.
Save daanklijn/e9dc32376bac0e84373dc289b8850b40 to your computer and use it in GitHub Desktop.
Evolutionary Algorithm flowchart LaTeX tikz
\begin{figure}[h]
\centering
\captionsetup{justification=centering}
\begin{tikzpicture}[node distance = 4cm]
\node [frame] (pop) {Population};
\node [above=2cm, left of=pop] (init) {Initialisation};
\node [below=2cm, left of=pop] (term) {Termination};
\node [frame, above=2cm, right of=pop] (parents) {Parents};
\node [frame, below=2cm, right of=pop] (off) {Offspring};
\path [line] (parents)
-- node[right,align=left,pos=.5] {Crossover\\[3mm]Mutation}
(off);
\path [line] (init) |- (pop.170);
\path [line] (pop.190) -| (term);
\path [line] (off) -| node[below,pos=.25, align=center] {Survivor\\ selection}(pop);
\path [line] (pop) |- node[above,pos=.75, align=center] {Parent\\ selection}(parents);
\end{tikzpicture}
\caption{Flowchart of the general process of an Evolutionary Algorithm.}
\label{ea_flowchart}
\end{figure}
@daanklijn
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment