I modified a solution given by cfr in this post Path diagram using Tikz.
My code looks like this:
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta,calc,positioning}
\begin{document}
\begin{tikzpicture}
[
rect/.style={draw, text centered},
>={Stealth[]}
]
\node (input) {Input};
\node [rect, right=of input] (gen) {Generator};
\node [above right=of gen] (C1) {$Candidate_1$};
\node [below right=of gen] (Cn) {$Candidate_n$};
\node [rect, below right=of C1] (eval) {Evaluator};
\node [right=of eval] (output) {Optimal Output};
\foreach \i [count=\ino] in {Candidate_2,Candidate\ldots}
{
\node at ($(C1)!\ino/3!(Cn)$) (\i) {$\i$};
\draw [->] (gen) -- (\i);
\draw [->] (\i) -- (eval);
}
\foreach \i/\j in {input/gen,gen/C1,gen/Cn,C1/eval,Cn/eval,eval/output} \draw [->] (\i) -- (\j);
\end{tikzpicture}
\end{document}
The problem is in this line
\foreach \i [count=\ino] in {Candidate_2,Candidate\ldots}
that make the compilation fail with error :
! Missing \endcsname inserted.
<to be read again>
\protect
l.20 }
as I cannot find a solution to have dots in that environment.
I basically want to show that you can have a number of "Candidates" from 1, 2, ..., to n. But how can I have "Candidate..." in there?

