**2. Modeling Adverserial Swarms**

#### *2.1. Cooperative Swarm Models*

The literature on the design of swarm strategies which produce coherent, stable collective behavior has become vast. A quick review of the literature points to two main trends/categories in swarm behavior design. The first relies on dynamic modeling of the agents and potential functions to control their behavior (see [7,8] and references therein). The second trend relates to the use of rules to describe agents' motion and local rule-based algorithms to control them [9,10].

We present two examples of dynamic swarming strategies from the literature. These examples are illustrative of the forces considered in many swarming models:


These intra-swarm goals are aggregated to provide a swarm control law, which we will refer to as *FS*, to each swarm agent. Both example models in this paper share the same double integrator form with respect to this control law. For *n* swarm agents, the dynamics are defined by

$$
\vec{x}\_i = u\_i. \ t = 1, \dots, n\_\prime \tag{1}
$$

$$
\mu\_i = F\_S(\mathbf{x}\_i, \dot{\mathbf{x}}\_i, \forall j \neq i : \mathbf{x}\_j, \dot{\mathbf{x}}\_j | \theta). \tag{2}
$$

2.1.1. Example Model 1: Virtual Body Artificial Potential

In this model [11,12], swarm agents track to a virtual body (or bodies) guiding their course, while also reacting to intra-swarm forces of collision avoidance and group cohesion. The input *ui* is the sum of intra-swarm forces, virtual body tracking, and a velocity dampening term. In addition, in this adversarial scenario, swarm agents are influenced to avoid intruding defense agents. The intra-swarm force between two swarm agents has magnitude *fI* and is a gradient of an artificial potential *VI*. Let

$$
\mathfrak{x}\_{i\bar{j}} = \mathfrak{x}\_{i\bar{i}} - \mathfrak{x}\_{\bar{j}}.\tag{3}
$$

The artificial potential *VI* depends on the distance ||*xij*|| between swarm agents *i* and *j*. The artificial potential *VI* is defined as:

$$V\_I = \begin{cases} \alpha \left( \ln \left( ||x\_{ij}||\right) + \frac{d\_0}{||x\_{ij}||} \right), & 0 < ||x\_{ij}|| < d\_1 \\ \alpha \left( \ln(d\_1) + \frac{d\_0}{d\_1} \right), & ||x\_{ij}|| \ge d\_1 \end{cases} \tag{4}$$

where *α* is a scalar control gain, and *d*<sup>0</sup> and *d*<sup>1</sup> are scalar constants for distance ranges. Then the magnitude of interaction force is given by

$$f\_I = \begin{cases} \nabla\_{||x\_{\bar{i}j}||} V\_{I\prime} & 0 < ||x\_{\bar{i}j}|| < d\_1\\ 0, & ||x\_{\bar{i}j}|| \ge d\_1 \end{cases} \tag{5}$$

The swarm body is guided by 'virtual leaders', non-corporeal reference trajectories which lead the swarm. We assign a potential *Vh* on a given swarm agent *i* associated with the *k*-th virtual leader, defined with the distance ||*hik*|| between the swarm agent *i* and leader *k*. Mirroring the parameters *α*, *d*0, and *d*<sup>1</sup> defining *VI*, we assign *Vh* the parameters *αh*, *h*0, and *h*1. An additional dissipative force *fvi* is included for stability. The control law *ui* for the vehicle *i* associated with *m* defenders is given by

$$\begin{split} u\_i &= -\sum\_{j\neq i}^n \nabla\_{\boldsymbol{x}\_i} V\_I(\boldsymbol{x}\_{ij}) - \sum\_{k=1}^m \nabla\_{\boldsymbol{x}\_i} V\_h(\boldsymbol{h}\_{ik}) + f\_{\boldsymbol{v}\_i} \\ &= -\sum\_{j\neq i}^n \frac{f\_I(\boldsymbol{x}\_{ij})}{||\boldsymbol{x}\_{ij}||} \boldsymbol{x}\_{ij} - \sum\_{k=1}^m \frac{f\_h(\boldsymbol{h}\_{ik})}{||\boldsymbol{h}\_{ik}||} \boldsymbol{h}\_{ik} + f\_{\boldsymbol{v}\_i}. \end{split} \tag{6}$$

2.1.2. Example Model 2: Reynolds Boid Model

In this model [8,13], for radius *r*, *j* = 1, ... , *N*, define the neighbors of agent *i* at position *xi* <sup>∈</sup> <sup>R</sup>*<sup>n</sup>* by the set

$$\mathcal{N}\_i = \{ j | j \neq i \land ||\mathbf{x}\_i - \mathbf{x}\_j|| < r \} \tag{7}$$

Swarm control is designated by three forces. Alignment of velocity vectors:

