  We develop a probabilistic control algorithm, $\texttt{GTLProCo}$, for swarms
of agents with heterogeneous dynamics and objectives, subject to high-level
task specifications. The resulting algorithm not only achieves decentralized
control of the swarm but also significantly improves scalability over
state-of-the-art existing algorithms. Specifically, we study a setting in which
the agents move along the nodes of a graph, and the high-level task
specifications for the swarm are expressed in a recently-proposed language
called graph temporal logic (GTL). By constraining the distribution of the
swarm over the nodes of the graph, GTL can specify a wide range of properties,
including safety, progress, and response. $\texttt{GTLProCo}$, agnostic to the
number of agents comprising the swarm, controls the density distribution of the
swarm in a decentralized and probabilistic manner. To this end, it synthesizes
a time-varying Markov chain modeling the time evolution of the density
distribution under the GTL constraints. We first identify a subset of GTL,
namely reach-avoid specifications, for which we can reduce the synthesis of
such a Markov chain to either linear or semi-definite programs. Then, in the
general case, we formulate the synthesis of the Markov chain as a mixed-integer
nonlinear program (MINLP). We exploit the structure of the problem to provide
an efficient sequential mixed-integer linear programming scheme with trust
regions to solve the MINLP. We empirically demonstrate that our sequential
scheme is at least three orders of magnitude faster than off-the-shelf MINLP
solvers and illustrate the effectiveness of $\texttt{GTLProCo}$ in several
swarm scenarios.