$$f\_{al} = -w\_{al} \left( \dot{\mathbf{x}}\_i - \frac{1}{|\mathcal{N}\_i|} \sum\_{j \in \mathcal{N}\_i} \dot{\mathbf{x}}\_j \right) \tag{8}$$

Cohesion of swarm:

$$f\_{\rm col} = -w\_{\rm col} \left( x\_i - \frac{1}{|\mathcal{N}\_i|} \sum\_{j \in \mathcal{N}\_i} x\_j \right) \tag{9}$$

Separation between agents:

$$f\_{sep} = -w\_{sep} \frac{1}{|\mathcal{N}\_i|} \left( \sum\_{j \in \mathcal{N}\_i} \frac{\mathbf{x}\_j - \mathbf{x}\_i}{||\mathbf{x}\_i - \mathbf{x}\_j||} \right) \tag{10}$$

for positive constant parameters *wal*, *wcoh*, *wsep*.

$$
\mu\_i = f\_{al} + f\_{col} + f\_{scp} \tag{11}
$$

### *2.2. Adversarial Swarm Models*

The previous subsection provides several examples of inner swarm cooperative forces, *FS*. In order to enable adversarial behavior and defense, these inner swarm cooperative forces need to be supplemented by additional forces of exogenous input into the collective. As written, the above cooperative swarming models neither respond to outside agents nor 'attack' (swarm towards) a specific target. We, thus, supplement the control laws above with two additional forces. The first, we refer to as *FHVU*; the goal of the swarm, in this paper, is limited to tracking an HVU. An example of *FHVU* is provided in the example of Section 5, in Equation (28).

We also supplement by an adversarial force, which we refer to as *FD*. The review [7] discusses several approaches to adversarial control. Examples include containment strategies modeled after dolphins [14], sheep-dogs [15,16], and birds of prey [17]. In [18], the authors studied the interaction between two swarms, one of which could be considered adversarial. In these examples of adversarial swarm control, the mechanism of interaction and defense is provided through the swarm's own pursuit and evasion responses. This indirectly uses the swarm's own response strategy against it—an approach which can be termed 'herding'.

In addition to herding reactions, one can consider more direct additional forces of disruption, to model neutralizing swarm agents and/or physically remove them from the swarm. One form this can take, for example, is the removal of agents from the communications network, as considered in [19]. Another approach is taken in [20], which uses survival probabilities based on damage attrition. Defenders and the attacking swarm engage in mutual damage attrition while the swarm also damages the HVU when in proximity to it. Probable damage between agents is tracked as damage rates over time, where the rate of damage is based on features such as distance between agents and angle of attack. The damage rate at time *t* provides the probability of a successful 'hit' in time period [*t*, *t* + Δ*t*]. The probability of agent survival can be modeled based on the aggregate number of hits it takes to incapacitate the agent. The authors of [20] provide derivations for multiple possibilities, such as single-shot destruction and N-shot destruction. These probabilities take the form of ODE equations. Tracking survival probabilities thus adds an additional state to the dynamics of each agent—a survival probability state.

We, thus, summarize a control scheme with HVU target-tracking and herding driven by the reactive forces of collision avoidance with the defenders as the following, for HVU states *y*<sup>0</sup> and defender states *yk*, *k* = 1, . . . , *K*:


Example Attrition Model: Single-Shot Destruction

From [20]: let *P*0(*t*) be the probability the HVU has survived up to time *t*, *Pk*(*t*), *k* = 1, ... , *K*, the probability defender *k* has survived, and *Qj*(*t*), *j* = 1, ... , *N* the probability swarm attacker *j* has survived. Let *d j*,*k <sup>y</sup>* (*xj*(*t*), *yk*(*t*)) be the damage the defender *yk* inflicts on swarm attacker *xj* and let *d k*,*j <sup>x</sup>* (*yk*(*t*), *xj*) be the damage the swarm attacker *xj* inflicts on the defender *yk*, with the HVU represented by *k* = 0.

Then the survival probabilities for attackers and defenders from single-shot destruction are given by the coupled ODEs:

$$\begin{cases} \dot{Q}\_j(t) = -Q\_j(t) \sum\_{k=1}^K P\_k(t) d\_{\mathcal{V}}^{j,k}(\mathbf{x}\_j(t), y\_k(t)), & Q\_j(0) = 1 \\ \dot{P}\_k(t) = -P\_k(t) \sum\_{j=1}^N Q\_j(t) d\_{\mathbf{x}}^{\vec{k},j}(y\_k(t), \mathbf{x}\_j(t)), & P\_k(0) = 1 \end{cases}$$

for *j* = 1, . . . , *N*, *k* = 0..., *K*.
